summaryrefslogtreecommitdiff
path: root/runtime/doc/map.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-06-04 22:08:55 +0200
committerBram Moolenaar <Bram@vim.org>2016-06-04 22:08:55 +0200
commit63a60ded3fd584847a05dccf058026e682abad90 (patch)
treea467aacf9d2d597d2cb57dc2081a1a2c3be85671 /runtime/doc/map.txt
parentfd89d7ea81b18d32363456b16258174dc9e095dc (diff)
downloadvim-git-63a60ded3fd584847a05dccf058026e682abad90.tar.gz
patch 7.4.1898v7.4.1898
Problem: User commands don't support modifiers. Solution: Add the <mods> item. (Yegappan Lakshmanan, closes #829)
Diffstat (limited to 'runtime/doc/map.txt')
-rw-r--r--runtime/doc/map.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 3fd22f6ae..21858e099 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1411,6 +1411,27 @@ The valid escape sequences are
<bang> (See the '-bang' attribute) Expands to a ! if the
command was executed with a ! modifier, otherwise
expands to nothing.
+ *<mods>*
+ <mods> 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(<q-args>, 0, 1) |
+ \ exe '<mods> 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(<q-args>, <q-mods>)
+<
*<reg>* *<register>*
<reg> (See the '-register' attribute) The optional register,
if specified. Otherwise, expands to nothing. <register>