~ubuntu-branches/ubuntu/maverick/vim/maverick

« back to all changes in this revision

Viewing changes to runtime/doc/map.txt

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-05-04 11:13:42 UTC
  • mfrom: (1.1.8 upstream) (0.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090504111342-60miqybsixdpc345
Tags: 2:7.2.148-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/runtime/vimrc: "syntax on" is a sane default for non-tiny vim.
  - runtime/syntax/debcontrol.vim:
    + Add "metapackages" to the list of valid sections.
  - runtime/syntax/grub.vim:
    + Add Ubuntu-specific 'quiet' keyword.
  - Drop vim-lesstif package and lesstif2-dev build-dependency.
  - Enable Python interpreter on basic builds.
  - Disable autoindent, line-wrapping, and backup files by default.
* Dropped changes, merged in Debian:
  - Add jaunty, karmic to the list of valid suites.
  - runtime/syntax/debsources.vim:
    + Add "jaunty" to debsourcesDistrKeyword
  - Create a .pot file for translations.
* Drop gutsy from the list of valid distro series, it's been EOLed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
*map.txt*       For Vim version 7.2.  Last change: 2008 Aug 09
 
1
*map.txt*       For Vim version 7.2.  Last change: 2009 Mar 15
2
2
 
3
3
 
4
4
                  VIM REFERENCE MANUAL    by Bram Moolenaar
586
586
suggestions:
587
587
- Function keys <F2>, <F3>, etc..  Also the shifted function keys <S-F1>,
588
588
  <S-F2>, etc.  Note that <F1> is already used for the help command.
589
 
- Meta-keys (with the ALT key pressed). |:map-alt-keys|
 
589
- Meta-keys (with the ALT key pressed).  Depending on your keybord accented
 
590
  characters may be used as well. |:map-alt-keys|
590
591
- Use the '_' or ',' character and then any other character.  The "_" and ","
591
592
  commands do exist in Vim (see |_| and |,|), but you probably never use them.
592
593
- Use a key that is a synonym for another command.  For example: CTRL-P and
593
594
  CTRL-N.  Use an extra character to allow more mappings.
 
595
- The key defined by <Leader> and one or more other keys.  This is especially
 
596
  useful in scripts. |mapleader|
594
597
 
595
598
See the file "index" for keys that are not used and thus can be mapped without
596
599
losing any builtin function.  You can also use ":help {key}^D" to find out if
1078
1081
It is possible to define your own Ex commands.  A user-defined command can act
1079
1082
just like a built-in command (it can have a range or arguments, arguments can
1080
1083
be completed as filenames or buffer names, etc), except that when the command
1081
 
is executed, it is transformed into a normal ex command and then executed.
 
1084
is executed, it is transformed into a normal Ex command and then executed.
1082
1085
 
1083
1086
For starters: See section |40.2| in the user manual.
1084
1087
 
1146
1149
 
1147
1150
Command attributes
1148
1151
 
1149
 
User-defined commands are treated by Vim just like any other ex commands.  They
 
1152
User-defined commands are treated by Vim just like any other Ex commands.  They
1150
1153
can have arguments, or have a range specified.  Arguments are subject to
1151
1154
completion as filenames, buffers, etc.  Exactly how this works depends upon the
1152
1155
command's attributes, which are specified when the command is defined.
1236
1239
        CursorPos       the cursor position in it (byte index)
1237
1240
The function may use these for determining context.  For the "custom"
1238
1241
argument, it is not necessary to filter candidates against the (implicit
1239
 
pattern in) ArgLead.  Vim will do filter the candidates with its regexp engine
 
1242
pattern in) ArgLead.  Vim will filter the candidates with its regexp engine
1240
1243
after function return, and this is probably more efficient in most cases. For
1241
1244
the "customlist" argument, Vim will not filter the returned completion
1242
1245
candidates and the user supplied function should filter the candidates.
1401
1404
This will invoke: >
1402
1405
        :call Allargs("%s/foo/bar/ge|update")
1403
1406
<
1404
 
When defining an user command in a script, it will be able to call functions
 
1407
When defining a user command in a script, it will be able to call functions
1405
1408
local to the script and use mappings local to the script.  When the user
1406
1409
invokes the user command, it will run in the context of the script it was
1407
1410
defined in.  This matters if |<SID>| is used in a command.