Presentacion vim


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • vim –u NONE -N
  • Presentacion vim

    1. 1. USING VIM The best text editor ever
    2. 2. WHY USE VIM?• Color syntax highlighting• Very customizable• Highly portable• Highly active community• Plug-ins• Suuuuuuper fast
    3. 3. BEFORE WE BEGIN REMEMBER…VIM’s effectiveness comes from not using the arrow keys or the mouse
    4. 4. THE BASICS 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 star t the editor you are in this mode.• Inser t mode: the text you type is inser ted into the buf fer.• 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.
    5. 5. NORMAL MODEMain 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 buf fer• G: bottom of the buf fer• #G: go to line #N o te : P r e f i x a c u r s o r m o v e m e n t c o m m a n d w i t h a n u m b e r to r e p e a t i t . Fo r ex a m p l e , 4 jmoves down 4 lines.
    6. 6. MORE NORMAL MODE COMMANDS x: delete character under the cursor r: replace the character under the cursor R: replace everything you type until you press <ESC> cw: change word c$: change to the end of the line cc: change entire line f: find character p: paste from buf fer y: copy selected text . : repeat last command u: undoAnd many more…
    7. 7. INSERT MODE i: Enter insert mode at cursor I: Enter insert mode at the start of the line a: Enter insert mode after the cursor A: Enter insert mode at the end of the line o: open a new line below the cursor O: open a new line above the cursor <ESC>: exit insert mode
    8. 8. VISUAL MODE v: start visual mode V: linewise visual mode <Ctrl> + v: block visual mode i: select the inner stuf f of things (i.e. vit, vi{, vi(, etc) <Esc>: exit visual mode
    9. 9. OTHER STUFF 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
    10. 10. SOME PLUGINS pathogen - rails.vim - NERD-tree - NERD-commenter - Ctrl-P - Snipmate - Surround - Zen-coding - many more…
    11. 11. RESOURCES Derek Wyatt’s tutorials - Vimcasts – Use vim like a Pro - VIM’s Documentation - usr_toc.html Coderwall’s VIM network - m/n/vim Cheatsheet - /vim-cheatsheet.pdf VIM tutorial - vim_tutorial.html Vimtweets - / || @vimtips My VIM config -
    12. 12. THANK YOU!
    1. A particular slide catching your eye?

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