Vim - for newbies, by Roy Osherove

3,881 views
3,657 views

Published on

Roy Osherove shows vim for newbies, and explains why everyone should know at least a little vim.

Published in: Technology, Art & Photos
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,881
On SlideShare
0
From Embeds
0
Number of Embeds
1,612
Actions
Shares
0
Downloads
26
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Vim - for newbies, by Roy Osherove

  1. 1. VIM @RoyOsherovehttp://key.bo/apps/16-vim 7enn.com
  2. 2. Why VIM?• Lightweight• Everywhere• Remote coding via ssh• Pair programming (ssh + tmux)• Important skill (like regex)• Feel Stupid, Learn Something
  3. 3. Learning
  4. 4. versions• 7.3+• Vi (vim)• Gui-vim (macvim, gvim on windowslinux)
  5. 5. Configuration• .vim file• .vim directory• Vim scripts and plugins• Google “vim Janus”• Github astrails dotvim
  6. 6. http://tuxradar.com/content/vim-master-basics
  7. 7. http://amalloy.hubpages.com/hub/Why-old-text-editors-are-still-great
  8. 8. http://blog.interlinked.org/tutorials/vim_tutorial.html
  9. 9. http://www.viemu.com/vi-vim-cheat-sheet.gif
  10. 10. Favorite Plugins• Surround plugin• Rails• Nerdtree• Command-t (fuzzy finding)
  11. 11. Favorite keys• Cw and ciw• S)• Shift-v to line selection• Cc to change line• Dd to delete line
  12. 12. Practice cw• Load up piece of text• Use / to find instance of ‘the’• Use ‘cw’ to change ‘the’ to ‘your’• Use ‘esc’ and then ‘n’ to move to next find• Use ‘.’ to repeat• Use ‘n’ and ‘.’ to repeat as many times as possible
  13. 13. Practice ciw• Load up piece of text• Use / to find instance of ‘he’• Use ‘ciw’ to change ‘the’ to ‘your’• Use ‘esc’ and then ‘n’ to move to next find• Use ‘.’ to repeat• Use ‘n’ and ‘.’ to repeat as many times as possible
  14. 14. Practice o and O• Load up piece of text• Use j to go to 2nd line• For each line use shift O to enter a line above and o to insert a line below• Use . To repeat actions
  15. 15. Other vims• vsVim for visual studio• ViEmu for Word• Vimium and vimperator for firefox and chrome• Vi-like command line in zsh (configure yourself)

×