Advertisement
Guest User

Untitled

a guest
May 19th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.59 KB | None | 0 0
  1. Misc
  2. ----
  3.  
  4. ::
  5.  
  6. guu : lowercase line
  7. gUU : uppercase line
  8. g~~ : flip case line
  9. gf : open file name under cursor (SUPER, requires :set path+=<path_to_file>)
  10. <C-w>f : open file name under cursor in a new window
  11. <C-w>gf : open file name under cursor in a new tab
  12. <C-o> : go to previous file (the one from which you ran `gf`)
  13. ga : display hex, ascii value of char under cursor
  14. gv : Re-select the previous visual area (ULTRA)
  15. [I : show lines matching word under cursor (SUPER)
  16. >i{ : Block shifting (MAGIC)
  17. q/ : Search history Window
  18. q: : commandline history Window
  19. J : join next line to this line
  20.  
  21.  
  22. Recording macros
  23. ----------------
  24.  
  25. ::
  26.  
  27. qq : record to q your series of commands
  28. q : stop recording
  29. @q : execute
  30. @@ : repeat
  31.  
  32.  
  33.  
  34. GVIM Difference Function
  35. ------------------------
  36.  
  37. ::
  38.  
  39. vimdiff file1 file2
  40. dp : "put" difference under cursor to other file
  41. do : "get" difference under cursor from other file
  42.  
  43.  
  44. Markers
  45. -------
  46.  
  47. ::
  48.  
  49. '. : jump to last modification line (SUPER)
  50. `. : jump to exact spot in last modification line
  51. ma : place a mark named "x" at current location
  52. 'x : jump to mark named "x" at THIS file
  53. 'X : jump to mark named "X" at ANY file
  54. d'x : delete to mark "x"
  55.  
  56.  
  57. Tabs
  58. ----
  59.  
  60. ::
  61.  
  62. :tab sball : move all open files to individual tabs (SUPER)
  63. :tabedit /path/file : open file in new tab
  64. :tabfind ... : search file and open in new tab
  65. :tab help ... : open help in new tab
  66. gt : go to next tab
  67. gT : go to prev tab
  68.  
  69.  
  70. Buffers
  71. -------
  72.  
  73. ::
  74.  
  75. :e filename : open "filename" in new full-screen buffer
  76. <C-^> : switch between two last buffers
  77. :bnext : switch to next buffer (just map it to <Tab>)
  78.  
  79.  
  80. Registers
  81. ---------
  82.  
  83. ::
  84.  
  85. "xY : yank to register "x" (x may be any a-z)
  86. "xp : paste from register "x"
  87. <C-R>x : paste from register "x" in INSERT mode
  88. :reg : display contents of all registers
  89. :echo @x : display (multi-line) content of register "x"
  90. :s/fred/\=@x/g : sub "fred" with contents of register "x"
  91.  
  92.  
  93. Searching
  94. ---------
  95.  
  96. ::
  97.  
  98. /\Vpattern : all charactes in pattern treated literally ex. \
  99. /\cpattern : case-insensitive match
  100. /joe/e : cursor set to End of match
  101. /joe/e+1 : cursor set to End of match plus 1
  102. /joe/s-2 : cursor set to Start of match minus 2
  103. /begin\_.*end : search over possible multiple lines
  104. /begin\_s*end : any whitespace including newline
  105. /begin\_.\{-}end : any whitespace including newline NON-GREEDY
  106.  
  107.  
  108. Folding
  109. -------
  110.  
  111. ::
  112.  
  113. zo : open fold
  114. zc : re-close fold
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement