diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2018-08-27 13:31:04 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2018-08-27 13:31:04 +0200 |
commit | 719a715614f2182a76b30ad27a327d70a86f34f1 (patch) | |
tree | a437eb29da8035bf7c2e30506c08fe6f15719871 /Completion/Unix/Command/_vim | |
parent | 7da8d19c224860ae4d6aa3f077fca7f734f20d88 (diff) | |
parent | ef61918398517473b9b594690a3be375f607cebe (diff) | |
download | zsh-719a715614f2182a76b30ad27a327d70a86f34f1.tar.gz zsh-719a715614f2182a76b30ad27a327d70a86f34f1.zip |
Merge tag 'zsh-5.5.1-test-2' into debian
Test release: 5.5.1-test-2.
Diffstat (limited to 'Completion/Unix/Command/_vim')
-rw-r--r-- | Completion/Unix/Command/_vim | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_vim b/Completion/Unix/Command/_vim index 042974338..8853fac30 100644 --- a/Completion/Unix/Command/_vim +++ b/Completion/Unix/Command/_vim @@ -41,7 +41,7 @@ arguments=( '-T[set terminal type]:::_terminals' '--not-a-term[skip warning for input/output not being a terminal]' '--ttyfail[exit if input or output is not a terminal]' - '-u[use given vimrc file instead of default .vimrc]::rc file:_files' + '-u[use given vimrc file instead of default .vimrc]:config:->config' "--noplugin[don't load plugin scripts]" '-o-[number of windows to open (default: one for each file)]::window count: ' '-O-[number of windows to vertically split open (default is one for each file)]::window count: ' @@ -71,7 +71,6 @@ arguments=( '--startuptime[write startup timing messages to given file]:log file:_files' '--socketid[run GVIM in another window]' '-i[use specified viminfo file]:viminfo file [~/.viminfo]:_files' - '--clean[defaults, no plugins, no viminfo]' '(- *)'{-h,--help}'[print help and exit]' '(- *)--version[print version information and exit]' '(* -q)-t[edit file where tag is defined]:tag:_complete_tag' @@ -90,7 +89,7 @@ arguments=( '--role[set unique role to identify main window]:role' '--socketid[open vim inside another GTK widget]:xid' '--echo-wid[echo window ID on stdout]' - '-U[use given gvimrc file instead of default .gvimrc]::rc file:_files' + '-U[use given gvimrc file instead of default .gvimrc]:gui config:->configgui' ) _arguments -C -S $arguments && ret=0 @@ -120,6 +119,23 @@ elif [[ $state = verbosity ]]; then fi (( ret )) || break done +elif [[ "$state" = config* ]]; then + _tags special files + local names=( + "NONE:'skip initialization from files and environment variables'" + "NORC:'same as NONE, but load plugins'" + ) + # gvim only supports -U NONE to skip GUI initialization. + [[ $state != configgui || $service != *g* ]] && names+=( + "DEFAULTS:'same as NONE, but loads defaults.vim'" + ) + while _tags; do + _requested special && _describe -V 'special' "(${(F)names})" && ret=0 + if _requested files expl 'rc file'; then + _files "$expl[@]" && ret=0 + fi + (( ret )) || break + done fi return ret |