Retab again

default_keybindings are left with tabs as it was in the beginning
This commit is contained in:
Maxim Gonchar 2014-01-20 17:12:32 +04:00
parent 1514ab8ec5
commit 71992158bf
4 changed files with 52 additions and 52 deletions

View file

@ -3,8 +3,8 @@
function __fish_complete_vi -d "Compleletions for vi and its aliases" --argument-names cmd
set -l is_vim
if type $cmd > /dev/null
eval command $cmd --version >/dev/null ^/dev/null; and set -l is_vim vim
end
eval command $cmd --version >/dev/null ^/dev/null; and set -l is_vim vim
end
# vim
set -l cmds -c $cmd
@ -24,11 +24,11 @@ function __fish_complete_vi -d "Compleletions for vi and its aliases" --argument
complete $cmds -s o -r --description 'Open stacked windows for each file'
complete $cmds -s O -r --description 'Open side by side windows for each file'
complete $cmds -s p -r --description 'Open tab pages for each file'
complete $cmds -s q -r --description 'Start in quickFix mode'
complete $cmds -s q -r --description 'Start in quickFix mode'
complete $cmds -s r -r --description 'Use swap files for recovery'
complete $cmds -s s -r --description 'Source and execute script file'
complete $cmds -s t -r --description 'Set the cursor to tag'
complete $cmds -s T -r --description 'Terminal name'
complete $cmds -s T -r --description 'Terminal name'
complete $cmds -s u -r --description 'Use alternative vimrc'
complete $cmds -s U -r --description 'Use alternative vimrc in GUI mode'
complete $cmds -s w -r --description 'Record all typed characters'

View file

@ -1,11 +1,11 @@
function __fish_cursor_konsole -d 'Set cursor (konsole)'
set -l shape $argv[1]
switch "$shape"
case block
echo -en '\e]50;CursorShape=0\x7'
case underscore
echo -en '\e]50;CursorShape=2\x7'
case line
echo -en '\e]50;CursorShape=1\x7'
end
set -l shape $argv[1]
switch "$shape"
case block
echo -en '\e]50;CursorShape=0\x7'
case underscore
echo -en '\e]50;CursorShape=2\x7'
case line
echo -en '\e]50;CursorShape=1\x7'
end
end

View file

@ -1,16 +1,16 @@
function __fish_cursor_xterm -d 'Set cursor (xterm)'
set -l shape $argv[1]
set -l shape $argv[1]
switch "$shape"
case block
set shape 2
case underscore
set shape 4
case line
set shape 6
end
if contains blink $argv
set shape (expr $shape - 1)
end
echo -en "\e[$shape q"
switch "$shape"
case block
set shape 2
case underscore
set shape 4
case line
set shape 6
end
if contains blink $argv
set shape (expr $shape - 1)
end
echo -en "\e[$shape q"
end

View file

@ -1,31 +1,31 @@
function fish_vi_cursor -d 'Set cursor shape for different vi modes'
set -l terminal $argv[1]
set -q terminal[1]; or set terminal auto
set -l terminal $argv[1]
set -q terminal[1]; or set terminal auto
set fcn
switch "$terminal"
case auto
if set -q KONSOLE_PROFILE_NAME
set fcn __fish_cursor_konsole
else if set -q XTERM_LOCALE
set fcn __fish_cursor_xterm
else
return 1
end
end
set fcn
switch "$terminal"
case auto
if set -q KONSOLE_PROFILE_NAME
set fcn __fish_cursor_konsole
else if set -q XTERM_LOCALE
set fcn __fish_cursor_xterm
else
return 1
end
end
set -g fish_cursor_insert line
set -g fish_cursor_default block
set -g fish_cursor_unknown block blink
set -g fish_cursor_insert line
set -g fish_cursor_default block
set -g fish_cursor_unknown block blink
echo "
function fish_cursor_vi_handle --on-variable fish_bind_mode
set -l varname fish_cursor_\$fish_bind_mode
if not set -q \$varname
set varname fish_cursor_unknown
end
#echo \$varname \$\$varname
$fcn \$\$varname
end
" | source
echo "
function fish_cursor_vi_handle --on-variable fish_bind_mode
set -l varname fish_cursor_\$fish_bind_mode
if not set -q \$varname
set varname fish_cursor_unknown
end
#echo \$varname \$\$varname
$fcn \$\$varname
end
" | source
end