Advertisement
Guest User

Untitled

a guest
Mar 7th, 2013
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.66 KB | None | 0 0
  1. ==============================================================================
  2. 2. Normal mode *normal-index*
  3.  
  4. CHAR any non-blank character
  5. WORD a sequence of non-blank characters
  6. N a number entered before the command
  7. {motion} a cursor movement command
  8. Nmove the text that is moved over with a {motion}
  9. SECTION a section that possibly starts with '}' instead of '{'
  10.  
  11. note: 1 = cursor movement command; 2 = can be undone/redone
  12.  
  13. tag char note action in Normal mode ~
  14. ------------------------------------------------------------------------------
  15. CTRL-@ not used
  16. |CTRL-A| CTRL-A 2 add N to number at/after cursor
  17. |CTRL-B| CTRL-B 1 scroll N screens Backwards
  18. |CTRL-C| CTRL-C interrupt current (search) command
  19. |CTRL-D| CTRL-D scroll Down N lines (default: half a screen)
  20. |CTRL-E| CTRL-E scroll N lines upwards (N lines Extra)
  21. |CTRL-F| CTRL-F 1 scroll N screens Forward
  22. |CTRL-G| CTRL-G display current file name and position
  23. |<BS>| <BS> 1 same as "h"
  24. |CTRL-H| CTRL-H 1 same as "h"
  25. |<Tab>| <Tab> 1 go to N newer entry in jump list
  26. |CTRL-I| CTRL-I 1 same as <Tab>
  27. |<NL>| <NL> 1 same as "j"
  28. |CTRL-J| CTRL-J 1 same as "j"
  29. CTRL-K not used
  30. |CTRL-L| CTRL-L redraw screen
  31. |<CR>| <CR> 1 cursor to the first CHAR N lines lower
  32. |CTRL-M| CTRL-M 1 same as <CR>
  33. |CTRL-N| CTRL-N 1 same as "j"
  34. |CTRL-O| CTRL-O 1 go to N older entry in jump list
  35. |CTRL-P| CTRL-P 1 same as "k"
  36. CTRL-Q (used for terminal control flow)
  37. |CTRL-R| CTRL-R 2 redo changes which were undone with 'u'
  38. CTRL-S (used for terminal control flow)
  39. |CTRL-T| CTRL-T jump to N older Tag in tag list
  40. |CTRL-U| CTRL-U scroll N lines Upwards (default: half a
  41. screen)
  42. |CTRL-V| CTRL-V start blockwise Visual mode
  43. |CTRL-W| CTRL-W {char} window commands, see |CTRL-W|
  44. |CTRL-X| CTRL-X 2 subtract N from number at/after cursor
  45. |CTRL-Y| CTRL-Y scroll N lines downwards
  46. |CTRL-Z| CTRL-Z suspend program (or start new shell)
  47. CTRL-[ <Esc> not used
  48. |CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode (no-op)
  49. |CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode'
  50. CTRL-\ a - z reserved for extensions
  51. CTRL-\ others not used
  52. |CTRL-]| CTRL-] :ta to ident under cursor
  53. |CTRL-^| CTRL-^ edit Nth alternate file (equivalent to
  54. ":e #N")
  55. CTRL-_ not used
  56.  
  57. |<Space>| <Space> 1 same as "l"
  58. |!| !{motion}{filter}
  59. 2 filter Nmove text through the {filter}
  60. command
  61. |!!| !!{filter} 2 filter N lines through the {filter} command
  62. |quote| "{a-zA-Z0-9.%#:-"} use register {a-zA-Z0-9.%#:-"} for next
  63. delete, yank or put (uppercase to append)
  64. ({.%#:} only work with put)
  65. |#| # 1 search backward for the Nth occurrence of
  66. the ident under the cursor
  67. |$| $ 1 cursor to the end of Nth next line
  68. |%| % 1 find the next (curly/square) bracket on
  69. this line and go to its match, or go to
  70. matching comment bracket, or go to matching
  71. preprocessor directive.
  72. |N%| {count}% 1 go to N percentage in the file
  73. |&| & 2 repeat last :s
  74. |'| '{a-zA-Z0-9} 1 cursor to the first CHAR on the line with
  75. mark {a-zA-Z0-9}
  76. |''| '' 1 cursor to the first CHAR of the line where
  77. the cursor was before the latest jump.
  78. |'(| '( 1 cursor to the first CHAR on the line of the
  79. start of the current sentence
  80. |')| ') 1 cursor to the first CHAR on the line of the
  81. end of the current sentence
  82. |'<| '< 1 cursor to the first CHAR of the line where
  83. highlighted area starts/started in the
  84. current buffer.
  85. |'>| '> 1 cursor to the first CHAR of the line where
  86. highlighted area ends/ended in the current
  87. buffer.
  88. |'[| '[ 1 cursor to the first CHAR on the line of the
  89. start of last operated text or start of put
  90. text
  91. |']| '] 1 cursor to the first CHAR on the line of the
  92. end of last operated text or end of put
  93. text
  94. |'{| '{ 1 cursor to the first CHAR on the line of the
  95. start of the current paragraph
  96. |'}| '} 1 cursor to the first CHAR on the line of the
  97. end of the current paragraph
  98. |(| ( 1 cursor N sentences backward
  99. |)| ) 1 cursor N sentences forward
  100. |star| * 1 search forward for the Nth occurrence of
  101. the ident under the cursor
  102. |+| + 1 same as <CR>
  103. |,| , 1 repeat latest f, t, F or T in opposite
  104. direction N times
  105. |-| - 1 cursor to the first CHAR N lines higher
  106. |.| . 2 repeat last change with count replaced with
  107. N
  108. |/| /{pattern}<CR> 1 search forward for the Nth occurrence of
  109. {pattern}
  110. |/<CR>| /<CR> 1 search forward for {pattern} of last search
  111. |count| 0 1 cursor to the first char of the line
  112. |count| 1 prepend to command to give a count
  113. |count| 2 "
  114. |count| 3 "
  115. |count| 4 "
  116. |count| 5 "
  117. |count| 6 "
  118. |count| 7 "
  119. |count| 8 "
  120. |count| 9 "
  121. |:| : 1 start entering an Ex command
  122. |N:| {count}: start entering an Ex command with range
  123. from current line to N-1 lines down
  124. |;| ; 1 repeat latest f, t, F or T N times
  125. |<| <{motion} 2 shift Nmove lines one 'shiftwidth'
  126. leftwards
  127. |<<| << 2 shift N lines one 'shiftwidth' leftwards
  128. |=| ={motion} 2 filter Nmove lines through "indent"
  129. |==| == 2 filter N lines through "indent"
  130. |>| >{motion} 2 shift Nmove lines one 'shiftwidth'
  131. rightwards
  132. |>>| >> 2 shift N lines one 'shiftwidth' rightwards
  133. |?| ?{pattern}<CR> 1 search backward for the Nth previous
  134. occurrence of {pattern}
  135. |?<CR>| ?<CR> 1 search backward for {pattern} of last search
  136. |@| @{a-z} 2 execute the contents of register {a-z}
  137. N times
  138. |@:| @: repeat the previous ":" command N times
  139. |@@| @@ 2 repeat the previous @{a-z} N times
  140. |A| A 2 append text after the end of the line N times
  141. |B| B 1 cursor N WORDS backward
  142. |C| ["x]C 2 change from the cursor position to the end
  143. of the line, and N-1 more lines [into
  144. buffer x]; synonym for "c$"
  145. |D| ["x]D 2 delete the characters under the cursor
  146. until the end of the line and N-1 more
  147. lines [into buffer x]; synonym for "d$"
  148. |E| E 1 cursor forward to the end of WORD N
  149. |F| F{char} 1 cursor to the Nth occurrence of {char} to
  150. the left
  151. |G| G 1 cursor to line N, default last line
  152. |H| H 1 cursor to line N from top of screen
  153. |I| I 2 insert text before the first CHAR on the
  154. line N times
  155. |J| J 2 Join N lines; default is 2
  156. |K| K lookup Keyword under the cursor with
  157. 'keywordprg'
  158. |L| L 1 cursor to line N from bottom of screen
  159. |M| M 1 cursor to middle line of screen
  160. |N| N 1 repeat the latest '/' or '?' N times in
  161. opposite direction
  162. |O| O 2 begin a new line above the cursor and
  163. insert text, repeat N times
  164. |P| ["x]P 2 put the text [from buffer x] before the
  165. cursor N times
  166. |Q| Q switch to "Ex" mode
  167. |R| R 2 enter replace mode: overtype existing
  168. characters, repeat the entered text N-1
  169. times
  170. |S| ["x]S 2 delete N lines [into buffer x] and start
  171. insert; synonym for "cc".
  172. |T| T{char} 1 cursor till after Nth occurrence of {char}
  173. to the left
  174. |U| U 2 undo all latest changes on one line
  175. |V| V start linewise Visual mode
  176. |W| W 1 cursor N WORDS forward
  177. |X| ["x]X 2 delete N characters before the cursor [into
  178. buffer x]
  179. |Y| ["x]Y yank N lines [into buffer x]; synonym for
  180. "yy"
  181. |ZZ| ZZ store current file if modified, and exit
  182. |ZQ| ZQ exit current file always
  183. |[| [{char} square bracket command (see |[| below)
  184. \ not used
  185. |]| ]{char} square bracket command (see |]| below)
  186. |^| ^ 1 cursor to the first CHAR of the line
  187. |_| _ 1 cursor to the first CHAR N - 1 lines lower
  188. |`| `{a-zA-Z0-9} 1 cursor to the mark {a-zA-Z0-9}
  189. |`(| `( 1 cursor to the start of the current sentence
  190. |`)| `) 1 cursor to the end of the current sentence
  191. |`<| `< 1 cursor to the start of the highlighted area
  192. |`>| `> 1 cursor to the end of the highlighted area
  193. |`[| `[ 1 cursor to the start of last operated text
  194. or start of putted text
  195. |`]| `] 1 cursor to the end of last operated text or
  196. end of putted text
  197. |``| `` 1 cursor to the position before latest jump
  198. |`{| `{ 1 cursor to the start of the current paragraph
  199. |`}| `} 1 cursor to the end of the current paragraph
  200. |a| a 2 append text after the cursor N times
  201. |b| b 1 cursor N words backward
  202. |c| ["x]c{motion} 2 delete Nmove text [into buffer x] and start
  203. insert
  204. |cc| ["x]cc 2 delete N lines [into buffer x] and start
  205. insert
  206. |d| ["x]d{motion} 2 delete Nmove text [into buffer x]
  207. |dd| ["x]dd 2 delete N lines [into buffer x]
  208. |do| do 2 same as ":diffget"
  209. |dp| dp 2 same as ":diffput"
  210. |e| e 1 cursor forward to the end of word N
  211. |f| f{char} 1 cursor to Nth occurrence of {char} to the
  212. right
  213. |g| g{char} extended commands, see |g| below
  214. |h| h 1 cursor N chars to the left
  215. |i| i 2 insert text before the cursor N times
  216. |j| j 1 cursor N lines downward
  217. |k| k 1 cursor N lines upward
  218. |l| l 1 cursor N chars to the right
  219. |m| m{A-Za-z} set mark {A-Za-z} at cursor position
  220. |n| n 1 repeat the latest '/' or '?' N times
  221. |o| o 2 begin a new line below the cursor and
  222. insert text, repeat N times
  223. |p| ["x]p 2 put the text [from register x] after the
  224. cursor N times
  225. |q| q{0-9a-zA-Z"} record typed characters into named register
  226. {0-9a-zA-Z"} (uppercase to append)
  227. |q| q (while recording) stops recording
  228. |q:| q: edit : command-line in command-line window
  229. |q/| q/ edit / command-line in command-line window
  230. |q?| q? edit ? command-line in command-line window
  231. |r| r{char} 2 replace N chars with {char}
  232. |s| ["x]s 2 (substitute) delete N characters [into
  233. buffer x] and start insert
  234. |t| t{char} 1 cursor till before Nth occurrence of {char}
  235. to the right
  236. |u| u 2 undo changes
  237. |v| v start characterwise Visual mode
  238. |w| w 1 cursor N words forward
  239. |x| ["x]x 2 delete N characters under and after the
  240. cursor [into buffer x]
  241. |y| ["x]y{motion} yank Nmove text [into buffer x]
  242. |yy| ["x]yy yank N lines [into buffer x]
  243. |z| z{char} commands starting with 'z', see |z| below
  244. |{| { 1 cursor N paragraphs backward
  245. |bar| | 1 cursor to column N
  246. |}| } 1 cursor N paragraphs forward
  247. |~| ~ 2 'tildeop' off: switch case of N characters
  248. under cursor and move the cursor N
  249. characters to the right
  250. |~| ~{motion} 'tildeop' on: switch case of Nmove text
  251. |<C-End>| <C-End> 1 same as "G"
  252. |<C-Home>| <C-Home> 1 same as "gg"
  253. |<C-Left>| <C-Left> 1 same as "b"
  254. |<C-LeftMouse>| <C-LeftMouse> ":ta" to the keyword at the mouse click
  255. |<C-Right>| <C-Right> 1 same as "w"
  256. |<C-RightMouse>| <C-RightMouse> same as "CTRL-T"
  257. |<Del>| ["x]<Del> 2 same as "x"
  258. |N<Del>| {count}<Del> remove the last digit from {count}
  259. |<Down>| <Down> 1 same as "j"
  260. |<End>| <End> 1 same as "$"
  261. |<F1>| <F1> same as <Help>
  262. |<Help>| <Help> open a help window
  263. |<Home>| <Home> 1 same as "0"
  264. |<Insert>| <Insert> 2 same as "i"
  265. |<Left>| <Left> 1 same as "h"
  266. |<LeftMouse>| <LeftMouse> 1 move cursor to the mouse click position
  267. |<MiddleMouse>| <MiddleMouse> 2 same as "gP" at the mouse click position
  268. |<PageDown>| <PageDown> same as CTRL-F
  269. |<PageUp>| <PageUp> same as CTRL-B
  270. |<Right>| <Right> 1 same as "l"
  271. |<RightMouse>| <RightMouse> start Visual mode, move cursor to the mouse
  272. click position
  273. |<S-Down>| <S-Down> 1 same as CTRL-F
  274. |<S-Left>| <S-Left> 1 same as "b"
  275. |<S-LeftMouse>| <S-LeftMouse> same as "*" at the mouse click position
  276. |<S-Right>| <S-Right> 1 same as "w"
  277. |<S-RightMouse>| <S-RightMouse> same as "#" at the mouse click position
  278. |<S-Up>| <S-Up> 1 same as CTRL-B
  279. |<Undo>| <Undo> 2 same as "u"
  280. |<Up>| <Up> 1 same as "k"
  281. |<ScrollWheelDown>| <ScrollWheelDown> move window three lines down
  282. |<S-ScrollWheelDown>| <S-ScrollWheelDown> move window one page down
  283. |<ScrollWheelUp>| <ScrollWheelUp> move window three lines up
  284. |<S-ScrollWheelUp>| <S-ScrollWheelUp> move window one page up
  285. |<ScrollWheelLeft>| <ScrollWheelLeft> move window six columns left
  286. |<S-ScrollWheelLeft>| <S-ScrollWheelLeft> move window one page left
  287. |<ScrollWheelRight>| <ScrollWheelRight> move window six columns right
  288. |<S-ScrollWheelRight>| <S-ScrollWheelRight> move window one page right
  289.  
  290. ==============================================================================
  291. 2.3 Square bracket commands *[* *]*
  292.  
  293. tag char note action in Normal mode ~
  294. ------------------------------------------------------------------------------
  295. |[_CTRL-D| [ CTRL-D jump to first #define found in current and
  296. included files matching the word under the
  297. cursor, start searching at beginning of
  298. current file
  299. |[_CTRL-I| [ CTRL-I jump to first line in current and included
  300. files that contains the word under the
  301. cursor, start searching at beginning of
  302. current file
  303. |[#| [# 1 cursor to N previous unmatched #if, #else
  304. or #ifdef
  305. |['| [' 1 cursor to previous lowercase mark, on first
  306. non-blank
  307. |[(| [( 1 cursor N times back to unmatched '('
  308. |[star| [* 1 same as "[/"
  309. |[`| [` 1 cursor to previous lowercase mark
  310. |[/| [/ 1 cursor to N previous start of a C comment
  311. |[D| [D list all defines found in current and
  312. included files matching the word under the
  313. cursor, start searching at beginning of
  314. current file
  315. |[I| [I list all lines found in current and
  316. included files that contain the word under
  317. the cursor, start searching at beginning of
  318. current file
  319. |[P| [P 2 same as "[p"
  320. |[[| [[ 1 cursor N sections backward
  321. |[]| [] 1 cursor N SECTIONS backward
  322. |[c| [c 1 cursor N times backwards to start of change
  323. |[d| [d show first #define found in current and
  324. included files matching the word under the
  325. cursor, start searching at beginning of
  326. current file
  327. |[f| [f same as "gf"
  328. |[i| [i show first line found in current and
  329. included files that contains the word under
  330. the cursor, start searching at beginning of
  331. current file
  332. |[m| [m 1 cursor N times back to start of member
  333. function
  334. |[p| [p 2 like "P", but adjust indent to current line
  335. |[s| [s 1 move to the previous misspelled word
  336. |[z| [z 1 move to start of open fold
  337. |[{| [{ 1 cursor N times back to unmatched '{'
  338. |[<MiddleMouse> [<MiddleMouse> 2 same as "[p"
  339.  
  340. |]_CTRL-D| ] CTRL-D jump to first #define found in current and
  341. included files matching the word under the
  342. cursor, start searching at cursor position
  343. |]_CTRL-I| ] CTRL-I jump to first line in current and included
  344. files that contains the word under the
  345. cursor, start searching at cursor position
  346. |]#| ]# 1 cursor to N next unmatched #endif or #else
  347. |]'| ]' 1 cursor to next lowercase mark, on first
  348. non-blank
  349. |])| ]) 1 cursor N times forward to unmatched ')'
  350. |]star| ]* 1 same as "]/"
  351. |]`| ]` 1 cursor to next lowercase mark
  352. |]/| ]/ 1 cursor to N next end of a C comment
  353. |]D| ]D list all #defines found in current and
  354. included files matching the word under the
  355. cursor, start searching at cursor position
  356. |]I| ]I list all lines found in current and
  357. included files that contain the word under
  358. the cursor, start searching at cursor
  359. position
  360. |]P| ]P 2 same as "[p"
  361. |][| ][ 1 cursor N SECTIONS forward
  362. |]]| ]] 1 cursor N sections forward
  363. |]c| ]c 1 cursor N times forward to start of change
  364. |]d| ]d show first #define found in current and
  365. included files matching the word under the
  366. cursor, start searching at cursor position
  367. |]f| ]f same as "gf"
  368. |]i| ]i show first line found in current and
  369. included files that contains the word under
  370. the cursor, start searching at cursor
  371. position
  372. |]m| ]m 1 cursor N times forward to end of member
  373. function
  374. |]p| ]p 2 like "p", but adjust indent to current line
  375. |]s| ]s 1 move to next misspelled word
  376. |]z| ]z 1 move to end of open fold
  377. |]}| ]} 1 cursor N times forward to unmatched '}'
  378. |]<MiddleMouse> ]<MiddleMouse> 2 same as "]p"
  379.  
  380. ==============================================================================
  381. 2.4 Commands starting with 'g' *g*
  382.  
  383. tag char note action in Normal mode ~
  384. ------------------------------------------------------------------------------
  385. |g_CTRL-A| g CTRL-A only when compiled with MEM_PROFILE
  386. defined: dump a memory profile
  387. |g_CTRL-G| g CTRL-G show information about current cursor
  388. position
  389. |g_CTRL-H| g CTRL-H start Select block mode
  390. |g_CTRL-]| g CTRL-] |:tjump| to the tag under the cursor
  391. |g#| g# 1 like "#", but without using "\<" and "\>"
  392. |g$| g$ 1 when 'wrap' off go to rightmost character of
  393. the current line that is on the screen;
  394. when 'wrap' on go to the rightmost character
  395. of the current screen line
  396. |g&| g& 2 repeat last ":s" on all lines
  397. |g'| g'{mark} 1 like |'| but without changing the jumplist
  398. |g`| g`{mark} 1 like |`| but without changing the jumplist
  399. |gstar| g* 1 like "*", but without using "\<" and "\>"
  400. |g0| g0 1 when 'wrap' off go to leftmost character of
  401. the current line that is on the screen;
  402. when 'wrap' on go to the leftmost character
  403. of the current screen line
  404. |g8| g8 print hex value of bytes used in UTF-8
  405. character under the cursor
  406. |g<| g< display previous command output
  407. |g?| g? 2 Rot13 encoding operator
  408. |g?g?| g?? 2 Rot13 encode current line
  409. |g?g?| g?g? 2 Rot13 encode current line
  410. |gD| gD 1 go to definition of word under the cursor
  411. in current file
  412. |gE| gE 1 go backwards to the end of the previous
  413. WORD
  414. |gH| gH start Select line mode
  415. |gI| gI 2 like "I", but always start in column 1
  416. |gJ| gJ 2 join lines without inserting space
  417. |gN| gN 1,2 find the previous match with the last used
  418. search pattern and Visually select it
  419. |gP| ["x]gP 2 put the text [from register x] before the
  420. cursor N times, leave the cursor after it
  421. |gQ| gQ switch to "Ex" mode with Vim editing
  422. |gR| gR 2 enter Virtual Replace mode
  423. |gU| gU{motion} 2 make Nmove text uppercase
  424. |gV| gV don't reselect the previous Visual area
  425. when executing a mapping or menu in Select
  426. mode
  427. |g]| g] :tselect on the tag under the cursor
  428. |g^| g^ 1 when 'wrap' off go to leftmost non-white
  429. character of the current line that is on
  430. the screen; when 'wrap' on go to the
  431. leftmost non-white character of the current
  432. screen line
  433. |ga| ga print ascii value of character under the
  434. cursor
  435. |gd| gd 1 go to definition of word under the cursor
  436. in current function
  437. |ge| ge 1 go backwards to the end of the previous
  438. word
  439. |gf| gf start editing the file whose name is under
  440. the cursor
  441. |gF| gF start editing the file whose name is under
  442. the cursor and jump to the line number
  443. following the filename.
  444. |gg| gg 1 cursor to line N, default first line
  445. |gh| gh start Select mode
  446. |gi| gi 2 like "i", but first move to the |'^| mark
  447. |gj| gj 1 like "j", but when 'wrap' on go N screen
  448. lines down
  449. |gk| gk 1 like "k", but when 'wrap' on go N screen
  450. lines up
  451. |gn| gn 1,2 find the next match with the last used
  452. search pattern and Visually select it
  453. |gm| gm 1 go to character at middle of the screenline
  454. |go| go 1 cursor to byte N in the buffer
  455. |gp| ["x]gp 2 put the text [from register x] after the
  456. cursor N times, leave the cursor after it
  457. |gq| gq{motion} 2 format Nmove text
  458. |gr| gr{char} 2 virtual replace N chars with {char}
  459. |gs| gs go to sleep for N seconds (default 1)
  460. |gu| gu{motion} 2 make Nmove text lowercase
  461. |gv| gv reselect the previous Visual area
  462. |gw| gw{motion} 2 format Nmove text and keep cursor
  463. |netrw-gx| gx execute application for file name under the
  464. cursor (only with |netrw| plugin)
  465. |g@| g@{motion} call 'operatorfunc'
  466. |g~| g~{motion} 2 swap case for Nmove text
  467. |g<Down>| g<Down> 1 same as "gj"
  468. |g<End>| g<End> 1 same as "g$"
  469. |g<Home>| g<Home> 1 same as "g0"
  470. |g<LeftMouse>| g<LeftMouse> same as <C-LeftMouse>
  471. g<MiddleMouse> same as <C-MiddleMouse>
  472. |g<RightMouse>| g<RightMouse> same as <C-RightMouse>
  473. |g<Up>| g<Up> 1 same as "gk"
  474.  
  475. ==============================================================================
  476. 2.5 Commands starting with 'z' *z*
  477.  
  478. tag char note action in Normal mode ~
  479. ------------------------------------------------------------------------------
  480. |z<CR>| z<CR> redraw, cursor line to top of window,
  481. cursor on first non-blank
  482. |zN<CR>| z{height}<CR> redraw, make window {height} lines high
  483. |z+| z+ cursor on line N (default line below
  484. window), otherwise like "z<CR>"
  485. |z-| z- redraw, cursor line at bottom of window,
  486. cursor on first non-blank
  487. |z.| z. redraw, cursor line to center of window,
  488. cursor on first non-blank
  489. |z=| z= give spelling suggestions
  490. |zA| zA open a closed fold or close an open fold
  491. recursively
  492. |zC| zC close folds recursively
  493. |zD| zD delete folds recursively
  494. |zE| zE eliminate all folds
  495. |zF| zF create a fold for N lines
  496. |zG| zG mark word as good spelled word
  497. |zM| zM set 'foldlevel' to zero
  498. |zN| zN set 'foldenable'
  499. |zO| zO open folds recursively
  500. |zR| zR set 'foldlevel' to the deepest fold
  501. |zW| zW mark word as wrong (bad) spelled word
  502. |zX| zX re-apply 'foldlevel'
  503. |z^| z^ cursor on line N (default line above
  504. window), otherwise like "z-"
  505. |za| za open a closed fold, close an open fold
  506. |zb| zb redraw, cursor line at bottom of window
  507. |zc| zc close a fold
  508. |zd| zd delete a fold
  509. |ze| ze when 'wrap' off scroll horizontally to
  510. position the cursor at the end (right side)
  511. of the screen
  512. |zf| zf{motion} create a fold for Nmove text
  513. |zg| zg mark word as good spelled word
  514. |zh| zh when 'wrap' off scroll screen N characters
  515. to the right
  516. |zi| zi toggle 'foldenable'
  517. |zj| zj 1 move to the start of the next fold
  518. |zk| zk 1 move to the end of the previous fold
  519. |zl| zl when 'wrap' off scroll screen N characters
  520. to the left
  521. |zm| zm subtract one from 'foldlevel'
  522. |zn| zn reset 'foldenable'
  523. |zo| zo open fold
  524. |zr| zr add one to 'foldlevel'
  525. |zs| zs when 'wrap' off scroll horizontally to
  526. position the cursor at the start (left
  527. side) of the screen
  528. |zt| zt redraw, cursor line at top of window
  529. |zv| zv open enough folds to view the cursor line
  530. |zw| zw mark word as wrong (bad) spelled word
  531. |zx| zx re-apply 'foldlevel' and do "zv"
  532. |zz| zz redraw, cursor line at center of window
  533. |z<Left>| z<Left> same as "zh"
  534. |z<Right>| z<Right> same as "zl"
  535.  
  536. ==============================================================================
  537. 3. Visual mode *visual-index*
  538.  
  539. Most commands in Visual mode are the same as in Normal mode. The ones listed
  540. here are those that are different.
  541.  
  542. tag command note action in Visual mode ~
  543. ------------------------------------------------------------------------------
  544. |v_CTRL-\_CTRL-N| CTRL-\ CTRL-N stop Visual mode
  545. |v_CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode'
  546. |v_CTRL-C| CTRL-C stop Visual mode
  547. |v_CTRL-G| CTRL-G toggle between Visual mode and Select mode
  548. |v_<BS>| <BS> 2 Select mode: delete highlighted area
  549. |v_CTRL-H| CTRL-H 2 same as <BS>
  550. |v_CTRL-O| CTRL-O switch from Select to Visual mode for one
  551. command
  552. |v_CTRL-V| CTRL-V make Visual mode blockwise or stop Visual
  553. mode
  554. |v_<Esc>| <Esc> stop Visual mode
  555. |v_CTRL-]| CTRL-] jump to highlighted tag
  556. |v_!| !{filter} 2 filter the highlighted lines through the
  557. external command {filter}
  558. |v_:| : start a command-line with the highlighted
  559. lines as a range
  560. |v_<| < 2 shift the highlighted lines one
  561. 'shiftwidth' left
  562. |v_=| = 2 filter the highlighted lines through the
  563. external program given with the 'equalprg'
  564. option
  565. |v_>| > 2 shift the highlighted lines one
  566. 'shiftwidth' right
  567. |v_b_A| A 2 block mode: append same text in all lines,
  568. after the highlighted area
  569. |v_C| C 2 delete the highlighted lines and start
  570. insert
  571. |v_D| D 2 delete the highlighted lines
  572. |v_b_I| I 2 block mode: insert same text in all lines,
  573. before the highlighted area
  574. |v_J| J 2 join the highlighted lines
  575. |v_K| K run 'keywordprg' on the highlighted area
  576. |v_O| O Move horizontally to other corner of area.
  577. Q does not start Ex mode
  578. |v_R| R 2 delete the highlighted lines and start
  579. insert
  580. |v_S| S 2 delete the highlighted lines and start
  581. insert
  582. |v_U| U 2 make highlighted area uppercase
  583. |v_V| V make Visual mode linewise or stop Visual
  584. mode
  585. |v_X| X 2 delete the highlighted lines
  586. |v_Y| Y yank the highlighted lines
  587. |v_aquote| a" extend highlighted area with a double
  588. quoted string
  589. |v_a'| a' extend highlighted area with a single
  590. quoted string
  591. |v_a(| a( same as ab
  592. |v_a)| a) same as ab
  593. |v_a<| a< extend highlighted area with a <> block
  594. |v_a>| a> same as a<
  595. |v_aB| aB extend highlighted area with a {} block
  596. |v_aW| aW extend highlighted area with "a WORD"
  597. |v_a[| a[ extend highlighted area with a [] block
  598. |v_a]| a] same as a[
  599. |v_a`| a` extend highlighted area with a backtick
  600. quoted string
  601. |v_ab| ab extend highlighted area with a () block
  602. |v_ap| ap extend highlighted area with a paragraph
  603. |v_as| as extend highlighted area with a sentence
  604. |v_at| at extend highlighted area with a tag block
  605. |v_aw| aw extend highlighted area with "a word"
  606. |v_a{| a{ same as aB
  607. |v_a}| a} same as aB
  608. |v_c| c 2 delete highlighted area and start insert
  609. |v_d| d 2 delete highlighted area
  610. |v_gJ| gJ 2 join the highlighted lines without
  611. inserting spaces
  612. |v_gq| gq 2 format the highlighted lines
  613. |v_gv| gv exchange current and previous highlighted
  614. area
  615. |v_iquote| i" extend highlighted area with a double
  616. quoted string (without quotes)
  617. |v_i'| i' extend highlighted area with a single
  618. quoted string (without quotes)
  619. |v_i(| i( same as ib
  620. |v_i)| i) same as ib
  621. |v_i<| i< extend highlighted area with inner <> block
  622. |v_i>| i> same as i<
  623. |v_iB| iB extend highlighted area with inner {} block
  624. |v_iW| iW extend highlighted area with "inner WORD"
  625. |v_i[| i[ extend highlighted area with inner [] block
  626. |v_i]| i] same as i[
  627. |v_i`| i` extend highlighted area with a backtick
  628. quoted string (without the backticks)
  629. |v_ib| ib extend highlighted area with inner () block
  630. |v_ip| ip extend highlighted area with inner paragraph
  631. |v_is| is extend highlighted area with inner sentence
  632. |v_it| it extend highlighted area with inner tag block
  633. |v_iw| iw extend highlighted area with "inner word"
  634. |v_i{| i{ same as iB
  635. |v_i}| i} same as iB
  636. |v_o| o move cursor to other corner of area
  637. |v_r| r 2 delete highlighted area and start insert
  638. |v_s| s 2 delete highlighted area and start insert
  639. |v_u| u 2 make highlighted area lowercase
  640. |v_v| v make Visual mode characterwise or stop
  641. Visual mode
  642. |v_x| x 2 delete the highlighted area
  643. |v_y| y yank the highlighted area
  644. |v_~| ~ 2 swap case for the highlighted area
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement