:q!
[operator][count][motion]
(use text-objects)      iw                 iW       i( / ib
beginning   of line   I   before                 cursor   i       after                                 cursor    a       ...
selectcharacters     v     select                      lines   V      select                                      block   ...
searching
substitutions:%s/foo/bar                  „foor“ -> „bar“:s/foo/bar/g                 on the line:s/..k/ax/               ...
:registers                         registers:echo @r             “a-“z         “a-“z             qr   macro               ...
marksset mark m     In file   mm        set mark M                         across files   mM        jump to          line ...
buffers:buffers:help :buffers:badd file:bnext:bprev:bdelete
windowsvim -o / -O filename filename2split,vsplit: filename:q - pokial je otvorenych viac okien,vim sa nestara o ulozenie ...
vimdiffdo      get changesdp      put changes]c      next change[c^W ^W   witch window
insert: ^p ^x, ^fnormal: ^a , ^x in/dekrement       plugin Mondaycommand: ^r^w,^d
vimscript•   Interny jazyk•   .vimrc•   Python, perl, ruby, ..•   pluginy                 let items=[1,2,3,4]             ...
pluginsgit clone git://github.com/joonty/myvim.git ~/.vimvim +BundleInstall +qall
syntax checking          :!php –l %php QA toolsTags auto-completion      ^x^oNERDTreeCtagsCodesniffer, mess detectorPHPUni...
Mapping   map <F2> :NERDTreeToggle<CR>   imap ,a <a href=""></a><Esc>F"i   nmap   vmapKostry    autocmd BufNewFile *.php 0...
:set nobomb:syntax on:set number:set ignorecase, smartcase:set incsearch hlsearch
>> <<:retab! Ngu, gU, g~ - lower, uppercase^R+= simplecalc:sh:r!cmd
zf (fold) - nasleduje pohybovy prikaz       - kolko riadkov       - prvy z nichzfapvisual modezo (open)zc, zdzr, zm       ...
Lukáš Šabľa - Vim
Lukáš Šabľa - Vim
Upcoming SlideShare
Loading in...5
×

Lukáš Šabľa - Vim

940
-1

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
940
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
2
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Lukáš Šabľa - Vim

  1. 1. :q!
  2. 2. [operator][count][motion]
  3. 3. (use text-objects) iw iW i( / ib
  4. 4. beginning of line I before cursor i after cursor a end of line A previous line O next line o substitute character s substitute line S line from cursor C
  5. 5. selectcharacters v select lines V select block ^vswich cursor start/end o reselect prev. area gv prepend each line I
  6. 6. searching
  7. 7. substitutions:%s/foo/bar „foor“ -> „bar“:s/foo/bar/g on the line:s/..k/ax/ wildcards:2,4s/foo/bar/g:s/(.*):(.*)/2 : 1/:g/foobar/d delete all lines containing „foobar“c C – case (in)sensitive
  8. 8. :registers registers:echo @r “a-“z “a-“z qr macro record @r macro playback
  9. 9. marksset mark m In file mm set mark M across files mM jump to line m ‘m jump to exact char `m
  10. 10. buffers:buffers:help :buffers:badd file:bnext:bprev:bdelete
  11. 11. windowsvim -o / -O filename filename2split,vsplit: filename:q - pokial je otvorenych viac okien,vim sa nestara o ulozenie suboruCtrl + W + h,j,k,l / sipky - prepinanie okienCtrl + W + r,R - rotacia okienCtrl + W + xCtrl + [+] / [-]Ctrl + W + <,>Ctrl + W + _ , Ctrl + W + |, Ctrl + W + =
  12. 12. vimdiffdo get changesdp put changes]c next change[c^W ^W witch window
  13. 13. insert: ^p ^x, ^fnormal: ^a , ^x in/dekrement plugin Mondaycommand: ^r^w,^d
  14. 14. vimscript• Interny jazyk• .vimrc• Python, perl, ruby, ..• pluginy let items=[1,2,3,4] for item in items echo item endfor
  15. 15. pluginsgit clone git://github.com/joonty/myvim.git ~/.vimvim +BundleInstall +qall
  16. 16. syntax checking :!php –l %php QA toolsTags auto-completion ^x^oNERDTreeCtagsCodesniffer, mess detectorPHPUnitXdebug
  17. 17. Mapping map <F2> :NERDTreeToggle<CR> imap ,a <a href=""></a><Esc>F"i nmap vmapKostry autocmd BufNewFile *.php 0r ~/.vim/skeletons/skeleton.php:filetype plugin on
  18. 18. :set nobomb:syntax on:set number:set ignorecase, smartcase:set incsearch hlsearch
  19. 19. >> <<:retab! Ngu, gU, g~ - lower, uppercase^R+= simplecalc:sh:r!cmd
  20. 20. zf (fold) - nasleduje pohybovy prikaz - kolko riadkov - prvy z nichzfapvisual modezo (open)zc, zdzr, zm :set foldopen=allzR, zM :set foldclose=all
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×