quickref.txt 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408
  1. *quickref.txt* Nvim
  2. VIM REFERENCE MANUAL by Bram Moolenaar
  3. ==============================================================================
  4. Quick reference guide
  5. *quickref* *Contents*
  6. tag subject tag subject ~
  7. |Q_ct| list of help files |Q_re| Repeating commands
  8. |Q_lr| motion: Left-right |Q_km| Key mapping
  9. |Q_ud| motion: Up-down |Q_ab| Abbreviations
  10. |Q_tm| motion: Text object |Q_op| Options
  11. |Q_pa| motion: Pattern searches |Q_ur| Undo/Redo commands
  12. |Q_ma| motion: Marks |Q_et| External commands
  13. |Q_vm| motion: Various |Q_qf| Quickfix commands
  14. |Q_ta| motion: Using tags |Q_vc| Various commands
  15. |Q_sc| Scrolling |Q_ce| Ex: Command-line editing
  16. |Q_in| insert: Inserting text |Q_ra| Ex: Ranges
  17. |Q_ai| insert: Keys |Q_ex| Ex: Special characters
  18. |Q_ss| insert: Special keys |Q_st| Starting Vim
  19. |Q_di| insert: Digraphs |Q_ed| Editing a file
  20. |Q_si| insert: Special inserts |Q_fl| Using the argument list
  21. |Q_de| change: Deleting text |Q_wq| Writing and quitting
  22. |Q_cm| change: Copying and moving |Q_ac| Automatic commands
  23. |Q_ch| change: Changing text |Q_wi| Multi-window commands
  24. |Q_co| change: Complex |Q_bu| Buffer list commands
  25. |Q_vi| Visual mode |Q_sy| Syntax highlighting
  26. |Q_to| Text objects |Q_gu| GUI commands
  27. |Q_fo| Folding
  28. ------------------------------------------------------------------------------
  29. *Q_lr* Left-right motions
  30. N is used to indicate an optional count that can be given before the command.
  31. |h| N h left (also: CTRL-H, <BS>, or <Left> key)
  32. |l| N l right (also: <Space> or <Right> key)
  33. |0| 0 to first character in the line (also: <Home> key)
  34. |^| ^ to first non-blank character in the line
  35. |$| N $ to the next EOL (end of line) position
  36. (also: <End> key)
  37. |g0| g0 to first character in screen line (differs from "0"
  38. when lines wrap)
  39. |g^| g^ to first non-blank character in screen line (differs
  40. from "^" when lines wrap)
  41. |g$| N g$ to last character in screen line (differs from "$"
  42. when lines wrap)
  43. |gm| gm to middle of the screen line
  44. |gM| gM to middle of the line
  45. |bar| N | to column N (default: 1)
  46. |f| N f{char} to the Nth occurrence of {char} to the right
  47. |F| N F{char} to the Nth occurrence of {char} to the left
  48. |t| N t{char} till before the Nth occurrence of {char} to the right
  49. |T| N T{char} till before the Nth occurrence of {char} to the left
  50. |;| N ; repeat the last "f", "F", "t", or "T" N times
  51. |,| N , repeat the last "f", "F", "t", or "T" N times in
  52. opposite direction
  53. ------------------------------------------------------------------------------
  54. *Q_ud* Up-down motions
  55. |k| N k up N lines (also: CTRL-P and <Up>)
  56. |j| N j down N lines (also: CTRL-J, CTRL-N, <NL>, and <Down>)
  57. |-| N - up N lines, on the first non-blank character
  58. |+| N + down N lines, on the first non-blank character (also:
  59. CTRL-M and <CR>)
  60. |_| N _ down N-1 lines, on the first non-blank character
  61. |G| N G goto line N (default: last line), on the first
  62. non-blank character
  63. |gg| N gg goto line N (default: first line), on the first
  64. non-blank character
  65. |N%| N % goto line N percentage down in the file; N must be
  66. given, otherwise it is the |%| command
  67. |gk| N gk up N screen lines (differs from "k" when line wraps)
  68. |gj| N gj down N screen lines (differs from "j" when line wraps)
  69. ------------------------------------------------------------------------------
  70. *Q_tm* Text object motions
  71. |w| N w N words forward
  72. |W| N W N blank-separated |WORD|s forward
  73. |e| N e forward to the end of the Nth word
  74. |E| N E forward to the end of the Nth blank-separated |WORD|
  75. |b| N b N words backward
  76. |B| N B N blank-separated |WORD|s backward
  77. |ge| N ge backward to the end of the Nth word
  78. |gE| N gE backward to the end of the Nth blank-separated |WORD|
  79. |)| N ) N sentences forward
  80. |(| N ( N sentences backward
  81. |}| N } N paragraphs forward
  82. |{| N { N paragraphs backward
  83. |]]| N ]] N sections forward, at start of section
  84. |[[| N [[ N sections backward, at start of section
  85. |][| N ][ N sections forward, at end of section
  86. |[]| N [] N sections backward, at end of section
  87. |[(| N [( N times back to unclosed '('
  88. |[{| N [{ N times back to unclosed '{'
  89. |[m| N [m N times back to start of method (for Java)
  90. |[M| N [M N times back to end of method (for Java)
  91. |])| N ]) N times forward to unclosed ')'
  92. |]}| N ]} N times forward to unclosed '}'
  93. |]m| N ]m N times forward to start of method (for Java)
  94. |]M| N ]M N times forward to end of method (for Java)
  95. |[#| N [# N times back to unclosed "#if" or "#else"
  96. |]#| N ]# N times forward to unclosed "#else" or "#endif"
  97. |[star| N [* N times back to start of comment "/*"
  98. |]star| N ]* N times forward to end of comment "*/"
  99. ------------------------------------------------------------------------------
  100. *Q_pa* Pattern searches
  101. |/| N /{pattern}[/[offset]]<CR>
  102. search forward for the Nth occurrence of {pattern}
  103. |?| N ?{pattern}[?[offset]]<CR>
  104. search backward for the Nth occurrence of {pattern}
  105. |/<CR>| N /<CR> repeat last search, in the forward direction
  106. |?<CR>| N ?<CR> repeat last search, in the backward direction
  107. |n| N n repeat last search
  108. |N| N N repeat last search, in opposite direction
  109. |star| N * search forward for the identifier under the cursor
  110. |#| N # search backward for the identifier under the cursor
  111. |gstar| N g* like "*", but also find partial matches
  112. |g#| N g# like "#", but also find partial matches
  113. |gd| gd goto local declaration of identifier under the cursor
  114. |gD| gD goto global declaration of identifier under the cursor
  115. |pattern| Special characters in search patterns
  116. meaning magic nomagic ~
  117. matches any single character . \.
  118. matches start of line ^ ^
  119. matches <EOL> $ $
  120. matches start of word \< \<
  121. matches end of word \> \>
  122. matches a single char from the range [a-z] \[a-z]
  123. matches a single char not in the range [^a-z] \[^a-z]
  124. matches an identifier char \i \i
  125. idem but excluding digits \I \I
  126. matches a keyword character \k \k
  127. idem but excluding digits \K \K
  128. matches a file name character \f \f
  129. idem but excluding digits \F \F
  130. matches a printable character \p \p
  131. idem but excluding digits \P \P
  132. matches a white space character \s \s
  133. matches a non-white space character \S \S
  134. matches <Esc> \e \e
  135. matches <Tab> \t \t
  136. matches <CR> \r \r
  137. matches <BS> \b \b
  138. matches 0 or more of the preceding atom * \*
  139. matches 1 or more of the preceding atom \+ \+
  140. matches 0 or 1 of the preceding atom \= \=
  141. matches 2 to 5 of the preceding atom \{2,5} \{2,5}
  142. separates two alternatives \| \|
  143. group a pattern into an atom \(\) \(\)
  144. |search-offset| Offsets allowed after search command
  145. [num] [num] lines downwards, in column 1
  146. +[num] [num] lines downwards, in column 1
  147. -[num] [num] lines upwards, in column 1
  148. e[+num] [num] characters to the right of the end of the match
  149. e[-num] [num] characters to the left of the end of the match
  150. s[+num] [num] characters to the right of the start of the match
  151. s[-num] [num] characters to the left of the start of the match
  152. b[+num] [num] identical to s[+num] above (mnemonic: begin)
  153. b[-num] [num] identical to s[-num] above (mnemonic: begin)
  154. ;{search-command} execute {search-command} next
  155. ------------------------------------------------------------------------------
  156. *Q_ma* Marks and motions
  157. |m| m{a-zA-Z} mark current position with mark {a-zA-Z}
  158. |`a| `{a-z} go to mark {a-z} within current file
  159. |`A| `{A-Z} go to mark {A-Z} in any file
  160. |`0| `{0-9} go to the position where Vim was previously exited
  161. |``| `` go to the position before the last jump
  162. |`quote| `" go to the position when last editing this file
  163. |`[| `[ go to the start of the previously operated or put text
  164. |`]| `] go to the end of the previously operated or put text
  165. |`<| `< go to the start of the (previous) Visual area
  166. |`>| `> go to the end of the (previous) Visual area
  167. |`.| `. go to the position of the last change in this file
  168. |'| '{a-zA-Z0-9[]'"<>.}
  169. same as `, but on the first non-blank in the line
  170. |:marks| :marks print the active marks
  171. |CTRL-O| N CTRL-O go to Nth older position in jump list
  172. |CTRL-I| N CTRL-I go to Nth newer position in jump list
  173. |:ju| :ju[mps] print the jump list
  174. ------------------------------------------------------------------------------
  175. *Q_vm* Various motions
  176. |%| % find the next brace, bracket, comment, or "#if"/
  177. "#else"/"#endif" in this line and go to its match
  178. |H| N H go to the Nth line in the window, on the first
  179. non-blank
  180. |M| M go to the middle line in the window, on the first
  181. non-blank
  182. |L| N L go to the Nth line from the bottom, on the first
  183. non-blank
  184. |go| N go go to Nth byte in the buffer
  185. |:go| :[range]go[to] [off] go to [off] byte in the buffer
  186. ------------------------------------------------------------------------------
  187. *Q_ta* Using tags
  188. |:ta| :ta[g][!] {tag} jump to tag {tag}
  189. |:ta| :[count]ta[g][!] jump to [count]'th newer tag in tag list
  190. |CTRL-]| CTRL-] jump to the tag under cursor, unless changes
  191. have been made
  192. |:ts| :ts[elect][!] [tag] list matching tags and select one to jump to
  193. |:tjump| :tj[ump][!] [tag] jump to tag [tag] or select from list when
  194. there are multiple matches
  195. |:ltag| :lt[ag][!] [tag] jump to tag [tag] and add matching tags to the
  196. location list
  197. |:tags| :tags print tag list
  198. |CTRL-T| N CTRL-T jump back from Nth older tag in tag list
  199. |:po| :[count]po[p][!] jump back from [count]'th older tag in tag list
  200. |:tnext| :[count]tn[ext][!] jump to [count]'th next matching tag
  201. |:tp| :[count]tp[revious][!] jump to [count]'th previous matching tag
  202. |:tr| :[count]tr[ewind][!] jump to [count]'th matching tag
  203. |:tl| :tl[ast][!] jump to last matching tag
  204. |:ptag| :pt[ag] {tag} open a preview window to show tag {tag}
  205. |CTRL-W_}| CTRL-W } like CTRL-] but show tag in preview window
  206. |:pts| :pts[elect] like ":tselect" but show tag in preview window
  207. |:ptjump| :ptj[ump] like ":tjump" but show tag in preview window
  208. |:pclose| :pc[lose] close tag preview window
  209. |CTRL-W_z| CTRL-W z close tag preview window
  210. ------------------------------------------------------------------------------
  211. *Q_sc* Scrolling
  212. |CTRL-E| N CTRL-E window N lines downwards (default: 1)
  213. |CTRL-D| N CTRL-D window N lines Downwards (default: 1/2 window)
  214. |CTRL-F| N CTRL-F window N pages Forwards (downwards)
  215. |CTRL-Y| N CTRL-Y window N lines upwards (default: 1)
  216. |CTRL-U| N CTRL-U window N lines Upwards (default: 1/2 window)
  217. |CTRL-B| N CTRL-B window N pages Backwards (upwards)
  218. |z<CR>| z<CR> or zt redraw, current line at top of window
  219. |z.| z. or zz redraw, current line at center of window
  220. |z-| z- or zb redraw, current line at bottom of window
  221. These only work when 'wrap' is off:
  222. |zh| N zh scroll screen N characters to the right
  223. |zl| N zl scroll screen N characters to the left
  224. |zH| N zH scroll screen half a screenwidth to the right
  225. |zL| N zL scroll screen half a screenwidth to the left
  226. ------------------------------------------------------------------------------
  227. *Q_in* Inserting text
  228. |a| N a append text after the cursor (N times)
  229. |A| N A append text at the end of the line (N times)
  230. |i| N i insert text before the cursor (N times) (also: <Insert>)
  231. |I| N I insert text before the first non-blank in the line (N times)
  232. |gI| N gI insert text in column 1 (N times)
  233. |o| N o open a new line below the current line, append text (N times)
  234. |O| N O open a new line above the current line, append text (N times)
  235. |:startinsert| :star[tinsert][!] start Insert mode, append when [!] used
  236. |:startreplace| :startr[eplace][!] start Replace mode, at EOL when [!] used
  237. in Visual block mode:
  238. |v_b_I| I insert the same text in front of all the selected lines
  239. |v_b_A| A append the same text after all the selected lines
  240. ------------------------------------------------------------------------------
  241. *Q_ai* Insert mode keys
  242. |insert-index| alphabetical index of Insert mode commands
  243. leaving Insert mode:
  244. |i_<Esc>| <Esc> end Insert mode, back to Normal mode
  245. |i_CTRL-C| CTRL-C like <Esc>, but do not use an abbreviation
  246. |i_CTRL-O| CTRL-O {command} execute {command} and return to Insert mode
  247. moving around:
  248. |i_<Up>| cursor keys move cursor left/right/up/down
  249. |i_<S-Left>| shift-left/right one word left/right
  250. |i_<S-Up>| shift-up/down one screenful backward/forward
  251. |i_<End>| <End> cursor after last character in the line
  252. |i_<Home>| <Home> cursor to first character in the line
  253. ------------------------------------------------------------------------------
  254. *Q_ss* Special keys in Insert mode
  255. |i_CTRL-V| CTRL-V {char}.. insert character literally, or enter decimal
  256. byte value
  257. |i_<NL>| <NL> or <CR> or CTRL-M or CTRL-J
  258. begin new line
  259. |i_CTRL-E| CTRL-E insert the character from below the cursor
  260. |i_CTRL-Y| CTRL-Y insert the character from above the cursor
  261. |i_CTRL-A| CTRL-A insert previously inserted text
  262. |i_CTRL-@| CTRL-@ insert previously inserted text and stop
  263. Insert mode
  264. |i_CTRL-R| CTRL-R {register} insert the contents of a register
  265. |i_CTRL-N| CTRL-N insert next match of identifier before the
  266. cursor
  267. |i_CTRL-P| CTRL-P insert previous match of identifier before
  268. the cursor
  269. |i_CTRL-X| CTRL-X ... complete the word before the cursor in
  270. various ways
  271. |i_<BS>| <BS> or CTRL-H delete the character before the cursor
  272. |i_<Del>| <Del> delete the character under the cursor
  273. |i_CTRL-W| CTRL-W delete word before the cursor
  274. |i_CTRL-U| CTRL-U delete all entered characters in the current
  275. line
  276. |i_CTRL-T| CTRL-T insert one shiftwidth of indent in front of
  277. the current line
  278. |i_CTRL-D| CTRL-D delete one shiftwidth of indent in front of
  279. the current line
  280. |i_0_CTRL-D| 0 CTRL-D delete all indent in the current line
  281. |i_^_CTRL-D| ^ CTRL-D delete all indent in the current line,
  282. restore indent in next line
  283. ------------------------------------------------------------------------------
  284. *Q_di* Digraphs
  285. |:dig| :dig[raphs] show current list of digraphs
  286. |:dig| :dig[raphs] {char1}{char2} {number} ...
  287. add digraph(s) to the list
  288. In Insert or Command-line mode:
  289. |i_CTRL-K| CTRL-K {char1} {char2}
  290. enter digraph
  291. |i_digraph| {char1} <BS> {char2}
  292. enter digraph if 'digraph' option set
  293. ------------------------------------------------------------------------------
  294. *Q_si* Special inserts
  295. |:r| :r [file] insert the contents of [file] below the cursor
  296. |:r!| :r! {command} insert the standard output of {command} below the
  297. cursor
  298. ------------------------------------------------------------------------------
  299. *Q_de* Deleting text
  300. |x| N x delete N characters under and after the cursor
  301. |<Del>| N <Del> delete N characters under and after the cursor
  302. |X| N X delete N characters before the cursor
  303. |d| N d{motion} delete the text that is moved over with {motion}
  304. |v_d| {visual}d delete the highlighted text
  305. |dd| N dd delete N lines
  306. |D| N D delete to the end of the line (and N-1 more lines)
  307. |J| N J join N-1 lines (delete <EOL>s)
  308. |v_J| {visual}J join the highlighted lines
  309. |gJ| N gJ like "J", but without inserting spaces
  310. |v_gJ| {visual}gJ like "{visual}J", but without inserting spaces
  311. |:d| :[range]d [x] delete [range] lines [into register x]
  312. ------------------------------------------------------------------------------
  313. *Q_cm* Copying and moving text
  314. |quote| "{char} use register {char} for the next delete, yank, or put
  315. |:reg| :reg show the contents of all registers
  316. |:reg| :reg {arg} show the contents of registers mentioned in {arg}
  317. |y| N y{motion} yank the text moved over with {motion} into a register
  318. |v_y| {visual}y yank the highlighted text into a register
  319. |yy| N yy yank N lines into a register
  320. |Y| N Y yank N lines into a register
  321. Note: Mapped to "y$" by default. |default-mappings|
  322. |p| N p put a register after the cursor position (N times)
  323. |P| N P put a register before the cursor position (N times)
  324. |]p| N ]p like p, but adjust indent to current line
  325. |[p| N [p like P, but adjust indent to current line
  326. |gp| N gp like p, but leave cursor after the new text
  327. |gP| N gP like P, but leave cursor after the new text
  328. ------------------------------------------------------------------------------
  329. *Q_ch* Changing text
  330. |r| N r{char} replace N characters with {char}
  331. |gr| N gr{char} replace N characters without affecting layout
  332. |R| N R enter Replace mode (repeat the entered text N times)
  333. |gR| N gR enter virtual Replace mode: Like Replace mode but
  334. without affecting layout
  335. |v_b_r| {visual}r{char}
  336. in Visual block mode: Replace each char of the
  337. selected text with {char}
  338. (change = delete text and enter Insert mode)
  339. |c| N c{motion} change the text that is moved over with {motion}
  340. |v_c| {visual}c change the highlighted text
  341. |cc| N cc change N lines
  342. |S| N S change N lines
  343. |C| N C change to the end of the line (and N-1 more lines)
  344. |s| N s change N characters
  345. |v_b_c| {visual}c in Visual block mode: Change each of the selected
  346. lines with the entered text
  347. |v_b_C| {visual}C in Visual block mode: Change each of the selected
  348. lines until end-of-line with the entered text
  349. |~| N ~ switch case for N characters and advance cursor
  350. |v_~| {visual}~ switch case for highlighted text
  351. |v_u| {visual}u make highlighted text lowercase
  352. |v_U| {visual}U make highlighted text uppercase
  353. |g~| g~{motion} switch case for the text that is moved over with
  354. {motion}
  355. |gu| gu{motion} make the text that is moved over with {motion}
  356. lowercase
  357. |gU| gU{motion} make the text that is moved over with {motion}
  358. uppercase
  359. |v_g?| {visual}g? perform rot13 encoding on highlighted text
  360. |g?| g?{motion} perform rot13 encoding on the text that is moved over
  361. with {motion}
  362. |CTRL-A| N CTRL-A add N to the number at or after the cursor
  363. |CTRL-X| N CTRL-X subtract N from the number at or after the cursor
  364. |<| N <{motion} move the lines that are moved over with {motion} one
  365. shiftwidth left
  366. |<<| N << move N lines one shiftwidth left
  367. |>| N >{motion} move the lines that are moved over with {motion} one
  368. shiftwidth right
  369. |>>| N >> move N lines one shiftwidth right
  370. |gq| N gq{motion} format the lines that are moved over with {motion} to
  371. 'textwidth' length
  372. |:ce| :[range]ce[nter] [width]
  373. center the lines in [range]
  374. |:le| :[range]le[ft] [indent]
  375. left-align the lines in [range] (with [indent])
  376. |:ri| :[range]ri[ght] [width]
  377. right-align the lines in [range]
  378. ------------------------------------------------------------------------------
  379. *Q_co* Complex changes
  380. |!| N !{motion}{command}<CR>
  381. filter the lines that are moved over through {command}
  382. |!!| N !!{command}<CR>
  383. filter N lines through {command}
  384. |v_!| {visual}!{command}<CR>
  385. filter the highlighted lines through {command}
  386. |:range!| :[range]! {command}<CR>
  387. filter [range] lines through {command}
  388. |=| N ={motion}
  389. filter the lines that are moved over through 'equalprg'
  390. |==| N == filter N lines through 'equalprg'
  391. |v_=| {visual}=
  392. filter the highlighted lines through 'equalprg'
  393. |:s| :[range]s[ubstitute]/{pattern}/{string}/[g][c]
  394. substitute {pattern} by {string} in [range] lines;
  395. with [g], replace all occurrences of {pattern};
  396. with [c], confirm each replacement
  397. |:s| :[range]s[ubstitute] [g][c]
  398. repeat previous ":s" with new range and options
  399. |&| & Repeat previous ":s" on current line without options
  400. |:ret| :[range]ret[ab][!] [tabstop]
  401. set 'tabstop' to new value and adjust white space
  402. accordingly
  403. ------------------------------------------------------------------------------
  404. *Q_vi* Visual mode
  405. |visual-index| list of Visual mode commands.
  406. |v| v start highlighting characters } move cursor and use
  407. |V| V start highlighting linewise } operator to affect
  408. |CTRL-V| CTRL-V start highlighting blockwise } highlighted text
  409. |v_o| o exchange cursor position with start of highlighting
  410. |gv| gv start highlighting on previous visual area
  411. |v_v| v highlight characters or stop highlighting
  412. |v_V| V highlight linewise or stop highlighting
  413. |v_CTRL-V| CTRL-V highlight blockwise or stop highlighting
  414. ------------------------------------------------------------------------------
  415. *Q_to* Text objects (only in Visual mode or after an operator)
  416. |v_aw| N aw Select "a word"
  417. |v_iw| N iw Select "inner word"
  418. |v_aW| N aW Select "a |WORD|"
  419. |v_iW| N iW Select "inner |WORD|"
  420. |v_as| N as Select "a sentence"
  421. |v_is| N is Select "inner sentence"
  422. |v_ap| N ap Select "a paragraph"
  423. |v_ip| N ip Select "inner paragraph"
  424. |v_ab| N ab Select "a block" (from "[(" to "])")
  425. |v_ib| N ib Select "inner block" (from "[(" to "])")
  426. |v_aB| N aB Select "a Block" (from `[{` to `]}`)
  427. |v_iB| N iB Select "inner Block" (from `[{` to `]}`)
  428. |v_a>| N a> Select "a <> block"
  429. |v_i>| N i> Select "inner <> block"
  430. |v_at| N at Select "a tag block" (from <aaa> to </aaa>)
  431. |v_it| N it Select "inner tag block" (from <aaa> to </aaa>)
  432. |v_a'| N a' Select "a single quoted string"
  433. |v_i'| N i' Select "inner single quoted string"
  434. |v_aquote| N a" Select "a double quoted string"
  435. |v_iquote| N i" Select "inner double quoted string"
  436. |v_a`| N a` Select "a backward quoted string"
  437. |v_i`| N i` Select "inner backward quoted string"
  438. ------------------------------------------------------------------------------
  439. *Q_re* Repeating commands
  440. |.| N . repeat last change (with count replaced with N)
  441. |q| q{a-z} record typed characters into register {a-z}
  442. |q| q{A-Z} record typed characters, appended to register {a-z}
  443. |q| q stop recording
  444. |Q| Q replay last recorded macro
  445. |@| N @{a-z} execute the contents of register {a-z} (N times)
  446. |@@| N @@ repeat previous @{a-z} (N times)
  447. |:@| :@{a-z} execute the contents of register {a-z} as an Ex
  448. command
  449. |:@@| :@@ repeat previous :@{a-z}
  450. |:g| :[range]g[lobal]/{pattern}/[cmd]
  451. execute Ex command [cmd] (default: ":p") on the lines
  452. within [range] where {pattern} matches
  453. |:g| :[range]g[lobal]!/{pattern}/[cmd]
  454. execute Ex command [cmd] (default: ":p") on the lines
  455. within [range] where {pattern} does NOT match
  456. |:so| :so[urce] {file}
  457. read Ex commands from {file}
  458. |:so| :so[urce]! {file}
  459. read Vim commands from {file}
  460. |:sl| :sl[eep] [sec]
  461. don't do anything for [sec] seconds
  462. |gs| N gs goto Sleep for N seconds
  463. ------------------------------------------------------------------------------
  464. *Q_km* Key mapping
  465. |:map| :ma[p] {lhs} {rhs} map {lhs} to {rhs} in Normal and Visual mode
  466. |:map!| :ma[p]! {lhs} {rhs} map {lhs} to {rhs} in Insert and Command-line
  467. mode
  468. |:noremap| :no[remap][!] {lhs} {rhs}
  469. same as ":map", no remapping for this {rhs}
  470. |:unmap| :unm[ap] {lhs} remove the mapping of {lhs} for Normal and
  471. Visual mode
  472. |:unmap!| :unm[ap]! {lhs} remove the mapping of {lhs} for Insert and
  473. Command-line mode
  474. |:map_l| :ma[p] [lhs] list mappings (starting with [lhs]) for
  475. Normal and Visual mode
  476. |:map_l!| :ma[p]! [lhs] list mappings (starting with [lhs]) for
  477. Insert and Command-line mode
  478. |:cmap| :cmap/:cunmap/:cnoremap
  479. like ":map!"/":unmap!"/":noremap!" but for
  480. Command-line mode only
  481. |:imap| :imap/:iunmap/:inoremap
  482. like ":map!"/":unmap!"/":noremap!" but for
  483. Insert mode only
  484. |:nmap| :nmap/:nunmap/:nnoremap
  485. like ":map"/":unmap"/":noremap" but for
  486. Normal mode only
  487. |:vmap| :vmap/:vunmap/:vnoremap
  488. like ":map"/":unmap"/":noremap" but for
  489. Visual mode only
  490. |:omap| :omap/:ounmap/:onoremap
  491. like ":map"/":unmap"/":noremap" but only for
  492. when an operator is pending
  493. |:mapc| :mapc[lear] remove mappings for Normal and Visual mode
  494. |:mapc| :mapc[lear]! remove mappings for Insert and Cmdline mode
  495. |:imapc| :imapc[lear] remove mappings for Insert mode
  496. |:vmapc| :vmapc[lear] remove mappings for Visual mode
  497. |:omapc| :omapc[lear] remove mappings for Operator-pending mode
  498. |:nmapc| :nmapc[lear] remove mappings for Normal mode
  499. |:cmapc| :cmapc[lear] remove mappings for Cmdline mode
  500. |:mkexrc| :mk[exrc][!] [file] write current mappings, abbreviations, and
  501. settings to [file] (default: ".exrc";
  502. use ! to overwrite)
  503. |:mkvimrc| :mkv[imrc][!] [file]
  504. same as :mkexrc, but with default ".nvimrc"
  505. |:mksession| :mks[ession][!] [file]
  506. like ":mkvimrc", but store current files,
  507. windows, etc. too, to be able to continue
  508. this session later
  509. ------------------------------------------------------------------------------
  510. *Q_ab* Abbreviations
  511. |:abbreviate| :ab[breviate] {lhs} {rhs} add abbreviation for {lhs} to {rhs}
  512. |:abbreviate| :ab[breviate] {lhs} show abbr's that start with {lhs}
  513. |:abbreviate| :ab[breviate] show all abbreviations
  514. |:unabbreviate| :una[bbreviate] {lhs} remove abbreviation for {lhs}
  515. |:noreabbrev| :norea[bbrev] [lhs] [rhs] like ":ab", but don't remap [rhs]
  516. |:iabbrev| :iab/:iunab/:inoreab like ":ab", but only for Insert mode
  517. |:cabbrev| :cab/:cunab/:cnoreab like ":ab", but only for
  518. Command-line mode
  519. |:abclear| :abc[lear] remove all abbreviations
  520. |:cabclear| :cabc[lear] remove all abbr's for Cmdline mode
  521. |:iabclear| :iabc[lear] remove all abbr's for Insert mode
  522. ------------------------------------------------------------------------------
  523. *Q_op* Options
  524. |:set| :se[t] show all modified options
  525. |:set| :se[t] all show all options
  526. |:set| :se[t] {option} set boolean option (switch it on),
  527. show string or number option
  528. |:set| :se[t] no{option} reset boolean option (switch it off)
  529. |:set| :se[t] inv{option} invert boolean option
  530. |:set| :se[t] {option}={value} set string/number option to {value}
  531. |:set| :se[t] {option}+={value} append {value} to string option, add
  532. {value} to number option
  533. |:set| :se[t] {option}-={value} remove {value} to string option,
  534. subtract {value} from number option
  535. |:set| :se[t] {option}? show value of {option}
  536. |:set| :se[t] {option}& reset {option} to its default value
  537. |:setlocal| :setl[ocal] like ":set" but set the local value
  538. for options that have one
  539. |:setglobal| :setg[lobal] like ":set" but set the global value
  540. of a local option
  541. |:options| :opt[ions] open a new window to view and set
  542. options, grouped by functionality,
  543. a one line explanation and links to
  544. the help
  545. Short explanation of each option: *option-list*
  546. 'allowrevins' 'ari' allow CTRL-_ in Insert mode
  547. 'ambiwidth' 'ambw' what to do with Unicode chars of ambiguous width
  548. 'arabic' 'arab' for Arabic as a default second language
  549. 'arabicshape' 'arshape' do shaping for Arabic characters
  550. 'autochdir' 'acd' change directory to the file in the current window
  551. 'autoindent' 'ai' take indent for new line from previous line
  552. 'autoread' 'ar' autom. read file when changed outside of Vim
  553. 'autowrite' 'aw' automatically write file if changed
  554. 'autowriteall' 'awa' as 'autowrite', but works with more commands
  555. 'background' 'bg' "dark" or "light", used for highlight colors
  556. 'backspace' 'bs' how backspace works at start of line
  557. 'backup' 'bk' keep backup file after overwriting a file
  558. 'backupcopy' 'bkc' make backup as a copy, don't rename the file
  559. 'backupdir' 'bdir' list of directories for the backup file
  560. 'backupext' 'bex' extension used for the backup file
  561. 'backupskip' 'bsk' no backup for files that match these patterns
  562. 'belloff' 'bo' do not ring the bell for these reasons
  563. 'binary' 'bin' read/write/edit file in binary mode
  564. 'bomb' prepend a Byte Order Mark to the file
  565. 'breakat' 'brk' characters that may cause a line break
  566. 'breakindent' 'bri' wrapped line repeats indent
  567. 'breakindentopt' 'briopt' settings for 'breakindent'
  568. 'browsedir' 'bsdir' which directory to start browsing in
  569. 'bufhidden' 'bh' what to do when buffer is no longer in window
  570. 'buflisted' 'bl' whether the buffer shows up in the buffer list
  571. 'buftype' 'bt' special type of buffer
  572. 'casemap' 'cmp' specifies how case of letters is changed
  573. 'cdhome' 'cdh' change directory to the home directory by ":cd"
  574. 'cdpath' 'cd' list of directories searched with ":cd"
  575. 'cedit' key used to open the command-line window
  576. 'charconvert' 'ccv' expression for character encoding conversion
  577. 'cindent' 'cin' do C program indenting
  578. 'cinkeys' 'cink' keys that trigger indent when 'cindent' is set
  579. 'cinoptions' 'cino' how to do indenting when 'cindent' is set
  580. 'cinscopedecls' 'cinsd' words that are recognized by 'cino-g'
  581. 'cinwords' 'cinw' words where 'si' and 'cin' add an indent
  582. 'clipboard' 'cb' use the clipboard as the unnamed register
  583. 'cmdheight' 'ch' number of lines to use for the command-line
  584. 'cmdwinheight' 'cwh' height of the command-line window
  585. 'colorcolumn' 'cc' columns to highlight
  586. 'columns' 'co' number of columns in the display
  587. 'comments' 'com' patterns that can start a comment line
  588. 'commentstring' 'cms' template for comments; used for fold marker
  589. 'complete' 'cpt' specify how Insert mode completion works
  590. 'completefunc' 'cfu' function to be used for Insert mode completion
  591. 'completeopt' 'cot' options for Insert mode completion
  592. 'completeslash' 'csl' like 'shellslash' for completion
  593. 'concealcursor' 'cocu' whether concealable text is hidden in cursor line
  594. 'conceallevel' 'cole' whether concealable text is shown or hidden
  595. 'confirm' 'cf' ask what to do about unsaved/read-only files
  596. 'copyindent' 'ci' make 'autoindent' use existing indent structure
  597. 'cpoptions' 'cpo' flags for Vi-compatible behavior
  598. 'cursorbind' 'crb' move cursor in window as it moves in other windows
  599. 'cursorcolumn' 'cuc' highlight the screen column of the cursor
  600. 'cursorline' 'cul' highlight the screen line of the cursor
  601. 'cursorlineopt' 'culopt' settings for 'cursorline'
  602. 'debug' set to "msg" to see all error messages
  603. 'define' 'def' pattern to be used to find a macro definition
  604. 'delcombine' 'deco' delete combining characters on their own
  605. 'dictionary' 'dict' list of file names used for keyword completion
  606. 'diff' use diff mode for the current window
  607. 'diffexpr' 'dex' expression used to obtain a diff file
  608. 'diffopt' 'dip' options for using diff mode
  609. 'digraph' 'dg' enable the entering of digraphs in Insert mode
  610. 'directory' 'dir' list of directory names for the swap file
  611. 'display' 'dy' list of flags for how to display text
  612. 'eadirection' 'ead' in which direction 'equalalways' works
  613. 'encoding' 'enc' encoding used internally
  614. 'endoffile' 'eof' write CTRL-Z at end of the file
  615. 'endofline' 'eol' write <EOL> for last line in file
  616. 'equalalways' 'ea' windows are automatically made the same size
  617. 'equalprg' 'ep' external program to use for "=" command
  618. 'errorbells' 'eb' ring the bell for error messages
  619. 'errorfile' 'ef' name of the errorfile for the QuickFix mode
  620. 'errorformat' 'efm' description of the lines in the error file
  621. 'eventignore' 'ei' autocommand events that are ignored
  622. 'expandtab' 'et' use spaces when <Tab> is inserted
  623. 'exrc' 'ex' read init files in the current directory
  624. 'fileencoding' 'fenc' file encoding for multibyte text
  625. 'fileencodings' 'fencs' automatically detected character encodings
  626. 'fileformat' 'ff' file format used for file I/O
  627. 'fileformats' 'ffs' automatically detected values for 'fileformat'
  628. 'fileignorecase' 'fic' ignore case when using file names
  629. 'filetype' 'ft' type of file, used for autocommands
  630. 'fillchars' 'fcs' characters to use for displaying special items
  631. 'findfunc' 'ffu' function to be called for the |:find| command
  632. 'fixendofline' 'fixeol' make sure last line in file has <EOL>
  633. 'foldclose' 'fcl' close a fold when the cursor leaves it
  634. 'foldcolumn' 'fdc' width of the column used to indicate folds
  635. 'foldenable' 'fen' set to display all folds open
  636. 'foldexpr' 'fde' expression used when 'foldmethod' is "expr"
  637. 'foldignore' 'fdi' ignore lines when 'foldmethod' is "indent"
  638. 'foldlevel' 'fdl' close folds with a level higher than this
  639. 'foldlevelstart' 'fdls' 'foldlevel' when starting to edit a file
  640. 'foldmarker' 'fmr' markers used when 'foldmethod' is "marker"
  641. 'foldmethod' 'fdm' folding type
  642. 'foldminlines' 'fml' minimum number of lines for a fold to be closed
  643. 'foldnestmax' 'fdn' maximum fold depth
  644. 'foldopen' 'fdo' for which commands a fold will be opened
  645. 'foldtext' 'fdt' expression used to display for a closed fold
  646. 'formatexpr' 'fex' expression used with "gq" command
  647. 'formatlistpat' 'flp' pattern used to recognize a list header
  648. 'formatoptions' 'fo' how automatic formatting is to be done
  649. 'formatprg' 'fp' name of external program used with "gq" command
  650. 'fsync' 'fs' whether to invoke fsync() after file write
  651. 'gdefault' 'gd' the ":substitute" flag 'g' is default on
  652. 'grepformat' 'gfm' format of 'grepprg' output
  653. 'grepprg' 'gp' program to use for ":grep"
  654. 'guicursor' 'gcr' GUI: settings for cursor shape and blinking
  655. 'guifont' 'gfn' GUI: Name(s) of font(s) to be used
  656. 'guifontwide' 'gfw' list of font names for double-wide characters
  657. 'guioptions' 'go' GUI: Which components and options are used
  658. 'guitablabel' 'gtl' GUI: custom label for a tab page
  659. 'guitabtooltip' 'gtt' GUI: custom tooltip for a tab page
  660. 'helpfile' 'hf' full path name of the main help file
  661. 'helpheight' 'hh' minimum height of a new help window
  662. 'helplang' 'hlg' preferred help languages
  663. 'hidden' 'hid' don't unload buffer when it is |abandon|ed
  664. 'history' 'hi' number of command-lines that are remembered
  665. 'hlsearch' 'hls' highlight matches with last search pattern
  666. 'icon' let Vim set the text of the window icon
  667. 'iconstring' string to use for the Vim icon text
  668. 'ignorecase' 'ic' ignore case in search patterns
  669. 'imcmdline' 'imc' use IM when starting to edit a command line
  670. 'imdisable' 'imd' do not use the IM in any mode
  671. 'iminsert' 'imi' use :lmap or IM in Insert mode
  672. 'imsearch' 'ims' use :lmap or IM when typing a search pattern
  673. 'include' 'inc' pattern to be used to find an include file
  674. 'includeexpr' 'inex' expression used to process an include line
  675. 'incsearch' 'is' highlight match while typing search pattern
  676. 'indentexpr' 'inde' expression used to obtain the indent of a line
  677. 'indentkeys' 'indk' keys that trigger indenting with 'indentexpr'
  678. 'infercase' 'inf' adjust case of match for keyword completion
  679. 'isfname' 'isf' characters included in file names and pathnames
  680. 'isident' 'isi' characters included in identifiers
  681. 'iskeyword' 'isk' characters included in keywords
  682. 'isprint' 'isp' printable characters
  683. 'joinspaces' 'js' two spaces after a period with a join command
  684. 'jumpoptions' 'jop' specifies how jumping is done
  685. 'keymap' 'kmp' name of a keyboard mapping
  686. 'keymodel' 'km' enable starting/stopping selection with keys
  687. 'keywordprg' 'kp' program to use for the "K" command
  688. 'langmap' 'lmap' alphabetic characters for other language mode
  689. 'langmenu' 'lm' language to be used for the menus
  690. 'langremap' 'lrm' do apply 'langmap' to mapped characters
  691. 'laststatus' 'ls' tells when last window has status lines
  692. 'lazyredraw' 'lz' don't redraw while executing macros
  693. 'linebreak' 'lbr' wrap long lines at a blank
  694. 'lines' number of lines in the display
  695. 'linespace' 'lsp' number of pixel lines to use between characters
  696. 'lisp' automatic indenting for Lisp
  697. 'lispoptions' 'lop' changes how Lisp indenting is done
  698. 'lispwords' 'lw' words that change how lisp indenting works
  699. 'list' show <Tab> and <EOL>
  700. 'listchars' 'lcs' characters for displaying in list mode
  701. 'loadplugins' 'lpl' load plugin scripts when starting up
  702. 'magic' changes special characters in search patterns
  703. 'makeef' 'mef' name of the errorfile for ":make"
  704. 'makeencoding' 'menc' encoding of external make/grep commands
  705. 'makeprg' 'mp' program to use for the ":make" command
  706. 'matchpairs' 'mps' pairs of characters that "%" can match
  707. 'matchtime' 'mat' tenths of a second to show matching paren
  708. 'maxcombine' 'mco' maximum nr of combining characters displayed
  709. 'maxfuncdepth' 'mfd' maximum recursive depth for user functions
  710. 'maxmapdepth' 'mmd' maximum recursive depth for mapping
  711. 'maxmempattern' 'mmp' maximum memory (in Kbyte) used for pattern search
  712. 'menuitems' 'mis' maximum number of items in a menu
  713. 'mkspellmem' 'msm' memory used before |:mkspell| compresses the tree
  714. 'modeline' 'ml' recognize modelines at start or end of file
  715. 'modelineexpr' 'mle' allow setting expression options from a modeline
  716. 'modelines' 'mls' number of lines checked for modelines
  717. 'modifiable' 'ma' changes to the text are not possible
  718. 'modified' 'mod' buffer has been modified
  719. 'more' pause listings when the whole screen is filled
  720. 'mouse' enable the use of mouse clicks
  721. 'mousefocus' 'mousef' keyboard focus follows the mouse
  722. 'mousehide' 'mh' hide mouse pointer while typing
  723. 'mousemodel' 'mousem' changes meaning of mouse buttons
  724. 'mousemoveevent' 'mousemev' report mouse moves with <MouseMove>
  725. 'mousescroll' amount to scroll by when scrolling with a mouse
  726. 'mouseshape' 'mouses' shape of the mouse pointer in different modes
  727. 'mousetime' 'mouset' max time between mouse double-click
  728. 'nrformats' 'nf' number formats recognized for CTRL-A command
  729. 'number' 'nu' print the line number in front of each line
  730. 'numberwidth' 'nuw' number of columns used for the line number
  731. 'omnifunc' 'ofu' function for filetype-specific completion
  732. 'opendevice' 'odev' allow reading/writing devices on MS-Windows
  733. 'operatorfunc' 'opfunc' function to be called for |g@| operator
  734. 'packpath' 'pp' list of directories used for packages
  735. 'paragraphs' 'para' nroff macros that separate paragraphs
  736. 'patchexpr' 'pex' expression used to patch a file
  737. 'patchmode' 'pm' keep the oldest version of a file
  738. 'path' 'pa' list of directories searched with "gf" et.al.
  739. 'preserveindent' 'pi' preserve the indent structure when reindenting
  740. 'previewheight' 'pvh' height of the preview window
  741. 'previewwindow' 'pvw' identifies the preview window
  742. 'pumheight' 'ph' maximum number of items to show in the popup menu
  743. 'pumwidth' 'pw' minimum width of the popup menu
  744. 'pyxversion' 'pyx' Python version used for pyx* commands
  745. 'quoteescape' 'qe' escape characters used in a string
  746. 'readonly' 'ro' disallow writing the buffer
  747. 'redrawtime' 'rdt' timeout for 'hlsearch' and |:match| highlighting
  748. 'regexpengine' 're' default regexp engine to use
  749. 'relativenumber' 'rnu' show relative line number in front of each line
  750. 'report' threshold for reporting nr. of lines changed
  751. 'revins' 'ri' inserting characters will work backwards
  752. 'rightleft' 'rl' window is right-to-left oriented
  753. 'rightleftcmd' 'rlc' commands for which editing works right-to-left
  754. 'ruler' 'ru' show cursor line and column in the status line
  755. 'rulerformat' 'ruf' custom format for the ruler
  756. 'runtimepath' 'rtp' list of directories used for runtime files
  757. 'scroll' 'scr' lines to scroll with CTRL-U and CTRL-D
  758. 'scrollbind' 'scb' scroll in window as other windows scroll
  759. 'scrolljump' 'sj' minimum number of lines to scroll
  760. 'scrolloff' 'so' minimum nr. of lines above and below cursor
  761. 'scrollopt' 'sbo' how 'scrollbind' should behave
  762. 'sections' 'sect' nroff macros that separate sections
  763. 'secure' secure mode for reading .vimrc in current dir
  764. 'selection' 'sel' what type of selection to use
  765. 'selectmode' 'slm' when to use Select mode instead of Visual mode
  766. 'sessionoptions' 'ssop' options for |:mksession|
  767. 'shada' 'sd' use .shada file upon startup and exiting
  768. 'shell' 'sh' name of shell to use for external commands
  769. 'shellcmdflag' 'shcf' flag to shell to execute one command
  770. 'shellpipe' 'sp' string to put output of ":make" in error file
  771. 'shellquote' 'shq' quote character(s) for around shell command
  772. 'shellredir' 'srr' string to put output of filter in a temp file
  773. 'shellslash' 'ssl' use forward slash for shell file names
  774. 'shelltemp' 'stmp' whether to use a temp file for shell commands
  775. 'shellxescape' 'sxe' characters to escape when 'shellxquote' is (
  776. 'shellxquote' 'sxq' like 'shellquote', but include redirection
  777. 'shiftround' 'sr' round indent to multiple of shiftwidth
  778. 'shiftwidth' 'sw' number of spaces to use for (auto)indent step
  779. 'shortmess' 'shm' list of flags, reduce length of messages
  780. 'showbreak' 'sbr' string to use at the start of wrapped lines
  781. 'showcmd' 'sc' show (partial) command somewhere
  782. 'showcmdloc' 'sloc' where to show (partial) command
  783. 'showfulltag' 'sft' show full tag pattern when completing tag
  784. 'showmatch' 'sm' briefly jump to matching bracket if insert one
  785. 'showmode' 'smd' message on status line to show current mode
  786. 'showtabline' 'stal' tells when the tab pages line is displayed
  787. 'sidescroll' 'ss' minimum number of columns to scroll horizontal
  788. 'sidescrolloff' 'siso' min. nr. of columns to left and right of cursor
  789. 'signcolumn' 'scl' when and how to display the sign column
  790. 'smartcase' 'scs' no ignore case when pattern has uppercase
  791. 'smartindent' 'si' smart autoindenting for C programs
  792. 'smarttab' 'sta' use 'shiftwidth' when inserting <Tab>
  793. 'smoothscroll' 'sms' scroll by screen lines when 'wrap' is set
  794. 'softtabstop' 'sts' number of spaces that <Tab> uses while editing
  795. 'spell' enable spell checking
  796. 'spellcapcheck' 'spc' pattern to locate end of a sentence
  797. 'spellfile' 'spf' files where |zg| and |zw| store words
  798. 'spelllang' 'spl' language(s) to do spell checking for
  799. 'spelloptions' 'spo' options for spell checking
  800. 'spellsuggest' 'sps' method(s) used to suggest spelling corrections
  801. 'splitbelow' 'sb' new window from split is below the current one
  802. 'splitkeep' 'spk' determines scroll behavior for split windows
  803. 'splitright' 'spr' new window is put right of the current one
  804. 'startofline' 'sol' commands move cursor to first non-blank in line
  805. 'statuscolumn' 'stc' custom format for the status column
  806. 'statusline' 'stl' custom format for the status line
  807. 'suffixes' 'su' suffixes that are ignored with multiple match
  808. 'suffixesadd' 'sua' suffixes added when searching for a file
  809. 'swapfile' 'swf' whether to use a swapfile for a buffer
  810. 'switchbuf' 'swb' sets behavior when switching to another buffer
  811. 'synmaxcol' 'smc' maximum column to find syntax items
  812. 'syntax' 'syn' syntax to be loaded for current buffer
  813. 'tabclose' 'tcl' which tab page to focus when closing a tab
  814. 'tabline' 'tal' custom format for the console tab pages line
  815. 'tabpagemax' 'tpm' maximum number of tab pages for |-p| and "tab all"
  816. 'tabstop' 'ts' number of spaces that <Tab> in file uses
  817. 'tagbsearch' 'tbs' use binary searching in tags files
  818. 'tagcase' 'tc' how to handle case when searching in tags files
  819. 'tagfunc' 'tfu' function to get list of tag matches
  820. 'taglength' 'tl' number of significant characters for a tag
  821. 'tagrelative' 'tr' file names in tag file are relative
  822. 'tags' 'tag' list of file names used by the tag command
  823. 'tagstack' 'tgst' push tags onto the tag stack
  824. 'term' name of the terminal
  825. 'termbidi' 'tbidi' terminal takes care of bi-directionality
  826. 'termguicolors' 'tgc' enable 24-bit RGB color in the TUI
  827. 'textwidth' 'tw' maximum width of text that is being inserted
  828. 'thesaurus' 'tsr' list of thesaurus files for keyword completion
  829. 'thesaurusfunc' 'tsrfu' function to be used for thesaurus completion
  830. 'tildeop' 'top' tilde command "~" behaves like an operator
  831. 'timeout' 'to' time out on mappings and key codes
  832. 'timeoutlen' 'tm' time out time in milliseconds
  833. 'title' let Vim set the title of the window
  834. 'titlelen' percentage of 'columns' used for window title
  835. 'titleold' old title, restored when exiting
  836. 'titlestring' string to use for the Vim window title
  837. 'ttimeout' time out on mappings
  838. 'ttimeoutlen' 'ttm' time out time for key codes in milliseconds
  839. 'ttytype' 'tty' alias for 'term'
  840. 'undodir' 'udir' where to store undo files
  841. 'undofile' 'udf' save undo information in a file
  842. 'undolevels' 'ul' maximum number of changes that can be undone
  843. 'undoreload' 'ur' max nr of lines to save for undo on a buffer reload
  844. 'updatecount' 'uc' after this many characters flush swap file
  845. 'updatetime' 'ut' after this many milliseconds flush swap file
  846. 'varsofttabstop' 'vsts' a list of number of spaces when typing <Tab>
  847. 'vartabstop' 'vts' a list of number of spaces for <Tab>s
  848. 'verbose' 'vbs' give informative messages
  849. 'verbosefile' 'vfile' file to write messages in
  850. 'viewdir' 'vdir' directory where to store files with :mkview
  851. 'viewoptions' 'vop' specifies what to save for :mkview
  852. 'virtualedit' 've' when to use virtual editing
  853. 'visualbell' 'vb' use visual bell instead of beeping
  854. 'warn' warn for shell command when buffer was changed
  855. 'whichwrap' 'ww' allow specified keys to cross line boundaries
  856. 'wildchar' 'wc' command-line character for wildcard expansion
  857. 'wildcharm' 'wcm' like 'wildchar' but also works when mapped
  858. 'wildignore' 'wig' files matching these patterns are not completed
  859. 'wildignorecase' 'wic' ignore case when completing file names
  860. 'wildmenu' 'wmnu' use menu for command line completion
  861. 'wildmode' 'wim' mode for 'wildchar' command-line expansion
  862. 'wildoptions' 'wop' specifies how command line completion is done
  863. 'winaltkeys' 'wak' when the windows system handles ALT keys
  864. 'window' 'wi' nr of lines to scroll for CTRL-F and CTRL-B
  865. 'winfixbuf' 'wfb' keep window focused on a single buffer
  866. 'winfixheight' 'wfh' keep window height when opening/closing windows
  867. 'winfixwidth' 'wfw' keep window width when opening/closing windows
  868. 'winheight' 'wh' minimum number of lines for the current window
  869. 'winhighlight' 'winhl' window-local highlighting
  870. 'winminheight' 'wmh' minimum number of lines for any window
  871. 'winminwidth' 'wmw' minimal number of columns for any window
  872. 'winwidth' 'wiw' minimal number of columns for current window
  873. 'wrap' long lines wrap and continue on the next line
  874. 'wrapmargin' 'wm' chars from the right where wrapping starts
  875. 'wrapscan' 'ws' searches wrap around the end of the file
  876. 'write' writing to a file is allowed
  877. 'writeany' 'wa' write to file with no need for "!" override
  878. 'writebackup' 'wb' make a backup before overwriting a file
  879. 'writedelay' 'wd' delay this many msec for each char (for debug)
  880. ------------------------------------------------------------------------------
  881. *Q_ur* Undo/Redo commands
  882. |u| N u undo last N changes
  883. |CTRL-R| N CTRL-R redo last N undone changes
  884. |U| U restore last changed line
  885. ------------------------------------------------------------------------------
  886. *Q_et* External commands
  887. |:!| :!{command} execute {command} with a shell
  888. |K| K lookup keyword under the cursor with
  889. 'keywordprg' program (default: "man")
  890. ------------------------------------------------------------------------------
  891. *Q_qf* Quickfix commands
  892. |:cc| :cc [nr] display error [nr] (default is the same again)
  893. |:cnext| :cn display the next error
  894. |:cprevious| :cp display the previous error
  895. |:clist| :cl list all errors
  896. |:cfile| :cf read errors from the file 'errorfile'
  897. |:cgetbuffer| :cgetb like :cbuffer but don't jump to the first error
  898. |:cgetfile| :cg like :cfile but don't jump to the first error
  899. |:cgetexpr| :cgete like :cexpr but don't jump to the first error
  900. |:caddfile| :caddf add errors from the error file to the current
  901. quickfix list
  902. |:caddexpr| :cad add errors from an expression to the current
  903. quickfix list
  904. |:cbuffer| :cb read errors from text in a buffer
  905. |:cexpr| :cex read errors from an expression
  906. |:cquit| :cq quit without writing and return error code (to
  907. the compiler)
  908. |:make| :make [args] start make, read errors, and jump to first
  909. error
  910. |:grep| :gr[ep] [args] execute 'grepprg' to find matches and jump to
  911. the first one
  912. ------------------------------------------------------------------------------
  913. *Q_vc* Various commands
  914. |CTRL-L| CTRL-L clear and redraw the screen
  915. |CTRL-G| CTRL-G show current file name (with path) and cursor
  916. position
  917. |ga| ga show ascii value of character under cursor in
  918. decimal, hex, and octal
  919. |g8| g8 for utf-8 encoding: show byte sequence for
  920. character under cursor in hex
  921. |g_CTRL-G| g CTRL-G show cursor column, line, and character
  922. position
  923. |CTRL-C| CTRL-C during searches: Interrupt the search
  924. |<Del>| <Del> while entering a count: delete last character
  925. |:version| :ve[rsion] show version information
  926. |:normal| :norm[al][!] {commands}
  927. execute Normal mode commands
  928. |gQ| gQ switch to "Ex" mode
  929. |:redir| :redir >{file} redirect messages to {file}
  930. |:silent| :silent[!] {command} execute {command} silently
  931. |:confirm| :confirm {command} quit, write, etc., asking about
  932. unsaved changes or read-only files
  933. |:browse| :browse {command} open/read/write file, using a
  934. file selection dialog
  935. ------------------------------------------------------------------------------
  936. *Q_ce* Command-line editing
  937. |c_<Esc>| <Esc> abandon command-line (if 'wildchar' is
  938. <Esc>, type it twice)
  939. |c_CTRL-V| CTRL-V {char} insert {char} literally
  940. |c_CTRL-V| CTRL-V {number} enter decimal value of character (up to
  941. three digits)
  942. |c_CTRL-K| CTRL-K {char1} {char2}
  943. enter digraph (See |Q_di|)
  944. |c_CTRL-R| CTRL-R {register} insert the contents of a register
  945. |c_<Left>| <Left>/<Right> cursor left/right
  946. |c_<S-Left>| <S-Left>/<S-Right> cursor one word left/right
  947. |c_CTRL-B| CTRL-B/CTRL-E cursor to beginning/end of command-line
  948. |c_<BS>| <BS> delete the character in front of the cursor
  949. |c_<Del>| <Del> delete the character under the cursor
  950. |c_CTRL-W| CTRL-W delete the word in front of the cursor
  951. |c_CTRL-U| CTRL-U remove all characters
  952. |c_<Up>| <Up>/<Down> recall older/newer command-line that starts
  953. with current command
  954. |c_<S-Up>| <S-Up>/<S-Down> recall older/newer command-line from history
  955. |c_CTRL-G| CTRL-G next match when 'incsearch' is active
  956. |c_CTRL-T| CTRL-T previous match when 'incsearch' is active
  957. |:history| :his[tory] show older command-lines
  958. Context-sensitive completion on the command-line:
  959. |c_wildchar| 'wildchar' (default: <Tab>)
  960. do completion on the pattern in front of the
  961. cursor; if there are multiple matches,
  962. beep and show the first one; further
  963. 'wildchar' will show the next ones
  964. |c_CTRL-D| CTRL-D list all names that match the pattern in
  965. front of the cursor
  966. |c_CTRL-A| CTRL-A insert all names that match pattern in front
  967. of cursor
  968. |c_CTRL-L| CTRL-L insert longest common part of names that
  969. match pattern
  970. |c_CTRL-N| CTRL-N after 'wildchar' with multiple matches: go
  971. to next match
  972. |c_CTRL-P| CTRL-P after 'wildchar' with multiple matches: go
  973. to previous match
  974. ------------------------------------------------------------------------------
  975. *Q_ra* Ex ranges
  976. |:range| , separates two line numbers
  977. |:range| ; idem, set cursor to the first line number
  978. before interpreting the second one
  979. |:range| {number} an absolute line number
  980. |:range| . the current line
  981. |:range| $ the last line in the file
  982. |:range| % equal to 1,$ (the entire file)
  983. |:range| * equal to '<,'> (visual area)
  984. |:range| 't position of mark t
  985. |:range| /{pattern}[/] the next line where {pattern} matches
  986. |:range| ?{pattern}[?] the previous line where {pattern} matches
  987. |:range| +[num] add [num] to the preceding line number
  988. (default: 1)
  989. |:range| -[num] subtract [num] from the preceding line
  990. number (default: 1)
  991. ------------------------------------------------------------------------------
  992. *Q_ex* Special Ex characters
  993. |:bar| | separates two commands (not for ":global" and ":!")
  994. |:quote| " begins comment
  995. |:_%| % current file name (only where a file name is expected)
  996. |:_#| #[num] alternate file name [num] (only where a file name is
  997. expected)
  998. Note: The next seven are typed literally; these are not special keys!
  999. |:<abuf>| <abuf> buffer number, for use in an autocommand (only where a
  1000. file name is expected)
  1001. |:<afile>| <afile> file name, for use in an autocommand (only where a
  1002. file name is expected)
  1003. |:<amatch>| <amatch> what matched with the pattern, for use in an
  1004. autocommand (only where a file name is expected)
  1005. |:<cword>| <cword> word under the cursor (only where a file name is
  1006. expected)
  1007. |:<cWORD>| <cWORD> WORD under the cursor (only where a file name is
  1008. expected) (see |WORD|)
  1009. |:<cfile>| <cfile> file name under the cursor (only where a file name is
  1010. expected)
  1011. |:<sfile>| <sfile> file name of a ":source"d file, within that file (only
  1012. where a file name is expected)
  1013. After "%", "#", "<cfile>", "<sfile>" or "<afile>"
  1014. |::p| :p full path
  1015. |::h| :h head (file name removed)
  1016. |::t| :t tail (file name only)
  1017. |::r| :r root (extension removed)
  1018. |::e| :e extension
  1019. |::s| :s/{pat}/{repl}/ substitute {pat} with {repl}
  1020. ------------------------------------------------------------------------------
  1021. *Q_st* Starting Vim
  1022. |-file| vim [options] {file} .. start editing one or more files
  1023. |--| vim [options] - read file from stdin
  1024. |-tag| vim [options] -t {tag} edit the file associated with {tag}
  1025. |-qf| vim [options] -q [fname] start editing in QuickFix mode,
  1026. display the first error
  1027. Most useful Vim arguments (for full list see |startup-options|)
  1028. |-+| +[num] put the cursor at line [num] (default: last line)
  1029. |-+c| +{command} execute {command} after loading the file
  1030. |-+/| +/{pat} {file} .. put the cursor at the first occurrence of {pat}
  1031. |-e| -e Ex mode, start vim in Ex mode
  1032. |-R| -R Read-only mode, implies -n
  1033. |-m| -m modifications not allowed (resets 'write' option)
  1034. |-d| -d |diff-mode|
  1035. |-b| -b binary mode
  1036. |-l| -l lisp mode
  1037. |-A| -A Arabic mode ('arabic' is set)
  1038. |-H| -H Hebrew mode (Hebrew keymap & 'rightleft' are set)
  1039. |-V| -V Verbose, give informative messages
  1040. |-r| -r give list of swap files
  1041. |-r| -r {file} .. recover aborted edit session
  1042. |-n| -n do not create a swap file
  1043. |-o| -o [num] open [num] windows (default: one for each file)
  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. |-u| -u {vimrc} read inits from {vimrc} instead of other inits
  1048. |-i| -i {shada} read info from {shada} instead of other files
  1049. |---| -- end of options, other arguments are file names
  1050. |--help| --help show list of arguments and exit
  1051. |--version| --version show version info and exit
  1052. |--| - read file from stdin
  1053. ------------------------------------------------------------------------------
  1054. *Q_ed* Editing a file
  1055. Without !: Fail if changes have been made to the current buffer.
  1056. With !: Discard any changes to the current buffer.
  1057. |:edit_f| :e[dit][!] {file} edit {file}
  1058. |:edit| :e[dit][!] reload the current file
  1059. |:enew| :ene[w][!] edit a new, unnamed buffer
  1060. |:find| :fin[d][!] {file} find {file} in 'path' and edit it
  1061. |CTRL-^| N CTRL-^ edit alternate file N (equivalent to ":e #N")
  1062. |gf| gf or ]f edit the file whose name is under the cursor
  1063. |:pwd| :pwd print the current directory name
  1064. |:cd| :cd [path] change the current directory to [path]
  1065. |:cd-| :cd - back to previous current directory
  1066. |:file| :f[ile] print the current file name and the cursor
  1067. position
  1068. |:file| :f[ile] {name} set the current file name to {name}
  1069. |:files| :files show alternate file names
  1070. ------------------------------------------------------------------------------
  1071. *Q_fl* Using the argument list |argument-list|
  1072. |:args| :ar[gs] print the argument list, with the current file
  1073. in "[]"
  1074. |:all| :all or :sall open a window for every file in the arg list
  1075. |:wn| :wn[ext][!] write file and edit next file
  1076. |:wn| :wn[ext][!] {file} write to {file} and edit next file, unless
  1077. {file} exists; With !, overwrite existing
  1078. file
  1079. |:wN| :wN[ext][!] [file] write file and edit previous file
  1080. in current window in new window ~
  1081. |:argument| :argu[ment] N :sar[gument] N edit file N
  1082. |:next| :n[ext] :sn[ext] edit next file
  1083. |:next_f| :n[ext] {arglist} :sn[ext] {arglist} define new arg list
  1084. and edit first file
  1085. |:Next| :N[ext] :sN[ext] edit previous file
  1086. |:first| :fir[st] :sfir[st] edit first file
  1087. |:last| :la[st] :sla[st] edit last file
  1088. ------------------------------------------------------------------------------
  1089. *Q_wq* Writing and quitting
  1090. |:w| :[range]w[rite][!] write to the current file
  1091. |:w_f| :[range]w[rite] {file} write to {file}, unless it already
  1092. exists
  1093. |:w_f| :[range]w[rite]! {file} write to {file}. Overwrite an existing
  1094. file
  1095. |:w_a| :[range]w[rite][!] >> append to the current file
  1096. |:w_a| :[range]w[rite][!] >> {file} append to {file}
  1097. |:w_c| :[range]w[rite] !{cmd} execute {cmd} with [range] lines as
  1098. standard input
  1099. |:up| :[range]up[date][!] write to current file if modified
  1100. |:wall| :wa[ll][!] write all changed buffers
  1101. |:q| :q[uit] quit current buffer, unless changes have been
  1102. made; Exit Vim when there are no other
  1103. non-help buffers
  1104. |:q| :q[uit]! quit current buffer always, discard any
  1105. changes. Exit Vim when there are no other
  1106. non-help buffers
  1107. |:qa| :qa[ll] exit Vim, unless changes have been made
  1108. |:qa| :qa[ll]! exit Vim always, discard any changes
  1109. |:cq| :cq quit without writing and return error code
  1110. |:wq| :wq[!] write the current file and exit
  1111. |:wq| :wq[!] {file} write to {file} and exit
  1112. |:xit| :x[it][!] [file] like ":wq" but write only when changes have
  1113. been made
  1114. |ZZ| ZZ same as ":x"
  1115. |ZQ| ZQ same as ":q!"
  1116. |:xall| :xa[ll][!] or :wqall[!]
  1117. write all changed buffers and exit
  1118. |:stop| :st[op][!] suspend Vim or start new shell; if 'aw' option
  1119. is set and [!] not given write the buffer
  1120. |CTRL-Z| CTRL-Z same as ":stop"
  1121. ------------------------------------------------------------------------------
  1122. *Q_ac* Automatic Commands
  1123. |shada-file| read registers, marks, history at startup, save when exiting.
  1124. |:rshada| :rsh[ada] [file] read info from ShaDa file [file]
  1125. |:rshada| :rsh[ada]! [file] idem, overwrite existing info
  1126. |:wshada| :wsh[ada] [file] add info to ShaDa file [file]
  1127. |:wshada| :wsh[ada]! [file] write info to ShaDa file [file]
  1128. |modeline| Automatic option setting when editing a file
  1129. |modeline| vim:{set-arg}: .. In the first and last lines of the
  1130. file (see 'ml' option), {set-arg} is
  1131. given as an argument to ":set"
  1132. |autocommand| Automatic execution of commands on certain events.
  1133. |:autocmd| :au list all autocommands
  1134. |:autocmd| :au {event} list all autocommands for {event}
  1135. |:autocmd| :au {event} {pat} list all autocommands for {event}
  1136. with {pat}
  1137. |:autocmd| :au {event} {pat} {cmd} enter new autocommands for {event}
  1138. with {pat}
  1139. |:autocmd| :au! remove all autocommands
  1140. |:autocmd| :au! {event} remove all autocommands for {event}
  1141. |:autocmd| :au! * {pat} remove all autocommands for {pat}
  1142. |:autocmd| :au! {event} {pat} remove all autocommands for {event}
  1143. with {pat}
  1144. |:autocmd| :au! {event} {pat} {cmd} remove all autocommands for {event}
  1145. with {pat} and enter new one
  1146. ------------------------------------------------------------------------------
  1147. *Q_wi* Multi-window commands
  1148. |CTRL-W_s| CTRL-W s or :split split window into two parts
  1149. |:split_f| :split {file} split window and edit {file} in one of
  1150. them
  1151. |:vsplit| :vsplit {file} same, but split vertically
  1152. |:vertical| :vertical {cmd} make {cmd} split vertically
  1153. |:sfind| :sf[ind] {file} split window, find {file} in 'path'
  1154. and edit it
  1155. |:terminal| :terminal {cmd} open a terminal window
  1156. |CTRL-W_]| CTRL-W ] split window and jump to tag under
  1157. cursor
  1158. |CTRL-W_f| CTRL-W f split window and edit file name under
  1159. the cursor
  1160. |CTRL-W_^| CTRL-W ^ split window and edit alternate file
  1161. |CTRL-W_n| CTRL-W n or :new create new empty window
  1162. |CTRL-W_q| CTRL-W q or :q[uit] quit editing and close window
  1163. |CTRL-W_c| CTRL-W c or :clo[se] make buffer hidden and close window
  1164. |CTRL-W_o| CTRL-W o or :on[ly] make current window only one on the
  1165. screen
  1166. |CTRL-W_j| CTRL-W j move cursor to window below
  1167. |CTRL-W_k| CTRL-W k move cursor to window above
  1168. |CTRL-W_CTRL-W| CTRL-W CTRL-W move cursor to window below (wrap)
  1169. |CTRL-W_W| CTRL-W W move cursor to window above (wrap)
  1170. |CTRL-W_t| CTRL-W t move cursor to top window
  1171. |CTRL-W_b| CTRL-W b move cursor to bottom window
  1172. |CTRL-W_p| CTRL-W p move cursor to previous active window
  1173. |CTRL-W_r| CTRL-W r rotate windows downwards
  1174. |CTRL-W_R| CTRL-W R rotate windows upwards
  1175. |CTRL-W_x| CTRL-W x exchange current window with next one
  1176. |CTRL-W_=| CTRL-W = make all windows equal height & width
  1177. |CTRL-W_-| CTRL-W - decrease current window height
  1178. |CTRL-W_+| CTRL-W + increase current window height
  1179. |CTRL-W__| CTRL-W _ set current window height (default:
  1180. very high)
  1181. |CTRL-W_<| CTRL-W < decrease current window width
  1182. |CTRL-W_>| CTRL-W > increase current window width
  1183. |CTRL-W_bar| CTRL-W | set current window width (default:
  1184. widest possible)
  1185. ------------------------------------------------------------------------------
  1186. *Q_bu* Buffer list commands
  1187. |:buffers| :buffers or :files list all known buffer and file names
  1188. |:ball| :ball or :sball edit all args/buffers
  1189. |:unhide| :unhide or :sunhide edit all loaded buffers
  1190. |:badd| :badd {fname} add file name {fname} to the list
  1191. |:bunload| :bunload[!] [N] unload buffer [N] from memory
  1192. |:bdelete| :bdelete[!] [N] unload buffer [N] and delete it from
  1193. the buffer list
  1194. in current window in new window ~
  1195. |:buffer| :[N]buffer [N] :[N]sbuffer [N] to arg/buf N
  1196. |:bnext| :[N]bnext [N] :[N]sbnext [N] to Nth next arg/buf
  1197. |:bNext| :[N]bNext [N] :[N]sbNext [N] to Nth previous arg/buf
  1198. |:bprevious| :[N]bprevious [N] :[N]sbprevious [N] to Nth previous arg/buf
  1199. |:bfirst| :bfirst :sbfirst to first arg/buf
  1200. |:blast| :blast :sblast to last arg/buf
  1201. |:bmodified| :[N]bmod [N] :[N]sbmod [N] to Nth modified buf
  1202. ------------------------------------------------------------------------------
  1203. *Q_sy* Syntax Highlighting
  1204. |:syn-on| :syntax on start using syntax highlighting
  1205. |:syn-off| :syntax off stop using syntax highlighting
  1206. |:syn-keyword| :syntax keyword {group-name} {keyword} ..
  1207. add a syntax keyword item
  1208. |:syn-match| :syntax match {group-name} {pattern} ...
  1209. add syntax match item
  1210. |:syn-region| :syntax region {group-name} {pattern} ...
  1211. add syntax region item
  1212. |:syn-sync| :syntax sync [ccomment | lines {N} | ...]
  1213. tell syntax how to sync
  1214. |:syntax| :syntax [list] list current syntax items
  1215. |:syn-clear| :syntax clear clear all syntax info
  1216. |:highlight| :highlight clear clear all highlight info
  1217. |:highlight| :highlight {group-name} {key}={arg} ..
  1218. set highlighting for {group-name}
  1219. |:filetype| :filetype on switch on file type detection, without
  1220. syntax highlighting
  1221. |:filetype| :filetype plugin indent on
  1222. switch on file type detection, with
  1223. automatic indenting and settings
  1224. ------------------------------------------------------------------------------
  1225. *Q_gu* GUI commands
  1226. |:menu| :menu list all menus
  1227. |:menu| :menu {mpath} list menus starting with {mpath}
  1228. |:menu| :menu {mpath} {rhs} add menu {mpath}, giving {rhs}
  1229. |:menu| :menu {pri} {mpath} {rhs}
  1230. idem, with priorities {pri}
  1231. |:menu| :menu ToolBar.{name} {rhs}
  1232. add toolbar item, giving {rhs}
  1233. |:tmenu| :tmenu {mpath} {text} add tooltip to menu {mpath}
  1234. |:unmenu| :unmenu {mpath} remove menu {mpath}
  1235. ------------------------------------------------------------------------------
  1236. *Q_fo* Folding
  1237. |'foldmethod'| set foldmethod=manual manual folding
  1238. set foldmethod=indent folding by indent
  1239. set foldmethod=expr folding by 'foldexpr'
  1240. set foldmethod=syntax folding by syntax regions
  1241. set foldmethod=marker folding by 'foldmarker'
  1242. |zf| zf{motion} operator: Define a fold manually
  1243. |:fold| :{range}fold define a fold for {range} lines
  1244. |zd| zd delete one fold under the cursor
  1245. |zD| zD delete all folds under the cursor
  1246. |zo| zo open one fold under the cursor
  1247. |zO| zO open all folds under the cursor
  1248. |zc| zc close one fold under the cursor
  1249. |zC| zC close all folds under the cursor
  1250. |zm| zm fold more: decrease 'foldlevel'
  1251. |zM| zM close all folds: make 'foldlevel' zero
  1252. |zr| zr reduce folding: increase 'foldlevel'
  1253. |zR| zR open all folds: make 'foldlevel' max.
  1254. |zn| zn fold none: reset 'foldenable'
  1255. |zN| zN fold normal set 'foldenable'
  1256. |zi| zi invert 'foldenable'
  1257. vim:tw=78:ts=8:noet:ft=help:norl: