presentacion vim
DESCRIPTION
TRANSCRIPT
The best text editor everUSING VIM
• Color syntax highlighting• Very customizable• Highly portable• Highly active community• Plug-ins
• Suuuuuuper fast
WHY USE VIM?
VIM’s effectiveness comes from not using the arrow keys or the mouse
BEFORE WE BEGIN REMEMBER…
Vim has many modes, but the most used ones are:
• Normal mode (aka Command Mode): you can enter all the normal editor commands. If you start the editor you are in this mode.
• Insert mode: the text you type is inserted into the buffer.
• Visual mode: This is like Normal mode, but the movement commands extend a highlighted area. When a non-movement command is used, it is executed for the highlighted area.
THE BASICS
Main mode to make all the movement of the cursor
• h j k l: moves the cursor left down up right respectively• w: jump to the start of the next word• e: jump to the end of the word• b: jump backward by words• 0: start of the line• $: end of the line• ^: first non-blank character of the line• gg: top of the buffer• G: bottom of the buffer• #G: go to line #
Note: Prefix a cursor movement command with a number to repeat i t . For example, 4j moves down 4 l ines.
NORMAL MODE
x: delete character under the cursor r: replace the character under the cursorR: replace everything you type until you press <ESC>cw: change wordc$: change to the end of the linecc: change entire line f: find characterp: paste from buffery: copy selected text . : repeat last commandu: undo
And many more…
MORE NORMAL MODE COMMANDS
i: Enter insert mode at cursor I: Enter insert mode at the start of the linea: Enter insert mode after the cursorA: Enter insert mode at the end of the lineo: open a new line below the cursorO: open a new line above the cursor<ESC>: exit insert mode
INSERT MODE
v: start visual modeV: linewise visual mode<Ctrl> + v: block visual mode i: select the inner stuff of things (i.e. vit, vi{, vi(, etc)<Esc>: exit visual mode
VISUAL MODE
Command-line mode is used to enter Ex commands (":"), search patterns ("/" and "?”)
i.e. saving(:w), quitting (:q), running terminal commands (: !), finding and replacing: (:s)
Searching: /pattern – searches for the pattern in the document ?pattern – searches for the pattern backwards n – looks for the next ocurrence of the search N – looks for the previous ocurrence of the search :%s/old/new/g - replaces all old with new throughout file
OTHER STUFF
pathogen - https://github.com/tpope/vim-pathogenrails.vim - https://github.com/tpope/vim-railsNERD-tree - https://github.com/scrooloose/nerdtreeNERD-commenter -
https://github.com/scrooloose/nerdcommenterCtrl-P - https://github.com/kien/ctrlp.vimSnipmate -
https://github.com/msanders/snipmate.vimSurround - https://github.com/tpope/vim-surroundZen-coding - https://github.com/mattn/zencoding-vim
And many more…
SOME PLUGINS
Derek Wyatt’s tutorials - http://www.derekwyatt.org/vim/Vimcasts – http://vimcasts.orgUse vim like a Pro - https://leanpub.com/VimLikeAProVIM’s Documentation -
http://vimdoc.sourceforge.net/htmldoc/ usr_toc.htmlCoderwall’s VIM network - https://coderwall.co m/n/vimCheatsheet -
http://cloud.github.com/downloads/ahrencode/Miscellaneous/vim-cheatsheet.pdf
VIM tutorial - http://blog.interlinked.org/tutorials/vim_tutorial.html
Vimtweets - http://www.vimtweets.com/ || @vimtipsMy VIM config - https://github.com/rkrdo/vimfiles
RESOURCES
THANK YOU!