vim

16
VIM @RoyOsherove http://key.bo/apps/16-vim 7enn.com

Upload: india

Post on 23-Feb-2016

64 views

Category:

Documents


0 download

DESCRIPTION

VIM. @ RoyOsherove http://key.bo/apps/16-vim 7enn.com. Why VIM?. Lightweight Everywhere Remote coding via ssh Pair programming ( ssh + tmux ) Important skill (like regex) Feel Stupid, Learn Something. Learning. versions. 7.3+ Vi (vim) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: VIM

VIM

@RoyOsherovehttp://key.bo/apps/16-vim

7enn.com

Page 2: VIM

Why VIM?

• Lightweight• Everywhere• Remote coding via ssh• Pair programming (ssh + tmux)• Important skill (like regex)• Feel Stupid, Learn Something

Page 3: VIM

Learning

Page 4: VIM

versions

• 7.3+• Vi (vim)• Gui-vim (macvim, gvim on windows\linux)

Page 5: VIM

Configuration

• .vim file• .vim directory• Vim scripts and plugins• Google “vim Janus”• Github astrails dotvim

Page 6: VIM

http://tuxradar.com/content/vim-master-basics

Page 7: VIM

http://amalloy.hubpages.com/hub/Why-old-text-editors-are-still-great

Page 8: VIM

http://blog.interlinked.org/tutorials/vim_tutorial.html

Page 9: VIM

http://www.viemu.com/vi-vim-cheat-sheet.gif

Page 10: VIM

Favorite Plugins

• Surround plugin• Rails• Nerdtree• Command-t (fuzzy finding)

Page 11: VIM

Favorite keys

• Cw and ciw• S)• Shift-v to line selection• Cc to change line• Dd to delete line

Page 12: VIM

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

Page 13: VIM

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

Page 14: VIM

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

Page 15: VIM

Other vims

• vsVim for visual studio• ViEmu for Word• Vimium and vimperator for firefox and chrome• Vi-like command line in zsh (configure

yourself)

Page 16: VIM