Advertisement
Guest User

Untitled

a guest
Dec 1st, 2015
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. #**VIM**
  2.  
  3. >kntrl + o //open command line in vim
  4.  
  5. >:colorschema =>**press tab and select something**<br/>
  6. >:syntax enable
  7.  
  8. >:set number => **show line number**<br/>
  9.  
  10. if you want new schema
  11. copy schema to ~/.vim/colors directory<br/>
  12.  
  13. >:match **press tab select highlight type** *write pattern*<br/>
  14. :match Number /^Number/ =>**if when type Number (as string) color is changing**<br/>
  15. >:retab 2 => **2 spaces**<br/>
  16. >:set cursorline => **show cursor line colored**<br/>
  17. >:set cursorcolumn => **show cursor column colored**<br/>
  18. >:set number => **show line number**<br/>
  19.  
  20. if you want your settings is default => crate ~/.vimrc file<br/>
  21.  
  22. under example vimrc<br/>
  23. >colorscheme evening<br/>
  24. >set autoindent<br/>
  25. >set tabstop=2<br/>
  26. >syntax enable<br/>
  27. >set number<br/>
  28. >set statusline=%F%m%r%h%w\ [TYPE=%Y]\ %l:%v:%L<br/>
  29. >set laststatus=2<br/>
  30.  
  31. ##**NAVIGATION**
  32. - press ESC and go to normal mode<br/>
  33. - press { => jump to beginning of paragraph or empty line above it<br/>
  34. - press } => jump to end of paragraph or empty line under it<br/>
  35. - press ( => move to beginning of paragraph<br/>
  36. - press ) => move to end of paragraph<br/>
  37. - press w => move to beginning of next word<br/>
  38. - press b => move to beginning of previous word<br/>
  39. - press e => move to end of word<br/>
  40. - press % when on the bracket => move to where bracket is closed <br/>
  41. - press i and go to insert mode<br/>
  42. - press A => move to end of line
  43. - press I => move to begin of line
  44.  
  45. ##**SEARCH**
  46.  
  47. >?<word> => **find first**<br/>
  48. >/<word> => **find end**<br/>
  49.  
  50. press ESC and n => move all matching words<br/>
  51.  
  52. ##**SELECT**
  53.  
  54. - press ESC<br/>
  55. - press V => select full line<br/>
  56. - press v => select step step<br/>
  57. - press d => delete selected<br/>
  58. - press y => copy selected<br/>
  59. - press u => undo<br/>
  60. - press ctrl + r => redo<br/>
  61.  
  62. ##**TAB**
  63.  
  64. >:vertical new **filename** // or without new<br/>
  65. >:split new **filename** // or without new<br/>
  66.  
  67. ######**MOVE**
  68. >:b **filename**<br/>
  69. >:b# =>**previous file**<br/>
  70. >:b number =>**buffer number**<br/>
  71.  
  72. ######**MOVE OTHER SPLIT**<br/>
  73. ctrl + w<br/>
  74.  
  75. ######**AUTOCOMPLETE**
  76.  
  77. ctrl + n //show used words<br/>
  78.  
  79. ######**SET DICTIONARY**
  80. >set dictionary+=**/../path**<br/>
  81. - ctrl + x ctrl+k //open dictionary words<br/>
  82. - ctrl + x ctrl+l // open linde sentences<br/>
  83.  
  84. ##**MACRO RECORDING**
  85.  
  86. - press ESC <br/>
  87. - press qa //record starting with register a (what you want replace with a)<br/>
  88. - press i //switch insert mode write somethings<br/>
  89. - press ESC <br/>
  90. - press q //en record<br/>
  91. - press @a //execute record<br/>
  92. - press @@ //execute last record<br/>
  93.  
  94. ##**DIRECTORY**
  95.  
  96. >:Sexplore =>**open current directory with split**<br/>
  97.  
  98. ##**TERMINAL**
  99. >:shell =>**open terminal on current window**<br/>
  100. >exit =>**return to vim editor**<br/>
  101. >:! command **enter** =>**execute command whatever you want**<br/>
  102.  
  103. ##**CLOSE**
  104. >qa =>**close all window**<br/>
  105. >wqa =>**write and close all window**<br/>
  106.  
  107. ##**WINDOW SIZE**
  108. >resize 20 =>**set height to 20 lines**<br/>
  109. >res +5 =>**increase height 5 lines**<br/>
  110. >res -5 =>**decrease height 5 lines**<br/>
  111. >vertical resize 20 =>**make width 20 columns**<br/>
  112. >vertical resize 20 =>**make width 20 columns**<br/>
  113. >vertical resize +5 =>**increase height 5 lines**<br/>
  114. >vertical resize -5 =>**decrease height 5 lines**<br/>
  115. >vim -S vim_file =>**open vim with your saved session**<br/>
  116. - can use res instead of resize
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement