diff runtime/doc/map.txt @ 9230:f7fb117883ba v7.4.1898

commit https://github.com/vim/vim/commit/63a60ded3fd584847a05dccf058026e682abad90 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 4 22:08:55 2016 +0200 patch 7.4.1898 Problem: User commands don't support modifiers. Solution: Add the <mods> item. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/829)
author Christian Brabandt <cb@256bit.org>
date Sat, 04 Jun 2016 22:15:05 +0200
parents 0bdeaf7092bc
children 64035abb986b
line wrap: on
line diff
--- 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>