home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / vim53os2.zip / vim-5.3 / doc / help.txt < prev    next >
Text File  |  1998-08-30  |  57KB  |  1,186 lines

  1. *help.txt*    For Vim version 5.3.  Last modification: 1998 Aug 23
  2.  
  3.             VIM - main help file
  4.                                      k
  5.       Move around:  Use the cursor keys, or "h" to go left,           h   l
  6.             "j" to go down, "k" to go up, "l" to go right.     j
  7. Close this window:  Use ":q<Enter>".
  8.    Get out of Vim:  Use ":qa!<Enter>" (careful, all changes are lost!).
  9. Jump to a subject:  Position the cursor on a tag between |bars| and hit CTRL-].
  10.    With the mouse:  ":set mouse=a" to enable the mouse (in xterm or GUI).
  11.             Double-click the left mouse button on a tag between |bars|.
  12.     jump back:  Type CTRL-T or CTRL-O.
  13. Get specific help:  It is possible to go directly to whatever you want help
  14.             on, by giving an argument to the ":help" command |:help|.
  15.             It is possible to further specify the context:
  16.               WHAT            PREPEND    EXAMPLE    ~
  17.               Normal mode commands     (nothing)   :help x
  18.               Visual mode commands      v_       :help v_u
  19.               Insert mode commands      i_       :help i_<Esc>
  20.               command-line commands      :       :help :quit
  21.               command-line editing      c_       :help c_<Del>
  22.               Vim command arguments      -       :help -r
  23.               options              '       :help 'textwidth'
  24.  
  25. VIM stands for Vi IMproved.  Most of VIM was made by Bram Moolenaar, but only
  26. through the help of a lot of people.  See |credits|.
  27. ------------------------------------------------------------------------------
  28.  tag      subject             tag      subject    ~
  29.                                  *quickref*
  30. |X_lr|    motion: Left-right        |X_km|    Key mapping
  31. |X_ud|    motion: Up-down            |X_ab|    Abbreviations
  32. |X_tm|    motion: Text object        |X_op|    Options
  33. |X_pa|    motion: Pattern searches    |X_ur|    Undo/Redo commands
  34. |X_ma|    motion: Marks            |X_et|    External commands
  35. |X_vm|    motion: Various            |X_qf|    Quickfix commands
  36. |X_ta|    motion: Using tags        |X_vc|    Various commands
  37. |X_sc|    Scrolling            |X_ce|    Ex: Command-line editing
  38. |X_in|    insert: Inserting text        |X_ra|    Ex: Ranges
  39. |X_ai|    insert: Keys            |X_ex|    Ex: Special characters
  40. |X_ss|    insert: Special keys        |X_ed|    Editing a file
  41. |X_di|    insert: Digraphs        |X_fl|    Using the argument list
  42. |X_si|    insert: Special inserts        |X_wq|    Writing and quitting
  43. |X_de|    change: Deleting text        |X_st|    Starting VIM
  44. |X_cm|    change: Copying and moving    |X_ac|    Automatic commands
  45. |X_ch|    change: Changing text        |X_wi|    Multi-window functions
  46. |X_co|    change: Complex            |X_bu|    Buffer list functions
  47. |X_vi|    Visual mode            |X_sy|    Syntax highlighting
  48. |X_to|    Text objects            |X_gu|    GUI commands
  49. |X_re|    Repeating commands
  50.  
  51. |howto.txt|    how to do the most common things
  52. |tutor|        30 minutes training course for beginners
  53. |copying|    About copying Vim and Uganda
  54. |www|        Vim on the World Wide Web
  55. |bugs|        Where to send bug reports
  56.  
  57. list of documentation files:                *doc-file-list*
  58.  
  59. |intro.txt|    introduction to Vim
  60. |help.txt|    overview and quick reference (this file)
  61. |index.txt|    alphabetical index for each mode
  62. |quotes.txt|    remarks from users of Vim
  63. |todo.txt|    known problems and desired extensions
  64.  
  65. |autocmd.txt|    automatically executing commands on an event
  66. |change.txt|    delete and replace text
  67. |cmdline.txt|    Command-line editing
  68. |digraph.txt|    list of available digraphs
  69. |editing.txt|    editing and writing files
  70. |eval.txt|    expression evaluation, conditional commands
  71. |farsi.txt|    Farsi editing
  72. |gui.txt|    Graphical User Interface
  73. |gui_w32.txt|    Win32 GUI
  74. |gui_x11.txt|    X11 GUI
  75. |insert.txt|    Insert and Replace mode
  76. |map.txt|    key mapping and abbreviations
  77. |message.txt|    (error) messages and explanations
  78. |motion.txt|    commands for moving around
  79. |options.txt|    options
  80. |pattern.txt|    regexp patterns and search commands
  81. |if_cscope.txt|    using cscope with Vim
  82. |if_perl.txt|    Perl interface
  83. |if_python.txt|    Python interface
  84. |if_ole.txt|    OLE automation interface for Win32
  85. |if_tcl.txt|    Tcl interface
  86. |quickfix.txt|    quick edit-compile-fix cycle commands
  87. |recover.txt|    recovering from a crash
  88. |repeat.txt|    repeating commands
  89. |rightleft.txt|    right-to-left editing
  90. |scroll.txt|    scrolling around
  91. |starting.txt|    starting Vim, command-line arguments, initialisation
  92. |syntax.txt|    syntax highlighting
  93. |tagsearch.txt|    tags and special searches
  94. |term.txt|    terminal and mouse
  95. |tips.txt|    tips on using Vim
  96. |uganda.txt|    Vim distribution
  97. |undo.txt|    Undo and Redo
  98. |various.txt|    various commands
  99. |version4.txt|    differences between Vim version 3.0 and 4.x
  100. |version5.txt|    differences between Vim version 4.6 and 5.x
  101. |vi_diff.txt|    main differences between Vim and Vi
  102. |visual.txt|    Visual mode
  103. |windows.txt|    commands for using multiple windows and buffers
  104.  
  105. |help-tags|    all the tags you can jump to (index of tags)
  106.  
  107. remarks about specific systems:                *sys-file-list*
  108. |os_amiga.txt|    Amiga
  109. |os_beos.txt|    BeOS/BeBox
  110. |os_dos.txt|    MS-DOS and MS-Windows NT/95 common items
  111. |os_mac.txt|    Macintosh
  112. |os_mint.txt|    Atari MiNT
  113. |os_msdos.txt|    MS-DOS (plain DOS and DOS box under Windows)
  114. |os_os2.txt|    OS/2
  115. |os_riscos.txt|    RISC OS
  116. |os_unix.txt|    Unix
  117. |os_vms.txt|    VMS
  118. |os_win32.txt|    MS-Windows NT/95
  119. ------------------------------------------------------------------------------
  120. N is used to indicate an optional count that can be given before the command.
  121. ------------------------------------------------------------------------------
  122. *X_lr*        Left-right motions
  123.  
  124. |h|    N  h        left (also: CTRL-H, <BS>, or <Left> key)
  125. |l|    N  l        right (also: <Space> or <Right> key)
  126. |0|       0        to first character in the line (also: <Home> key)
  127. |^|       ^        to first non-blank character in the line
  128. |$|    N  $        to the last character in the line (N-1 lines lower)
  129.                (also: <End> key)
  130. |g0|    N  g0        to first character in screen line (differs from "0"
  131.                when lines wrap)
  132. |g^|    N  g^        to first non-blank character in screen line (differs
  133.                from "^" when lines wrap)
  134. |g$|    N  g$        to last character in screen line (differs from "$"
  135.                when lines wrap)
  136. |bar|    N  |        to column N (default: 1)
  137. |f|    N  f<char>    to the Nth occurrence of <char> to the right
  138. |F|    N  F<char>    to the Nth occurrence of <char> to the left
  139. |t|    N  t<char>    till before the Nth occurrence of <char> to the right
  140. |T|    N  T<char>    till before the Nth occurrence of <char> to the left
  141. |;|    N  ;        repeat the last "f", "F", "t", or "T" N times
  142. |,|    N  ,        repeat the last "f", "F", "t", or "T" N times in
  143.                opposite direction
  144. ------------------------------------------------------------------------------
  145. *X_ud*        Up-down motions
  146.  
  147. |k|    N  k        up N lines (also: CTRL-P and <Up>)
  148. |j|    N  j        down N lines (also: CTRL-J, CTRL-N, <NL>, and <Down>)
  149. |-|    N  -        up N lines, on the first non-blank character
  150. |+|    N  +        down N lines, on the first non-blank character (also:
  151.                CTRL-M and <CR>)
  152. |_|    N  _        down N-1 lines, on the first non-blank character
  153. |G|    N  G        goto line N (default: last line), on the first
  154.                non-blank character
  155. |gg|    N  gg        goto line N (default: first line), on the first
  156.                non-blank character
  157. |N%|    N  %        goto line N percentage down in the file.  N must be
  158.                given, otherwise it is the |%| command.
  159. |gk|    N  gk        up N screen lines (differs from "k" when line wraps)
  160. |gj|    N  gj        down N screen lines (differs from "j" when line wraps)
  161. ------------------------------------------------------------------------------
  162. *X_tm*        Text object motions
  163.  
  164. |w|    N  w        N words forward
  165. |W|    N  W        N blank-separated WORDS forward
  166. |e|    N  e        forward to the end of the Nth word
  167. |E|    N  E        forward to the end of the Nth blank-separated WORD
  168. |b|    N  b        N words backward
  169. |B|    N  B        N blank-separated WORDS backward
  170. |ge|    N  ge        backward to the end of the Nth word
  171. |gE|    N  gE        backward to the end of the Nth blank-separated WORD
  172.  
  173. |)|    N  )        N sentences forward
  174. |(|    N  (        N sentences backward
  175. |}|    N  }        N paragraphs forward
  176. |{|    N  {        N paragraphs backward
  177. |]]|    N  ]]        N sections forward, at start of section
  178. |[[|    N  [[        N sections backward, at start of section
  179. |][|    N  ][        N sections forward, at end of section
  180. |[]|    N  []        N sections backward, at end of section
  181. |[(|    N  [(        N times back to unclosed '('
  182. |[{|    N  [{        N times back to unclosed '{'
  183. |])|    N  ])        N times forward to unclosed ')'
  184. |]}|    N  ]}        N times forward to unclosed '}'
  185. |[#|    N  [#        N times back to unclosed "#if" or "#else"
  186. |]#|    N  ]#        N times forward to unclosed "#else" or "#endif"
  187. |[star|    N  [*        N times back to start of comment "/*"
  188. |]star|    N  ]*        N times forward to end of comment "*/"
  189. ------------------------------------------------------------------------------
  190. *X_pa*        Pattern searches
  191.  
  192. |/|    N  /{pattern}[/[offset]]<CR>
  193.             search forward for the Nth occurrence of {pattern}
  194. |?|    N  ?{pattern}[?[offset]]<CR>
  195.             search backward for the Nth occurrence of {pattern}
  196. |/<CR>|    N  /<CR>    repeat last search, in the forward direction
  197. |?<CR>|    N  ?<CR>    repeat last search, in the backward direction
  198. |n|    N  n        repeat last search
  199. |N|    N  N        repeat last search, in opposite direction
  200. |star|    N  *        search forward for the identifier under the cursor
  201. |#|    N  #        search backward for the identifier under the cursor
  202. |gstar|    N  g*        like "*", but also find partial matches
  203. |g#|    N  g#        like "#", but also find partial matches
  204. |gd|       gd        goto local declaration of identifier under the cursor
  205. |gD|       gD        goto global declaration of identifier under the cursor
  206.  
  207. |pattern|        Special characters in search patterns
  208.  
  209.             meaning              magic   nomagic    ~
  210.         matches any single character    .    \.
  211.                matches start of line    ^    ^
  212.                    matches <EOL>    $    $
  213.                matches start of word    \<    \<
  214.              matches end of word    \>    \>
  215.     matches a single char from the range    [a-z]    \[a-z]
  216.       matches a single char not in the range    [^a-z]    \[^a-z]
  217.           matches an identifier char    \i    \i
  218.            idem but excluding digits    \I    \I
  219.          matches a keyword character    \k    \k
  220.            idem but excluding digits    \K    \K
  221.            matches a file name character    \f    \f
  222.            idem but excluding digits    \F    \F
  223.            matches a printable character    \p    \p
  224.            idem but excluding digits    \P    \P
  225.          matches a white space character    \s    \s
  226.      matches a non-white space character    \S    \S
  227.  
  228.                    matches <Esc>    \e    \e
  229.                    matches <Tab>    \t    \t
  230.                 matches <CR>    \r    \r
  231.                 matches <BS>    \b    \b
  232.  
  233.      matches 0 or more of the preceding atom    *    \*
  234.      matches 1 or more of the preceding atom    \+    \+
  235.     matches 0 or 1 of the preceding atom    \=    \=
  236.               separates two branches    \|    \|
  237.         group a pattern into an atom    \(\)    \(\)
  238.  
  239. |search-offset|        Offsets allowed after search command
  240.  
  241.     [num]    [num] lines downwards, in column 1
  242.     +[num]    [num] lines downwards, in column 1
  243.     -[num]    [num] lines upwards, in column 1
  244.     e[+num]    [num] characters to the right of the end of the match
  245.     e[-num]    [num] characters to the left of the end of the match
  246.     s[+num]    [num] characters to the right of the start of the match
  247.     s[-num]    [num] characters to the left of the start of the match
  248.     b[+num]    [num] characters to the right of the start (begin) of the match
  249.     b[-num]    [num] characters to the left of the start (begin) of the match
  250.     ;{search command}    execute {search command} next
  251. ------------------------------------------------------------------------------
  252. *X_ma*        Marks and motions
  253.  
  254. |m|       m<a-zA-Z>    mark current position with mark <a-zA-Z>
  255. |`a|       `<a-z>    go to mark <a-z> within current file
  256. |`A|       `<A-Z>    go to mark <A-Z> in any file
  257. |`0|       `<0-9>    go to the position where Vim was last exited
  258. |``|       ``        go to the position before the last jump
  259. |`quote|   `"        go to the position when last editing this file
  260. |`[|       `[        go to the start of the previously operated or put text
  261. |`]|       `]        go to the end of the previously operated or put text
  262. |`<|       `<        go to the start of the (previous) Visual area
  263. |`>|       `>        go to the end of the (previous) Visual area
  264. |'|       '<a-zA-Z0-9[]'"<>>
  265.             same as `, but on the first non-blank in the line
  266. |:marks|  :marks    print the active marks
  267. |CTRL-O|  N  CTRL-O    go to Nth older position in jump list
  268. |CTRL-I|  N  CTRL-I    go to Nth newer position in jump list
  269. |:ju|      :ju[mps]    print the jump list
  270. ------------------------------------------------------------------------------
  271. *X_vm*        Various motions
  272.  
  273. |%|       %        find the next brace, bracket, comment, or "#if"/
  274.                "#else"/"#endif" in this line and go to its match
  275. |H|    N  H        go to the Nth line in the window, on the first
  276.                non-blank
  277. |M|       M        go to the middle line in the window, on the first
  278.                non-blank
  279. |L|    N  L        go to the Nth line from the bottom, on the first
  280.                non-blank
  281. ------------------------------------------------------------------------------
  282. *X_ta*        Using tags
  283.  
  284. |:ta|       :ta[g][!] {tag}    Jump to tag {tag}
  285. |:ta|       :[count]ta[g][!]    Jump to [count]'th newer tag in tag list
  286. |CTRL-]|      CTRL-]        Jump to the tag under cursor, unless changes
  287.                    have been made
  288. |CTRL-T|   N  CTRL-T        Jump back from Nth older tag in tag list
  289. |:po|       :[count]po[p][!]    Jump back from [count]'th older tag in tag list
  290. |:tags|       :tags        Print tag list
  291. |:ts|       :ts[elect][!] [tag]    List matching tags and select one to jump to
  292. |:tnext|   :[count]tn[ext][!]    Jump to [count]'th next matching tag
  293. |:tp|      :[count]tp[revious][!] Jump to [count]'th previous matching tag
  294. |:tr|       :[count]tr[ewind][!] Jump to [count]'th matching tag
  295. |:tl|       :tl[ast][!]        Jump to last matching tag
  296. ------------------------------------------------------------------------------
  297. *X_sc*        Scrolling
  298.  
  299. |CTRL-E|    N  CTRL-E    window N lines downwards (default: 1)
  300. |CTRL-D|    N  CTRL-D    window N lines Downwards (default: 1/2 window)
  301. |CTRL-F|    N  CTRL-F    window N pages Forwards (downwards)
  302. |CTRL-Y|    N  CTRL-Y    window N lines upwards (default: 1)
  303. |CTRL-U|    N  CTRL-U    window N lines Upwards (default: 1/2 window)
  304. |CTRL-B|    N  CTRL-B    window N pages Backwards (upwards)
  305. |z<CR>|           z<CR> or zt    redraw, current line at top of window
  306. |z.|           z.     or zz    redraw, current line at center of window
  307. |z-|           z-     or zb    redraw, current line at bottom of window
  308.  
  309. |zh|        N  zh        scroll screen N characters to the right
  310. |zl|        N  zl        scroll screen N characters to the left
  311. ------------------------------------------------------------------------------
  312. *X_in*        Inserting text
  313.  
  314. |a|    N  a    append text after the cursor (N times)
  315. |A|    N  A    append text at the end of the line (N times)
  316. |i|    N  i    insert text before the cursor (N times) (also: <Insert>)
  317. |I|    N  I    insert text before the first non-blank in the line (N times)
  318. |gI|    N  gI    insert text in column 1 (N times)
  319. |o|    N  o    open a new line below the current line, append text (N times)
  320. |O|    N  O    open a new line above the current line, append text (N times)
  321. ------------------------------------------------------------------------------
  322. *X_ai*        Keys in Insert mode
  323.  
  324.          char            action in Insert mode    ~
  325. |i_<Esc>|    <Esc>          end Insert mode, back to Normal mode
  326. |i_CTRL-C|    CTRL-C          like <Esc>, but do not do an abbreviation
  327. |i_CTRL-A|    CTRL-A          insert previously inserted text
  328. |i_CTRL-@|    CTRL-@          insert previously inserted text and stop
  329.                      insert
  330. |i_CTRL-R|    CTRL-R <0-9a-z%#:.-=">  insert the contents of a register
  331. |i_<NL>|    <NL> or <CR> or CTRL-M or CTRL-J
  332.                   begin new line
  333. |i_CTRL-E|    CTRL-E          insert the character from below the cursor
  334. |i_CTRL-Y|    CTRL-Y          insert the character from above the cursor
  335. |i_CTRL-V|    CTRL-V <char>..      insert character literally, or enter decimal
  336.                      byte value
  337. |i_CTRL-N|    CTRL-N          insert next match of identifier before the
  338.                      cursor
  339. |i_CTRL-P|    CTRL-P          insert previous match of identifier before
  340.                      the cursor
  341. |i_CTRL-X|    CTRL-X ...      complete the word before the cursor in
  342.                      various ways
  343. |i_<BS>|    <BS> or CTRL-H      delete the character before the cursor
  344. |i_<Del>|    <Del>          delete the character under the cursor
  345. |i_CTRL-W|    CTRL-W          delete word before the cursor
  346. |i_CTRL-U|    CTRL-U          delete all entered characters in the current
  347.                      line
  348. |i_CTRL-T|    CTRL-T          insert one shiftwidth of indent in front of
  349.                        the current line
  350. |i_CTRL-D|    CTRL-D          delete one shiftwidth of indent in front of
  351.                      the current line
  352. |i_0_CTRL-D|    0 CTRL-D      delete all indent in the current line
  353. |i_^_CTRL-D|    ^ CTRL-D      delete all indent in the current line,
  354.                      restore indent in next line
  355. |i_CTRL-K|    CTRL-K {char1} {char2}
  356.                   enter digraph (See |X_di|)
  357. |i_digraph|    {char1} <BS> {char2}
  358.                   enter digraph if 'digraph' option set
  359. ------------------------------------------------------------------------------
  360. *X_ss*        Special keys in Insert mode
  361.  
  362. |i_<Up>|    cursor keys      move cursor left/right/up/down
  363. |i_<S-Left>|    shift-left/right  one word left/right
  364. |i_<S-Up>|    shift-up/down      one screenful backward/forward
  365. |i_CTRL-O|    CTRL-O {command}  execute {command}
  366. |i_<End>|    <End>          cursor after last character in the line
  367. |i_<Home>|    <Home>          cursor to first character in the line
  368. ------------------------------------------------------------------------------
  369. *X_di*        Digraphs
  370.  
  371. |:dig|       :dig[raphs]        show current list of digraphs
  372. |:dig|       :dig[raphs] {char1}{char2} {number} ...
  373.                 add digraph(s) to the list
  374. ------------------------------------------------------------------------------
  375. *X_si*        Special inserts
  376.  
  377. |:r|       :r [file]       insert the contents of [file] below the cursor
  378. |:r!|       :r! {command}   insert the standard output of {command} below the
  379.                   cursor
  380. ------------------------------------------------------------------------------
  381. *X_de*        Deleting text
  382.  
  383. |x|    N  x        delete N characters under and after the cursor
  384. |<Del>| N  <Del>    delete N characters under and after the cursor
  385. |X|    N  X        delete N characters before the cursor
  386. |d|    N  d{motion}    delete the text that is moved over with {motion}
  387. |v_d|    {visual}d    delete the highlighted text
  388. |dd|    N  dd        delete N lines
  389. |D|    N  D        delete to the end of the line (and N-1 more lines)
  390. |J|    N  J        join N-1 lines (delete <EOL>s)
  391. |v_J|    {visual}J    join the highlighted lines
  392. |gJ|    N  gJ        like "J", but without inserting spaces
  393. |v_gJ|    {visual}gJ    like "{visual}J", but without inserting spaces
  394. |:d|    :[range]d [x]    delete [range] lines [into register x]
  395. ------------------------------------------------------------------------------
  396. *X_cm*        Copying and moving text
  397.  
  398. |quote|      "<char>    use register <char> for the next delete, yank, or put
  399. |:reg|      :reg        show the contents of all registers
  400. |:reg|      :reg {arg}    show the contents of registers mentioned in {arg}
  401. |y|      N  y{motion}    yank the text moved over with {motion} into a register
  402. |v_y|         {visual}y    yank the highlighted text into a register
  403. |yy|      N  yy        yank N lines into a register
  404. |Y|      N  Y        yank N lines into a register
  405. |p|      N  p        put a register after the cursor position (N times)
  406. |P|      N  P        put a register before the cursor position (N times)
  407. |]p|      N  ]p        like p, but adjust indent to current line
  408. |[p|      N  [p        like P, but adjust indent to current line
  409. |gp|      N  gp        like p, but leave cursor after the new text
  410. |gP|      N  gP        like P, but leave cursor after the new text
  411. ------------------------------------------------------------------------------
  412. *X_ch*        Changing text
  413.  
  414. |R|      N  R        enter Replace mode (repeat the entered text N times)
  415. |c|      N  c{motion}    change the text that is moved over with {motion}
  416. |v_c|         {visual}c    change the highlighted text
  417. |cc|      N  cc        change N lines
  418. |S|      N  S        change N lines
  419. |C|      N  C        change to the end of the line (and N-1 more lines)
  420. |s|      N  s        change N characters
  421. |r|      N  r<char>    replace N characters with <char>
  422.  
  423. |~|      N  ~        switch case for N characters and advance cursor
  424. |v_~|         {visual}~    switch case for highlighted text
  425. |v_u|         {visual}u    make highlighted text lowercase
  426. |v_U|         {visual}U    make highlighted text uppercase
  427. |g~|         g~{motion} switch case for the text that is moved over with
  428.                {motion}
  429. |gu|         gu{motion} make the text that is moved over with {motion}
  430.                lowercase
  431. |gU|         gU{motion} make the text that is moved over with {motion}
  432.                uppercase
  433.  
  434. |CTRL-A|  N  CTRL-A    add N to the number at or after the cursor
  435. |CTRL-X|  N  CTRL-X    subtract N from the number at or after the cursor
  436.  
  437. |<|      N  <{motion}    move the lines that are moved over with {motion} one
  438.                shiftwidth left
  439. |<<|      N  <<        move N lines one shiftwidth left
  440. |>|      N  >{motion}    move the lines that are moved over with {motion} one
  441.                shiftwidth right
  442. |>>|      N  >>        move N lines one shiftwidth right
  443. |gq|      N  gq{motion}    format the lines that are moved over with {motion} to
  444.                'textwidth' length
  445. |:ce|      :[range]ce[nter] [width]
  446.             center the lines in [range]
  447. |:le|      :[range]le[ft] [indent]
  448.             left-align the lines in [range] [with indent]
  449. |:ri|      :[range]ri[ght] [width]
  450.             right-align the lines in [range]
  451. ------------------------------------------------------------------------------
  452. *X_co*        Complex changes
  453.  
  454. |!|       N  !{motion}{command}<CR>
  455.             filter the lines that are moved over through {command}
  456. |!!|       N  !!{command}<CR>
  457.             filter N lines through {command}
  458. |v_!|          {visual}!{command}<CR>
  459.             filter the highlighted lines through {command}
  460. |:range!|  :[range]! {command}<CR>
  461.             filter [range] lines through {command}
  462. |=|       N  ={motion}
  463.             filter the lines that are moved over through "indent"
  464. |==|       N  ==    filter N lines through "indent"
  465. |v_=|          {visual}=
  466.             filter the highlighted lines through "indent"
  467. |:s|       :[range]s[ubstitute]/{pattern}/{string}/[g][c]
  468.             substitute {pattern} by {string} in [range] lines;
  469.                with [g], replace all occurrences of {pattern};
  470.                with [c], confirm each replacement
  471. |:s|       :[range]s[ubstitute] [g][c]
  472.             repeat previous ":s" with new range and options
  473. |&|          &        Repeat previous ":s" on current line without options
  474. |:ret|       :[range]ret[ab][!] [tabstop]
  475.             set 'tabstop' to new value and adjust white space
  476.                accordingly
  477. ------------------------------------------------------------------------------
  478. *X_vi*        Visual mode
  479.  
  480. |v|       v        start highlighting characters  }  move cursor and use
  481. |V|       V        start highlighting linewise    }  operator to affect
  482. |CTRL-V|   CTRL-V    start highlighting blockwise   }  highlighted text
  483. |v_o|       o        exchange cursor position with start of highlighting
  484. |gv|       gv        start highlighting on previous visual area
  485. |v_v|       v        highlight characters or stop highlighting
  486. |v_V|       V        highlight linewise or stop highlighting
  487. |v_CTRL-V| CTRL-V    highlight blockwise or stop highlighting
  488. ------------------------------------------------------------------------------
  489. *X_to*        Text objects (only in Visual mode or after an operator)
  490.  
  491. |v_aw|    N  aw        Select "a word"
  492. |v_iw|    N  iw        Select "inner word"
  493. |v_aW|    N  aW        Select "a WORD"
  494. |v_iW|    N  iW        Select "inner WORD"
  495. |v_as|    N  as        Select "a sentence"
  496. |v_is|    N  is        Select "inner sentence"
  497. |v_ap|    N  ap        Select "a paragraph"
  498. |v_ip|    N  ip        Select "inner paragraph"
  499. |v_ab|    N  ab        Select "a block" (from "[(" to "])")
  500. |v_ib|    N  ib        Select "inner block" (from "[(" to "])")
  501. |v_aB|    N  aB        Select "a Block" (from "[{" to "]}")
  502. |v_iB|    N  iB        Select "inner Block" (from "[{" to "]}")
  503. ------------------------------------------------------------------------------
  504. *X_re*        Repeating commands
  505.  
  506. |.|       N  .        repeat last change (with count replaced with N)
  507. |q|          q<a-z>    record typed characters into register <a-z>
  508. |q|          q<A-Z>    record typed characters, appended to register <a-z>
  509. |q|          q        stop recording
  510. |@|       N  @<a-z>    execute the contents of register <a-z> (N times)
  511. |@@|       N  @@       repeat previous @<a-z> (N times)
  512. |:@|       :@<a-z>    execute the contents of register <a-z> as an Ex
  513.                command
  514. |:@@|       :@@        repeat previous :@<a-z>
  515. |:g|       :[range]g[lobal]/{pattern}/[cmd]
  516.             Execute Ex command [cmd] (default: ":p") on the lines
  517.                within [range] where {pattern} matches.
  518. |:g|       :[range]g[lobal]!/{pattern}/[cmd]
  519.             Execute Ex command [cmd] (default: ":p") on the lines
  520.                within [range] where {pattern} does NOT match.
  521. |:so|       :so[urce] {file}
  522.             Read Ex commands from {file}.
  523. |:so|       :so[urce]! {file}
  524.             Read Vim commands from {file}.
  525. |:sl|       :sl[eep] [N]
  526.             don't do anything for N seconds
  527. |gs|       N  gs    Goto Sleep for N seconds
  528. ------------------------------------------------------------------------------
  529. *X_km*        Key mapping
  530.  
  531. |:map|         :ma[p] {lhs} {rhs}      Map {lhs} to {rhs} in Normal and Visual
  532.                      mode.
  533. |:map!|         :ma[p]! {lhs} {rhs}  Map {lhs} to {rhs} in Insert and Command-line
  534.                      mode.
  535. |:noremap|   :no[remap][!] {lhs} {rhs}
  536.                   Same as ":map", no remapping for this {rhs}
  537. |:unmap|     :unm[ap] {lhs}      Remove the mapping of {lhs} for Normal and
  538.                      Visual mode.
  539. |:unmap!|    :unm[ap]! {lhs}      Remove the mapping of {lhs} for Insert and
  540.                      Command-line mode.
  541. |:map_l|     :ma[p] [lhs]      List mappings (starting with [lhs]) for
  542.                      Normal and Visual mode.
  543. |:map_l!|    :ma[p]! [lhs]      List mappings (starting with [lhs]) for
  544.                      Insert and Command-line mode.
  545. |:cmap|         :cmap/:cunmap/:cnoremap
  546.                   like ":map!"/":unmap!"/":noremap!" but for
  547.                      Command-line mode only
  548. |:imap|         :imap/:iunmap/:inoremap
  549.                   like ":map!"/":unmap!"/":noremap!" but for
  550.                      Insert mode only
  551. |:nmap|         :nmap/:nunmap/:nnoremap
  552.                   like ":map"/":unmap"/":noremap" but for
  553.                      Normal mode only
  554. |:vmap|         :vmap/:vunmap/:vnoremap
  555.                   like ":map"/":unmap"/":noremap" but for
  556.                      Visual mode only
  557. |:omap|         :omap/:ounmap/:onoremap
  558.                   like ":map"/":unmap"/":noremap" but only for
  559.                      when an operator is pending
  560. |:mkexrc|    :mk[exrc][!] [file]  write current mappings, abbreviations, and
  561.                      settings to [file] (default: ".exrc";
  562.                      use ! to overwrite)
  563. |:mkvimrc|   :mkv[imrc][!] [file]
  564.                   same as ":mkexrc", but with default ".vimrc"
  565. |:mksession| :mks[ession][!] [file]
  566.                   like ":mkvimrc", but store current files
  567.                      and directory too
  568. |:mapc|      :mapc[lear]      remove mappings for Normal and Visual mode
  569. |:mapc|      :mapc[lear]!      remove mappings for Insert and Cmdline mode
  570. |:imapc|     :imapc[lear]      remove mappings for Insert mode
  571. |:vmapc|     :vmapc[lear]      remove mappings for Visual mode
  572. |:omapc|     :omapc[lear]      remove mappings for Operator-pending mode
  573. |:nmapc|     :nmapc[lear]      remove mappings for Normal mode
  574. |:cmapc|     :cmapc[lear]      remove mappings for Cmdline mode
  575. ------------------------------------------------------------------------------
  576. *X_ab*        Abbreviations
  577.  
  578. |:abbreviate|    :ab[breviate] {lhs} {rhs}  add abbreviation for {lhs} to {rhs}
  579. |:abbreviate|    :ab[breviate] {lhs}       show abbr's that start with {lhs}
  580. |:abbreviate|    :ab[breviate]           show all abbreviations
  581. |:unabbreviate|    :una[bbreviate] {lhs}       remove abbreviation for {lhs}
  582. |:noreabbrev|    :norea[bbrev] [lhs] [rhs]  like ":ab", but don't remap [rhs]
  583. |:iabbrev|    :iab/:iunab/:inoreab       like ":ab", but only for Insert mode
  584. |:cabbrev|    :cab/:cunab/:cnoreab       like ":ab", but only for
  585.                         Command-line mode
  586. |:abclear|    :abc[lear]           remove all abbreviations
  587. |:cabclear|    :cabc[lear]           remove all abbr's for Cmdline mode
  588. |:iabclear|    :iabc[lear]           remove all abbr's for Insert mode
  589. ------------------------------------------------------------------------------
  590. *X_op*        Options
  591.  
  592. |:set|    :se[t]            Show all modified options.
  593. |:set|    :se[t] all        Show all options.
  594. |:set|    :se[t] {option}        Set boolean option (switch it on), show string
  595.                    or number option.
  596. |:set|    :se[t] no{option}    Reset boolean option (switch it off).
  597. |:set|    :se[t] inv{option}    invert boolean option.
  598. |:set|    :se[t] {option}={value} Set string or number option to {value}.
  599. |:set|    :se[t] {option}?    Show value of {option}.
  600. |:set|    :se[t] {option}&    Reset {option} to its default value.
  601.  
  602. |:fix|    :fix[del]        Set value of 't_kD' according to value of
  603.                    't_kb'.
  604.  
  605. Short explanation of each option:        *option-list*
  606. |'aleph'|       |'al'|    ASCII code of the letter Aleph (Hebrew)
  607. |'allowrevins'|       |'ari'|    allow CTRL-_ in Insert and Comamnd-line mode
  608. |'altkeymap'|       |'akm'|    for default second laguage (Farsi/Hebrew)
  609. |'autoindent'|       |'ai'|    take indent for new line from previous line
  610. |'autowrite'|       |'aw'|    automatically write file if changed
  611. |'background'|       |'bg'|    "dark" or "light", used for highlight colors
  612. |'backspace'|       |'bs'|    how backspace works at start of line
  613. |'backup'|       |'bk'|    keep backup file after overwriting a file
  614. |'backupdir'|       |'bdir'|    list of directories for the backup file
  615. |'backupext'|       |'bex'|    extension used for the backup file
  616. |'binary'|       |'bin'|    edit binary file mode
  617. |'bioskey'|       |'biosk'|    MS-DOS: use bios calls for input characters
  618. |'breakat'|       |'brk'|    characters that may cause a line break
  619. |'browsedir'|       |'bsdir'|    which directory to start browsing in
  620. |'cindent'|       |'cin'|    do C program indenting
  621. |'cinkeys'|       |'cink'|    keys that trigger indent when 'cindent' is set
  622. |'cinoptions'|       |'cino'|    how to do indenting when 'cindent' is set
  623. |'cinwords'|       |'cinw'|    words where 'si' and 'cin' add an indent
  624. |'cmdheight'|       |'ch'|    number of lines to use for the command-line
  625. |'columns'|       |'co'|    number of columns in the display
  626. |'comments'|       |'com'|    patterns that can start a comment line
  627. |'compatible'|       |'cp'|    behave Vi-compatible as much as possible
  628. |'complete'|       |'cpt'|    specify how Insert mode completion works
  629. |'confirm'|       |'cf'|    ask what to do about unsaved/read-only files
  630. |'cpoptions'|       |'cpo'|    flags for Vi-compatible behaviour
  631. |'cscopeprg'|       |'csprg'|    command to execute cscope
  632. |'cscopetag'|       |'cst'|    use cscope for tag commands
  633. |'cscopetagorder'| |'csto'|    determines ":cstag" search order
  634. |'cscopeverbose'|  |'csverb'|    give messages when adding a cscope database
  635. |'define'|       |'def'|    pattern to be used to find a macro definition
  636. |'dictionary'|       |'dict'|    list of file names used for keyword completion
  637. |'digraph'|       |'dg'|    enable the entering of digraphs in Insert mode
  638. |'directory'|       |'dir'|    list of directory names for the swap file
  639. |'edcompatible'|   |'ed'|    toggle flags of ":substitute" command
  640. |'endofline'|       |'eol'|    write <EOL> for last line in file
  641. |'equalalways'|    |'ea'|    windows are automatically made the same size
  642. |'equalprg'|       |'ep'|    external program to use for "=" command
  643. |'errorbells'|       |'eb'|    ring the bell for error messages
  644. |'errorfile'|       |'ef'|    name of the errorfile for the QuickFix mode
  645. |'errorformat'|    |'efm'|    description of the lines in the error file
  646. |'esckeys'|       |'ek'|    recognize function keys in Insert mode
  647. |'eventignore'|       |'ei'|    autocommand events that are ignored
  648. |'expandtab'|       |'et'|    use spaces when <Tab> is inserted
  649. |'exrc'|       |'ex'|    read .vimrc and .exrc in the current directory
  650. |'fileformat'|       |'ff'|    file format used for file I/O
  651. |'fileformats'|       |'ffs'|    automatically detected values for 'fileformat'
  652. |'filetype'|       |'ft'|    system-specific filetype information
  653. |'fkmap'|       |'fk'|    Farsi keyboard mapping
  654. |'formatoptions'|  |'fo'|    how automatic formatting is to be done
  655. |'formatprg'|       |'fp'|    name of external program used with "gq" command
  656. |'gdefault'|       |'gd'|    the ":substitute" flag 'g' is default on
  657. |'grepformat'|       |'gfm'|    format of 'grepprg' output
  658. |'grepprg'|       |'gp'|    program to use for ":grep"
  659. |'guicursor'|       |'gcr'|    GUI: settings for cursor shape and blinking
  660. |'guifont'|       |'gfn'|    GUI: Name(s) of font(s) to be used
  661. |'guioptions'|       |'go'|    GUI: Which components and options are used
  662. |'guipty'|            GUI: try to use a pseudo-tty for ":!" commands
  663. |'helpfile'|       |'hf'|    name of this help file
  664. |'helpheight'|       |'hh'|    minimum height of a new help window
  665. |'hidden'|       |'hid'|    don't unload buffer when it is abandoned
  666. |'highlight'|       |'hl'|    sets highlighting mode for various occasions
  667. |'hlsearch'|       |'hls'|    highlight matches with last search pattern
  668. |'history'|       |'hi'|    number of command-lines that are remembered
  669. |'hkmap'|       |'hk'|    Hebrew keyboard mapping
  670. |'icon'|            set icon of the window to the name of the file
  671. |'iconstring'|            string to use for the Vim icon
  672. |'ignorecase'|       |'ic'|    ignore case in search patterns
  673. |'include'|       |'inc'|    pattern to be used to find an include file
  674. |'incsearch'|       |'is'|    highlight match while typing search pattern
  675. |'infercase'|       |'inf'|    adjust case of match for keyword completion
  676. |'insertmode'|       |'im'|    start the edit of a file in Insert mode
  677. |'isfname'|       |'isf'|    characters included in file names and pathnames
  678. |'isident'|       |'isi'|    characters included in identifiers
  679. |'isprint'|       |'isp'|    printable characters
  680. |'iskeyword'|       |'isk'|    characters included in keywords
  681. |'joinspaces'|       |'js'|    two spaces after a period with a join command
  682. |'keymodel'|       |'km'|    enable starting/stopping selection with keys
  683. |'keywordprg'|       |'kp'|    program to use for the "K" command
  684. |'langmap'|       |'lmap'|    alphabetic characters for other language mode
  685. |'laststatus'|       |'ls'|    tells when last window has status lines
  686. |'lazyredraw'|       |'lz'|    don't redraw while executing macros
  687. |'linebreak'|       |'lbr'|    wrap long lines at a blank
  688. |'lines'|            number of lines in the display
  689. |'lisp'|            automatic indenting for Lisp
  690. |'list'|            show <Tab> and <EOL>
  691. |'listchars'|       |'lcs'|    characters for displaying in list mode
  692. |'magic'|            changes special characters in search patterns
  693. |'makeef'|       |'mef'|    name of the errorfile for ":make"
  694. |'makeprg'|       |'mp'|    program to use for the ":make" command
  695. |'matchtime'|       |'mat'|    tenths of a second to show matching paren
  696. |'maxfuncdepth'|   |'mfd'|    maximum recursive depth for user functions
  697. |'maxmapdepth'|    |'mmd'|    maximum recursive depth for mapping
  698. |'maxmem'|       |'mm'|    maximum memory (in Kbyte) used for one buffer
  699. |'maxmemtot'|       |'mmt'|    maximum memory (in Kbyte) used for all buffers
  700. |'modeline'|       |'ml'|    recognize modelines at start or end of file
  701. |'modelines'|       |'mls'|    number of lines checked for modelines
  702. |'modified'|       |'mod'|    buffer has been modified
  703. |'more'|            pause listings when the whole screen is filled
  704. |'mouse'|            enable the use of mouse clicks
  705. |'mousefocus'|       |'mousef'|    keyboard focus follows the mouse
  706. |'mousehide'|       |'mh'|    hide mouse pointer while typing
  707. |'mousemodel'|       |'mousem'|    changes meaning of mouse buttons
  708. |'mousetime'|       |'mouset'|    max time between mouse double-click
  709. |'nrformats'|       |'nf'|    number formats recognized for CTRL-A command
  710. |'number'|       |'nu'|    print the line number in front of each line
  711. |'paragraphs'|       |'para'|    nroff macros that separate paragraphs
  712. |'paste'|            allow pasting text
  713. |'patchmode'|       |'pm'|    keep the oldest version of a file
  714. |'path'|       |'pa'|    list of directories searched with "gf" et.al.
  715. |'readonly'|       |'ro'|    disallow writing the buffer
  716. |'remap'|            allow mappings to work recursively
  717. |'report'|            threshold for reporting nr. of lines changed
  718. |'restorescreen'|  |'rs'|    Win32: restore screen when exiting
  719. |'revins'|       |'ri'|    inserting characters will work backwards
  720. |'rightleft'|       |'rl'|    window is right-to-left oriented
  721. |'ruler'|       |'ru'|    show cursor line and column in the status line
  722. |'scroll'|       |'scr'|    lines to scroll with CTRL-U and CTRL-D
  723. |'scrolljump'|       |'sj'|    minimum number of lines to scroll
  724. |'scrolloff'|       |'so'|    minimum nr. of lines above and below cursor
  725. |'sections'|       |'sect'|    nroff macros that separate sections
  726. |'secure'|            secure mode for reading .vimrc in current dir
  727. |'selection'|       |'sel'|    what type of selection to use
  728. |'selectmode'|       |'slm'|    when to use Select mode instead of Visual mode
  729. |'sessionoptions'| |'ssop'|    options for |:mksession|
  730. |'shell'|       |'sh'|    name of shell to use for external commands
  731. |'shellcmdflag'|   |'shcf'|    flag to shell to execute one command
  732. |'shellpipe'|       |'sp'|    string to put output of ":make" in error file
  733. |'shellquote'|       |'shq'|    quote character(s) for around shell command
  734. |'shellredir'|       |'srr'|    string to put output of filter in a temp file
  735. |'shelltype'|       |'st'|    Amiga: influences how to use a shell
  736. |'shellxquote'|       |'sxq'|    like 'shellquote', but include redirection
  737. |'shiftround'|       |'sr'|    round indent to multiple of shiftwidth
  738. |'shiftwidth'|       |'sw'|    number of spaces to use for (auto)indent step
  739. |'shortmess'|       |'shm'|    list of flags, reduce length of messages
  740. |'shortname'|       |'sn'|    non-MS-DOS: Filenames assumed to be 8.3 chars
  741. |'showbreak'|       |'sbr'|    string to use at the start of wrapped lines
  742. |'showcmd'|       |'sc'|    show (partial) command in status line
  743. |'showfulltag'|       |'sft'|    show full tag pattern when completing tag
  744. |'showmatch'|       |'sm'|    briefly jump to matching bracket if insert one
  745. |'showmode'|       |'smd'|    message on status line to show current mode
  746. |'sidescroll'|       |'ss'|    minimum number of columns to scroll horizontal
  747. |'smartcase'|       |'scs'|    no ignore case when pattern has uppercase
  748. |'smartindent'|    |'si'|    smart autoindenting for C programs
  749. |'smarttab'|       |'sta'|    use 'shiftwidth' when inserting <Tab>
  750. |'softtabstop'|       |'sts'|    number of spaces that <Tab> uses while editing
  751. |'splitbelow'|       |'sb'|    new window from split is below the current one
  752. |'startofline'|    |'sol'|    commands move cursor to first blank in line
  753. |'suffixes'|       |'su'|    suffixes that are ignored with multiple match
  754. |'swapfile'|       |'swf'|    whether to use a swapfile for a buffer
  755. |'swapsync'|       |'sws'|    how to sync the swap file
  756. |'syntax'|       |'syn'|    syntax to be loaded for current buffer
  757. |'tabstop'|       |'ts'|    number of spaces that <Tab> in file uses
  758. |'taglength'|       |'tl'|    number of significant characters for a tag
  759. |'tagrelative'|    |'tr'|    file names in tag file are relative
  760. |'tags'|       |'tag'|    list of file names used by the tag command
  761. |'term'|            name of the terminal
  762. |'terse'|            shorten some messages
  763. |'textauto'|       |'ta'|    obsolete, use 'fileformats'
  764. |'textmode'|       |'tx'|    obsolete, use 'fileformat'
  765. |'textwidth'|       |'tw'|    maximum width of text that is being inserted
  766. |'tildeop'|       |'top'|    tilde command "~" behaves like an operator
  767. |'timeout'|       |'to'|    time out on mappings and key codes
  768. |'ttimeout'|            time out on mappings
  769. |'timeoutlen'|       |'tm'|    time out time in milliseconds
  770. |'ttimeoutlen'|       |'ttm'|    time out time for key codes in milliseconds
  771. |'title'|            set title of window to the name of the file
  772. |'titlestring'|            title to use for the Vim window
  773. |'ttybuiltin'|       |'tbi'|    use built-in termcap before external termcap
  774. |'ttyfast'|       |'tf'|    indicates a fast terminal connection
  775. |'ttymouse'|       |'ttym'|    type of mouse codes generated
  776. |'ttyscroll'|       |'tsl'|    maximum number of lines for a scroll
  777. |'ttytype'|       |'tty'|    alias for 'term'
  778. |'undolevels'|       |'ul'|    maximum number of changes that can be undone
  779. |'updatecount'|    |'uc'|    after this many characters flush swap file
  780. |'updatetime'|       |'ut'|    after this many milliseconds flush swap file
  781. |'verbose'|       |'vbs'|    give informative messages
  782. |'viminfo'|       |'vi'|    use .viminfo file upon startup and exiting
  783. |'visualbell'|       |'vb'|    use visual bell instead of beeping
  784. |'warn'|            warn for shell command when buffer was changed
  785. |'weirdinvert'|    |'wi'|    for terminals that have weird inversion method
  786. |'whichwrap'|       |'ww'|    allow specified keys to cross line boundaries
  787. |'wildchar'|       |'wc'|    command-line character for wildcard expansion
  788. |'wildignore'|       |'wig'|    files matching these patterns are not completed
  789. |'wildmode'|       |'wim'|    mode for 'wilchar' command-line expansion
  790. |'winaltkeys'|       |'wak'|    when the windows system handles ALT keys
  791. |'winheight'|       |'wh'|    minimum number of lines for the current window
  792. |'winminheight'|   |'wmh'|    minimum number of lines for any window
  793. |'wrap'|            long lines wrap and continue on the next line
  794. |'wrapmargin'|       |'wm'|    chars from the right where wrapping starts
  795. |'wrapscan'|       |'ws'|    searches wrap around the end of the file
  796. |'writeany'|       |'wa'|    write to file with no need for "!" override
  797. |'writebackup'|    |'wb'|    make a backup before overwriting a file
  798. |'writedelay'|       |'wd'|    delay this many msec for each char (for debug)
  799. ------------------------------------------------------------------------------
  800. *X_ur*        Undo/Redo commands
  801.  
  802. |u|      N  u        undo last N changes
  803. |CTRL-R|  N  CTRL-R    redo last N undone changes
  804. |U|         U        restore last changed line
  805. ------------------------------------------------------------------------------
  806. *X_et*        External commands
  807.  
  808. |:shell|    :sh[ell]    start a shell
  809. |:!|        :!{command}    execute {command} with a shell
  810. |K|           K        lookup keyword under the cursor with
  811.                    'keywordprg' program (default: "man")
  812. ------------------------------------------------------------------------------
  813. *X_qf*        Quickfix commands
  814.  
  815. |:cc|        :cc [nr]    display error [nr] (default is the same again)
  816. |:cnext|    :cn        display the next error
  817. |:cprevious|    :cp        display the previous error
  818. |:clist|    :cl        list all errors
  819. |:cfile|    :cf        read errors from the file 'errorfile'
  820. |:cquit|    :cq        quit without writing and return error code (to
  821.                    the compiler)
  822. |:make|        :make [args]    start make, read errors, and jump to first
  823.                    error
  824. ------------------------------------------------------------------------------
  825. *X_vc*        Various commands
  826.  
  827. |CTRL-L|       CTRL-L    Clear and redraw the screen.
  828. |CTRL-G|       CTRL-G    show current file name (with path) and cursor
  829.                    position
  830. |ga|           ga        show ascii value of character under cursor in
  831.                    decimal, hex, and octal
  832. |g_CTRL-G|       g CTRL-G    show cursor column, line, and character
  833.                    position
  834. |CTRL-C|       CTRL-C    during searches: Interrupt the search
  835. |dos-CTRL-Break|   CTRL-Break    MS-DOS: during searches: Interrupt the search
  836. |<Del>|           <Del>    while entering a count: delete last character
  837. |:version|    :ve[rsion]    show version information
  838. |:mode|        :mode N        MS-DOS: set screen mode to N (number, C80,
  839.                    C4350, etc.)
  840. |:normal|    :norm[al][!] {commands}
  841.                 Execute Normal mode commands.
  842. |Q|        Q        switch to "Ex" mode
  843. |:redir|    :redir >{file}    redirect messages to {file}
  844. |:confirm|    :confirm {command}    quit, write, etc., asking about
  845.                    unsaved changes or read-only files.
  846. ------------------------------------------------------------------------------
  847. *X_ce*        Command-line editing
  848.  
  849. |c_<Esc>|    <Esc>           abandon command-line (if 'wildchar' is
  850.                       <Esc>, type it twice)
  851.  
  852. |c_CTRL-V|    CTRL-V {char}       insert {char} literally
  853. |c_CTRL-V|    CTRL-V {number}    enter decimal value of character (up to
  854.                       three digits)
  855. |c_CTRL-K|    CTRL-K {char1} {char2}
  856.                    enter digraph (See |X_di|)
  857. |c_CTRL-R|    CTRL-R <0-9a-z"%#:-=>
  858.                    insert the contents of a register
  859.  
  860. |c_<Left>|    <Left>/<Right>       cursor left/right
  861. |c_<S-Left>|    <S-Left>/<S-Right> cursor one word left/right
  862. |c_CTRL-B|    CTRL-B/CTRL-E       cursor to beginning/end of command-line
  863.  
  864. |c_<BS>|    <BS>           delete the character in front of the cursor
  865. |c_<Del>|    <Del>           delete the character under the cursor
  866. |c_CTRL-W|    CTRL-W           delete the word in front of the cursor
  867. |c_CTRL-U|    CTRL-U           remove all characters
  868.  
  869. |c_<Up>|    <Up>/<Down>       recall older/newer command-line that starts
  870.                       with current command
  871. |c_<S-Up>|    <S-Up>/<S-Down>       recall older/newer command-line from history
  872.  
  873.     Context-sensitive completion on the command-line:
  874.  
  875. |c_wildchar|    'wildchar'  (default: <Tab>)
  876.                 do completion on the pattern in front of the
  877.                    cursor.  If there are multiple matches,
  878.                    beep and show the first one; further
  879.                    'wildchar' will show the next ones.
  880. |c_CTRL-D|    CTRL-D        list all names that match the pattern in
  881.                    front of the cursor
  882. |c_CTRL-A|    CTRL-A        insert all names that match pattern in front
  883.                    of cursor
  884. |c_CTRL-L|    CTRL-L        insert longest common part of names that
  885.                    match pattern
  886. |c_CTRL-N|    CTRL-N        after 'wildchar' with multiple matches: go
  887.                    to next match
  888. |c_CTRL-P|    CTRL-P        after 'wildchar' with multiple matches: go
  889.                    to previous match
  890. ------------------------------------------------------------------------------
  891. *X_ra*        Ex ranges
  892.  
  893. |:range|    ,        separates two line numbers
  894. |:range|    ;        idem, set cursor to the first line number
  895.                 before interpreting the second one
  896.  
  897. |:range|    {number}    an absolute line number
  898. |:range|    .        the current line
  899. |:range|    $        the last line in the file
  900. |:range|    %        equal to 1,$ (the entire file)
  901. |:range|    *        equal to '<,'> (visual area)
  902. |:range|    't        position of mark t
  903. |:range|    /{pattern}[/]    the next line where {pattern} matches
  904. |:range|    ?{pattern}[?]    the previous line where {pattern} matches
  905.  
  906. |:range|    +[num]        add [num] to the preceding line number
  907.                    (default: 1)
  908. |:range|    -[num]        subtract [num] from the preceding line
  909.                    number (default: 1)
  910. ------------------------------------------------------------------------------
  911. *X_ex*        Special Ex characters
  912.  
  913. |:bar|        |        separates two commands (not for ":global" and ":!")
  914. |:quote|    "        begins comment
  915.  
  916. |:_%|        %        current file name (only where a file name is expected)
  917. |:_#|        #[number]    alternate file name [number] (only where a file name
  918.                is expected)
  919.     Note: The next four are typed literally; these are not special keys!
  920. |:<cword>|  <cword>    word under the cursor (only where a file name is
  921.                expected)
  922. |:<cWORD>|  <cWORD>    WORD under the cursor (only where a file name is
  923.                expected) (see |WORD|)
  924. |:<cfile>|  <cfile>    file name under the cursor (only where a file name is
  925.                expected)
  926. |:<afile>|  <afile>    file name for autocommand (only where a file name is
  927.                expected)
  928. |:<sfile>|  <sfile>    file name of a ":source"d file, within that file (only
  929.                where a file name is expected)
  930.  
  931.         After "%", "#", "<cfile>", "<sfile>" or "<afile>"
  932.         |::p|        :p        full path
  933.         |::h|        :h        head (file name removed)
  934.         |::t|        :t        tail (file name only)
  935.         |::r|        :r        root (extension removed)
  936.         |::e|        :e        extension
  937. ------------------------------------------------------------------------------
  938. *X_ed*        Editing a file
  939.  
  940. |:edit|       :e[dit]        Edit the current file, unless changes have
  941.                    been made.
  942. |:edit!|   :e[dit]!        Edit the current file always.  Discard any
  943.                    changes.
  944. |:edit_f|  :e[dit] {file}    Edit {file}, unless changes have been made.
  945. |:edit!_f| :e[dit]! {file}    Edit {file} always.  Discard any changes.
  946. |CTRL-^|   N   CTRL-^        Edit alternate file N (equivalent to ":e #N").
  947. |gf|           gf  or ]f    Edit the file whose name is under the cursor
  948. |:pwd|       :pwd            Print the current directory name.
  949. |:cd|       :cd [path]        Change the current directory to [path].
  950. |:file|       :f[ile]        Print the current file name and the cursor
  951.                    position.
  952. |:file|       :f[ile] {name}    Set the current file name to {name}.
  953. |:files|   :files        Show alternate file names.
  954. ------------------------------------------------------------------------------
  955. *X_fl*        Using the argument list            |argument-list|
  956.  
  957. |:args|       :ar[gs]        Print the argument list, with the current file
  958.                    in "[]".
  959. |:all|       :all  or :sall    Open a window for every file in the arg list.
  960. |:wn|       :wn[ext][!]        Write file and edit next file.
  961. |:wn|       :wn[ext][!] {file}    Write to {file} and edit next file, unless
  962.                    {file} exists.  With !, overwrite existing
  963.                    file.
  964. |:wN|       :wN[ext][!] [file]    Write file and edit previous file.
  965.  
  966.          in current window    in new window    ~
  967. |:argument|  :argu[ment] N      :sar[gument] N    Edit file N
  968. |:next|         :n[ext]          :sn[ext]        Edit next file
  969. |:next_f|    :n[ext] {arglist}      :sn[ext] {arglist}    define new arg list
  970.                                and edit first file
  971. |:Next|         :N[ext]          :sN[ext]        Edit previous file
  972. |:rewind|    :rew[ind][!]      :srew[ind]        Edit first file
  973. |:last|         :last          :slast        Edit last file
  974. ------------------------------------------------------------------------------
  975. *X_wq*        Writing and quitting
  976.  
  977. |:w|      :[range]w[rite][!]        Write to the current file.
  978. |:w_f|      :[range]w[rite] {file}    Write to {file}, unless it already
  979.                        exists.
  980. |:w_f|      :[range]w[rite]! {file}    Write to {file}.  Overwrite an existing
  981.                        file.
  982. |:w_a|      :[range]w[rite][!] >>        Append to the current file.
  983. |:w_a|      :[range]w[rite][!] >> {file}    Append to {file}.
  984. |:w_c|      :[range]w[rite] !{cmd}    Execute {cmd} with [range] lines as
  985.                        standard input.
  986. |:wall|      :wall[!]            write all changed buffers
  987.  
  988. |:q|      :q[uit]        Quit current buffer, unless changes have been
  989.                    made.  Exit Vim when there are no other
  990.                    non-help buffers
  991. |:q|      :q[uit]!        Quit current buffer always, discard any
  992.                    changes.  Exit Vim when there are no other
  993.                    non-help buffers
  994. |:qa|      :qall            Exit Vim, unless changes have been made.
  995. |:qa|      :qall!        Exit Vim always, discard any changes.
  996. |:cq|      :cq            Quit without writing and return error code.
  997.  
  998. |:wq|      :wq[!]        Write the current file and exit.
  999. |:wq|      :wq[!] {file}        Write to {file} and exit.
  1000. |:xit|      :x[it][!] [file]    Like ":wq" but write only when changes have
  1001.                    been made
  1002. |ZZ|         ZZ            Same as ":x".
  1003. |ZQ|         ZQ            Same as ":q!".
  1004. |:xall|      :xall[!]  or :wqall[!]
  1005.                 Write all changed buffers and exit
  1006.  
  1007. |:stop|      :st[op][!]        Suspend VIM or start new shell. If 'aw' option
  1008.                    is set and [!] not given write the buffer.
  1009. |CTRL-Z|     CTRL-Z        Same as ":stop!"
  1010. ------------------------------------------------------------------------------
  1011. *X_st*        Starting VIM
  1012.  
  1013. |-vim|       vim [options]        start editing with an empty buffer
  1014. |-file|       vim [options] {file ..}    start editing one or more files
  1015. |--|       vim [options] -        read file from stdin
  1016. |-tag|       vim [options] -t {tag}    edit the file associated with {tag}
  1017. |-qf|       vim [options] -q [fname]    start editing in QuickFix mode,
  1018.                        display the first error
  1019.  
  1020.     Vim arguments:
  1021.  
  1022. |-gui|    -g            start GUI (also allows other options)
  1023.  
  1024. |-+|    +[num]            put the cursor at line [num] (default: last line)
  1025. |-+c|    +{command}        execute {command} after loading the file
  1026. |-+/|    +/{pat} {file ..}   put the cursor at the first occurrence of {pat}
  1027. |-v|    -v            Vi mode, start ex in Normal mode
  1028. |-e|    -e            Ex mode, start vim in Ex mode
  1029. |-R|    -R            Read-only mode, implies -n
  1030. |-b|    -b            binary mode
  1031. |-l|    -l            lisp mode
  1032. |-F|    -F            Farsi mode ('fkmap' and 'rightleft' are set)
  1033. |-H|    -H            Hebrew mode ('hkmap' and 'rightleft' are set)
  1034. |-V|    -V            Verbose, give informative messages
  1035. |-C|    -C            Compatible, set the 'compatible' option
  1036. |-N|    -N            Nocompatible, reset the 'compatible' option
  1037. |-r|    -r            give list of swap files
  1038. |-r|    -r {file ..}        recover aborted edit session
  1039. |-n|    -n            do not create a swap file
  1040. |-o|    -o [N]            open N windows (default: one for each file)
  1041. |-f|    -f            GUI: foreground process, don't fork
  1042.                 Amiga: do not restart VIM to open a window (for
  1043.                 e.g., mail)
  1044. |-s|    -s {scriptin}        first read commands from the file {scriptin}
  1045. |-w|    -w {scriptout}        write typed chars to file {scriptout} (append)
  1046. |-W|    -W {scriptout}        write typed chars to file {scriptout} (overwrite)
  1047. |-T|    -T {terminal}        set terminal name
  1048. |-d|    -d {device}        Amiga: open {device} to be used as a console
  1049. |-u|    -u {vimrc}        read inits from {vimrc} instead of other inits
  1050. |-U|    -U {gvimrc}        idem, for when starting the GUI
  1051. |-i|    -i {viminfo}        read info from {viminfo} instead of other files
  1052. |---|    --            end of options, other arguments are file names
  1053. |--help|    --help        show list of arguments and exit
  1054. |--version| --version        show version info and exit
  1055. |--|    -            Read file from stdin.
  1056. ------------------------------------------------------------------------------
  1057. *X_ac*        Automatic Commands
  1058.  
  1059. |viminfo-file|    Read registers, marks, history at startup, save when exiting.
  1060.  
  1061. |:rviminfo|    :rv[iminfo] [file]    Read info from viminfo file [file]
  1062. |:rviminfo|    :rv[iminfo]! [file]    idem, overwrite exisiting info
  1063. |:wviminfo|    :wv[iminfo] [file]    Add info to viminfo file [file]
  1064. |:wviminfo|    :wv[iminfo]! [file]    Write info to viminfo file [file]
  1065.  
  1066. |modeline|    Automatic option setting when editing a file
  1067.  
  1068. |modeline|    vim:{set-arg}: ..    In the first and last lines of the
  1069.                     file (see 'ml' option), {set-arg} is
  1070.                     given as an argument to ":set"
  1071.  
  1072. |autocommand|    Automatic execution of commands on certain events.
  1073.  
  1074. |:autocmd|    :au            List all autocommands
  1075. |:autocmd|    :au {event}        List all autocommands for {event}
  1076. |:autocmd|    :au {event} {pat}    List all autocommands for {event} with
  1077.                     {pat}
  1078. |:autocmd|    :au {event} {pat} {cmd}    Enter new autocommands for {event}
  1079.                     with {pat}
  1080. |:autocmd|    :au!            Remove all autocommands
  1081. |:autocmd|    :au! {event}        Remove all autocommands for {event}
  1082. |:autocmd|    :au! * {pat}        Remove all autocommands for {pat}
  1083. |:autocmd|    :au! {event} {pat}    Remove all autocommands for {event}
  1084.                     with {pat}
  1085. |:autocmd|    :au! {event} {pat} {cmd}  Remove all autocommands for {event}
  1086.                     with {pat} and enter new one
  1087. ------------------------------------------------------------------------------
  1088. *X_wi*        Multi-window functions
  1089.  
  1090. |CTRL-W_s|    CTRL-W s  or  :split    Split window into two parts
  1091. |:split_f|    :split {file}        Split window and edit {file} in one of
  1092.                        them
  1093. |CTRL-W_]|    CTRL-W ]        Split window and jump to tag under
  1094.                        cursor
  1095. |CTRL-W_f|    CTRL-W f        Split window and edit file name under
  1096.                        the cursor
  1097. |CTRL-W_CTRL-^| CTRL-W CTRL-^        Split window and edit alternate file
  1098. |CTRL-W_n|    CTRL-W n  or  :new    Create new empty window
  1099. |CTRL-W_q|    CTRL-W q  or  :q[uit]    Quit editing and close window
  1100. |CTRL-W_c|    CTRL-W c  or  :cl[ose]    Make buffer hidden and close window
  1101. |CTRL-W_o|    CTRL-W o  or  :on[ly]    Make current window only one on the
  1102.                        screen
  1103.  
  1104. |CTRL-W_j|    CTRL-W j        Move cursor to window below
  1105. |CTRL-W_k|    CTRL-W k        Move cursor to window above
  1106. |CTRL-W_CTRL-W|    CTRL-W CTRL-W        Move cursor to window below (wrap)
  1107. |CTRL-W_W|    CTRL-W W        Move cursor to window above (wrap)
  1108. |CTRL-W_t|    CTRL-W t        Move cursor to top window
  1109. |CTRL-W_b|    CTRL-W b        Move cursor to bottom window
  1110. |CTRL-W_p|    CTRL-W p        Move cursor to previous active window
  1111.  
  1112. |CTRL-W_r|    CTRL-W r        Rotate windows downwards
  1113. |CTRL-W_R|    CTRL-W R        Rotate windows upwards
  1114. |CTRL-W_x|    CTRL-W x        Exchange current window with next one
  1115.  
  1116. |CTRL-W_=|    CTRL-W =        Make all windows equal height
  1117. |CTRL-W_-|    CTRL-W -        Decrease current window height
  1118. |CTRL-W_+|    CTRL-W +        Increase current window height
  1119. |CTRL-W__|    CTRL-W _        Set current window height (default:
  1120.                        very high)
  1121. ------------------------------------------------------------------------------
  1122. *X_bu*        Buffer list functions
  1123.  
  1124. |:buffers|    :buffers  or  :files    list all known buffer and file names
  1125.  
  1126. |:ball|        :ball      or  :sball    edit all args/buffers
  1127. |:unhide|    :unhide   or  :sunhide    edit all loaded buffers
  1128.  
  1129. |:badd|        :badd {fname}        add file name {fname} to the list
  1130. |:bunload|    :bunload[!] [N]        unload buffer [N] from memory
  1131. |:bdelete|    :bdelete[!] [N]        unload buffer [N] and delete it from
  1132.                        the buffer list
  1133.  
  1134.           in current window   in new window    ~
  1135. |:buffer|     :[N]buffer [N]      :[N]sbuffer [N]     to arg/buf N
  1136. |:bnext|      :[N]bnext [N]      :[N]sbnext [N]      to Nth next arg/buf
  1137. |:bNext|      :[N]bNext [N]      :[N]sbNext [N]      to Nth previous arg/buf
  1138. |:bprevious|  :[N]bprevious [N]   :[N]sbprevious [N]  to Nth previous arg/buf
  1139. |:brewind|    :brewind          :sbrewind          to first arg/buf
  1140. |:blast|      :blast          :sblast          to last arg/buf
  1141. |:bmodified|  :[N]bmod [N]      :[N]sbmod [N]          to Nth modified buf
  1142. ------------------------------------------------------------------------------
  1143. *X_sy*        Syntax Highlighting
  1144.  
  1145. |:syn-on|    :syntax on        start using syntax highlighting
  1146. |:syn-off|    :syntax off        stop using syntax highlighting
  1147.  
  1148. |:syn-keyword|    :syntax keyword {group-name} {keyword} ..
  1149.                     add a syntax keyword item
  1150. |:syn-match|    :syntax match {group-name} {pattern} ...
  1151.                     add syntax match item
  1152. |:syn-region|    :syntax region {group-name} {pattern} ...
  1153.                     add syntax region item
  1154. |:syn-sync|    :syntax sync [ccomment | lines {N} | ...]
  1155.                     tell syntax how to sync
  1156. |:syntax|    :syntax [list]        list current syntax items
  1157. |:syn-clear|    :syntax clear        clear all syntax info
  1158.  
  1159. |:highlight|    :highlight clear    clear all highlight info
  1160. |:highlight|    :highlight {group-name} {key}={arg} ..
  1161.                     set highlighting for {group-name}
  1162. ------------------------------------------------------------------------------
  1163. *X_gu*        GUI commands
  1164.  
  1165. |:gui|        :gui            UNIX: start the GUI
  1166. |:gui|        :gui {fname} ..        idem, and edit {fname} ..
  1167.  
  1168. |:menu|        :menu            list all menus
  1169. |:menu|        :menu {mpath}        list menus starting with {mpath}
  1170. |:menu|        :menu {mpath} {rhs}    add menu {mpath}, giving {lhs}
  1171. |:menu|        :menu {pri} {mpath} {rhs}
  1172.                     idem, with priorities {pri}
  1173. |:menu|        :menu ToolBar.{name} {rhs}
  1174.                     Win32: add toolbar item, giving {lhs}
  1175. |:tmenu|    :tmenu {mpath} {text}    Win32: add tooltip to menu {mpath}
  1176. |:unmenu|    :unmenu {mpath}        remove menu {mpath}
  1177.  
  1178. ------------------------------------------------------------------------------
  1179. *bars*        Bars example
  1180.  
  1181. Now that you've jumped here with CTRL-], <2-LeftMouse>, g<LeftMouse>, or
  1182. <C-LeftMouse>, you can use CTRL-T, CTRL-O, g<RightMouse>, or <C-RightMouse> to
  1183. go back to where you were.
  1184. ------------------------------------------------------------------------------
  1185.  vim:ts=8:sw=8:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":
  1186.