--------------------------------------------------------------- VI-VIM --------------------------------------------------------------- HOME PAGE www.vim.org @mastervim https://www.youtube.com/watch?v=aHm36-na4-4 http://www.openvim.com/tutorial.html https://www.youtube.com/watch?v=kd9WDL1h9Eg Installation https://www.youtube.com/watch?v=ReTvvIPmS34 vim cheat sheet htpp://www.viemu.com/a_vi_vim_graphical_cheet_tutorial.html www.viemu.com REMAP CAPS LOCK TO ESC https://pqrs.org/osx/karabiner/seil.html.en VimCasts: http://vimcasts.org/ BEST vim VIDEOS https://www.youtube.com/watch?v=lwD8G1P52Sk Upcase: https://upcase.com/vim --------------------------------------------------------------- cmd --------------------------------------------------------------- @vim : version https://youtu.be/_NUO4JEtkDw?t=765 INDENTATION Block range (from, to) e.g 6,12 What to do ? s = search :6,12s/^/ / https://www.youtube.com/watch?v=8Ub4I6WKpm0 DELETE DELITION Block range d Delete block 6 to 12 :6,12 d Delete a word. 1. find it 2. type number of character + x OR dw {d num w} df, delete from cursor to next , FIND 2f, find second comma SUBISTITUTION :range substitute /this/with this/ flags CHEAT SHEET http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html Learning Vim in a Week https://www.youtube.com/watch?v=_NUO4JEtkDw AMAZONE https://www.youtube.com/watch?v=lwD8G1P52Sk&list=PLhMs04g3TXEZNcxTvhGV1GHnd15xOJYcC http://vim.wikia.com/wiki/Best_Vim_Tips https://www.youtube.com/watch?v=9wcBBuZ6H4w http://hea-www.harvard.edu/~fine/Tech/vi.html http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html https://www.youtube.com/watch?v=2pqipq-UEwQ KEY MAPPING https://www.youtube.com/watch?v=2pqipq-UEwQ https://www.youtube.com/watch?v=Nim4_f5QUxA NOTES https://github.com/shawncplus/vim-classes/blob/master/expert-1.md BASICS https://www.youtube.com/watch?v=Nim4_f5QUxA https://www.youtube.com/watch?v=2pqipq-UEwQ -------------------------------------------------------------- MICROS -------------------------------------------------------------- RECORD MACROS :qx start recording key commads :q stop :Ctrl+r+q dump the recorded keys VIEW MACROS :reg USE MACRO @x : qreg reg = 0,1,2 … EXECUTE RECORDED MICRO : @reg do once : num@reg repeat num times EDIT REGISTER : let @reg=something --------------------------------------------------------------- vimrc --------------------------------------------------------------- @vimrc https://www.youtube.com/watch?v=2pqipq-UEwQ https://github.com/mscoutermarsh/dotfiles https://github.com/thoughtbot/dotfiles --------------------------------------------------------------- plugin --------------------------------------------------------------- @plugin @ack.vim find files in a project https://www.youtube.com/watch?v=knSFZCKMy20 install ack http://beyondgrep.com/install/ ackusage https://github.com/mileszs/ack.vim https://youtu.be/2pqipq-UEwQ?t=2892 @github https://github.com/mileszs/ack.vim ---------- @nerdtree ---------- 1. Quick intro :help NERD_tree.txt 2. https://www.youtube.com/watch?v=-GdaZ-Fuk9w 3. 4. https://github.com/scrooloose/nerdtree 5. COMMADS a. :Bookmark bookmarkname To get back press capital B b. NERDTreeClose c. NERDTree ~/Dir/Dir/ 6. HJFDGJ @spell check https://www.youtube.com/watch?v=lwD8G1P52Sk z + = Display spell options @vimscript http://learnvimscriptthehardway.stevelosh.com https://github.com/kien/ctrlp.vim https://github.com/scrooloose/nerdtree Search through projects https://github.com/rking/ag.vim Source: https://www.youtube.com/watch?v=_NUO4JEtkDw @bundle https://github.com/shawncplus/dotfiles/tree/master/.vim/bundle ----------------------------------------------------------------- ----------------------------------------------------------------- VIM editor http://vimdoc.sourceforge.net/htmldoc/help.html http://www.yolinux.com/TUTORIALS/LinuxTutorialAdvanced_vi.html http://vim.wikia.com/wiki/Tutorial VIM YOUTUBE TUTORIAL https://www.youtube.com/watch?v=ImK_dHPOTIE Vi/vim http://www.openvim.com/tutorial.html https://www.youtube.com/watch?v=kd9WDL1h9Eg Installation https://www.youtube.com/watch?v=ReTvvIPmS34 vim cheat sheet htpp://www.viemu.com/a_vi_vim_graphical_cheet_tutorial.html ------- @search ------- IN VIN REGULAR EXPRESSION [ The . (dot) is a part of word such as a class in “CSS” ] String\. Or \./string to scape the period :%s search (%)means globally :%s /some/something/g[globally]c[ask for a confirmation] https://www.youtube.com/watch?v=FqphRxOPuF8 https://www.youtube.com/watch?v=WrDmMNXyygg -------------------------------------------------------------------- @github -------------------------------------------------------------------- -------------------------------------------------------------------- @download from ripo -------------------------------------------------------------------- @download cmd :~$ curl http://beyondgrep.com/ack-2.14-single-file > ~/bin/ack && chmod 0755 !#:3 :~/bin$ curl http://beyondgrep.com/ack-2.14-single-file > ~/bin/ack && chmod 0755 ~/bin/ack