From 8a7b15cf35f9873395916487c33b817673c56d86 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Wed, 10 Aug 2016 23:52:25 -0400 Subject: vim-patch:7.4.1898 Problem: User commands don't support modifiers. Solution: Add the item. (Yegappan Lakshmanan, closes vim/vim#829) https://github.com/vim/vim/commit/63a60ded3fd584847a05dccf058026e682abad90 --- runtime/doc/map.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index c1eef398e2..4561020d22 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1406,6 +1406,27 @@ The valid escape sequences are (See the '-bang' attribute) Expands to a ! if the command was executed with a ! modifier, otherwise expands to nothing. + ** + The command modifiers, if specified. Otherwise, expands to + nothing. Supported modifiers are |aboveleft|, |belowright|, + |botright|, |browse|, |confirm|, |hide|, |keepalt|, + |keepjumps|, |keepmarks|, |keeppatterns|, |lockmarks|, + |noswapfile|, |silent|, |tab|, |topleft|, |verbose|, and + |vertical|. + Examples: > + command! -nargs=+ -complete=file MyEdit + \ for f in expand(, 0, 1) | + \ exe ' split ' . f | + \ endfor + + function! SpecialEdit(files, mods) + for f in expand(a:files, 0, 1) + exe a:mods . ' split ' . f + endfor + endfunction + command! -nargs=+ -complete=file Sedit + \ call SpecialEdit(, ) +< ** ** (See the '-register' attribute) The optional register, if specified. Otherwise, expands to nothing. -- cgit