# HG changeset patch # User vimboss # Date 1178453279 0 # Node ID 857a5e3e1d343ab8ecd561affbb7ada153e6c122 # Parent c82da8beb64a6f5b54da019a636a49a59994e0a4 updated for version 7.1a diff --git a/runtime/autoload/gzip.vim b/runtime/autoload/gzip.vim --- a/runtime/autoload/gzip.vim +++ b/runtime/autoload/gzip.vim @@ -1,6 +1,6 @@ " Vim autoload file for editing compressed files. " Maintainer: Bram Moolenaar -" Last Change: 2006 Oct 03 +" Last Change: 2006 Oct 09 " These functions are used by the gzip plugin. @@ -177,7 +177,7 @@ endfun fun s:escape(name) " shellescape() was added by patch 7.0.111 - if v:version > 700 || (v:version == 700 && has('patch111')) + if exists("*shellescape") return shellescape(a:name) endif return "'" . a:name . "'" diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 7.0. Last change: 2007 Mar 08 +*map.txt* For Vim version 7.1a. Last change: 2007 Mar 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -227,10 +227,12 @@ text before the cursor and start omni co Be very careful about side effects! The expression is evaluated while obtaining characters, you may very well make the command dysfunctional. For this reason the following is blocked: -- changing the buffer text |textlock| -- editing another buffer -- the |:normal| command -- moving the cursor is allowed, but it is restored afterwards +- Changing the buffer text |textlock|. +- Editing another buffer. +- The |:normal| command. +- Moving the cursor is allowed, but it is restored afterwards. +- You can use getchar(), but the existing typeahead isn't seen and new + typeahead is discarded. If you want the mapping to do any of these let the returned characters do that. @@ -352,9 +354,11 @@ 1.4 LISTING MAPPINGS *map-listing* When listing mappings the characters in the first two columns are: CHAR MODE ~ - Normal, Visual and Operator-pending + Normal, Visual, Select and Operator-pending n Normal - v Visual + v Visual and Select + s Select + x Visual o Operator-pending ! Insert and Command-line i Insert @@ -590,7 +594,18 @@ the '<' flag must not be present in 'cpo :map /foocwbar :map _x d/END/e :map! qq quadrillion questions -< + + +Multiplying a count + +When you type a count before triggering a mapping, it's like the count was +typed before the {lhs}. For example, with this mapping: > + :map 3w +Typing 2 will result in "23w". Thus not moving 2 * 3 words but 23 words. +If you want to multiply counts use the expression register: > + :map @='3w' +The part between quotes is the expression being executed. |@=| + 1.9 USING MAPPINGS *map-typing* @@ -1127,7 +1142,7 @@ There are a number of attributes, split handling, completion behavior, range handling, and special cases. The attributes are described below, by category. -Argument handling *E175* *E176* +Argument handling *E175* *E176* *:command-nargs* By default, a user defined command will take no arguments (and an error is reported if any are supplied). However, it is possible to specify that the @@ -1155,8 +1170,8 @@ defined, not where it is invoked! Examp Executing script2.vim will result in "None" to be echoed. Not what you intended! Calling a function may be an alternative. -Completion behavior *:command-completion* - *E179* *E180* *E181* +Completion behavior *:command-completion* *E179* + *E180* *E181* *:command-complete* By default, the arguments of user defined commands do not undergo completion. However, by specifying one or the other of the following attributes, argument completion can be enabled: @@ -1228,13 +1243,16 @@ the 'path' option: > :endfun < -Range handling *E177* *E178* - +Range handling *E177* *E178* *:command-range* + *:command-count* By default, user-defined commands do not accept a line number range. However, it is possible to specify that the command does take a range (the -range attribute), or that it takes an arbitrary count value, either in the line number position (-range=N, like the |:split| command) or as a "count" -argument (-count=N, like the |:Next| command). Possible attributes are: +argument (-count=N, like the |:Next| command). The count will then be +available in the argument with ||. + +Possible attributes are: -range Range allowed, default is current line -range=% Range allowed, default is whole file (1,$) @@ -1247,8 +1265,8 @@ argument (-count=N, like the |:Next| com Note that -range=N and -count=N are mutually exclusive - only one should be specified. -Special cases - +Special cases *:command-bang* *:command-bar* + *:command-register* *:command-buffer* There are some special cases as well: -bang The command can take a ! modifier (like :q or :w) diff --git a/src/ex_docmd.c b/src/ex_docmd.c --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -3329,7 +3329,7 @@ set_one_cmd_context(xp, buff) /* When still after the command name expand executables. */ if (xp->xp_pattern == skipwhite(arg)) - xp->xp_context = EXPAND_SHELLCMD; + xp->xp_context = EXPAND_SHELLCMD; } #endif