VimNotes
James Cox, smokeclouds
Tuesday, November 23, 2010
StartingwithVim
Get it at http://code.google.com/p/macvim/
Clone someone’s vim dotfiles.
Mine: https://github.com/imajes/v...
Vimismodal
Insert (for typing)
Normal (editing, moving, changing text/structure)
Visual (selecting text)
Command (running ...
KeyModeOperators
Bare letters to change mode (e.g. i for insert)
Backslash to execute searches
Forward slash for leader (d...
BasicNavigation
h,l,k,j (left, right, up line, down line)
^ - first character (or, ctrl-a on OS X)
$ - last character (or,...
OpeningFiles
vim <path/to/file> - open a file
:tabe <path/to/file> - to open a file in a tab
:split <path/to/file> - open ...
Writing(Saving)files
:w (existing)
:w <path/to/save> (new)
:w! forces it
Tuesday, November 23, 2010
QuittingTheBuffer
:q - quit
:q! - force quit. :)
Usual behavior: :wq
Tuesday, November 23, 2010
FunStuff
:ct <char> - Cut to character, also: :yt, :dt
:%s/a/b/ - Buffer search and replace
:noh - remove highlights which...
Funstuff2:my.vimrc.local
https://github.com/imajes/vimfiles/blob/
master/.vimrc.local
Tuesday, November 23, 2010
Plugins:Gist
Source - http://www.vim.org/scripts/script.php?
script_id=2423 (drop this in your plugins dir)
Be careful of ...
Plugins:Endwise
Tim Pope’s - https://github.com/tpope/vim-endwise
‘Wisely’ adds an ‘end’ where appropriate
Tuesday, Novemb...
Plugins:Fugitive
Tim Pope - https://github.com/tpope/vim-fugitive
Git wrapper.
Git activities in hackable buffers = awesom...
Plugins:Rails
Oh, Tim Pope. https://github.com/tpope/vim-fugitive
Where might one begin?
Tuesday, November 23, 2010
Pairingwithvim
Vim is a serious text editor. In the way that Schubert has
a serious movember ‘tache.
Pairing is fine, but ...
Pontifications
Vim is easy enough to learn if you’re willing to spend two
weeks looking at a cheat sheet or bugging someon...
MoreResources:
http://vim.runpaint.org/ - looks ok
http://www.viemu.com/
a_vi_vim_graphical_cheat_sheet_tutorial.html
http...
Upcoming SlideShare
Loading in …5
×

Vim Notes

1,745 views

Published on

Getting started with the text editor vim- some notes and ideas about vim agile and what not

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,745
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
36
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Vim Notes

  1. 1. VimNotes James Cox, smokeclouds Tuesday, November 23, 2010
  2. 2. StartingwithVim Get it at http://code.google.com/p/macvim/ Clone someone’s vim dotfiles. Mine: https://github.com/imajes/vimfiles Sam’s: https://github.com/idoru/idoru-vim-config Install Macvim cli helpers. Tuesday, November 23, 2010
  3. 3. Vimismodal Insert (for typing) Normal (editing, moving, changing text/structure) Visual (selecting text) Command (running commands. duh.) Tuesday, November 23, 2010
  4. 4. KeyModeOperators Bare letters to change mode (e.g. i for insert) Backslash to execute searches Forward slash for leader (default, can be remapped) Colon for commands (e.g. :wq for save, quit) Tuesday, November 23, 2010
  5. 5. BasicNavigation h,l,k,j (left, right, up line, down line) ^ - first character (or, ctrl-a on OS X) $ - last character (or, ctrl-e on OS X) cursor keys. (ignore the purists) G, <n>G (go to line, go to numbered line) Tuesday, November 23, 2010
  6. 6. OpeningFiles vim <path/to/file> - open a file :tabe <path/to/file> - to open a file in a tab :split <path/to/file> - open a file and split with the current :vsplit <path/to/file> - open a file and vertical split with current Tuesday, November 23, 2010
  7. 7. Writing(Saving)files :w (existing) :w <path/to/save> (new) :w! forces it Tuesday, November 23, 2010
  8. 8. QuittingTheBuffer :q - quit :q! - force quit. :) Usual behavior: :wq Tuesday, November 23, 2010
  9. 9. FunStuff :ct <char> - Cut to character, also: :yt, :dt :%s/a/b/ - Buffer search and replace :noh - remove highlights which are annoying gt/gT - move between tabs Tuesday, November 23, 2010
  10. 10. Funstuff2:my.vimrc.local https://github.com/imajes/vimfiles/blob/ master/.vimrc.local Tuesday, November 23, 2010
  11. 11. Plugins:Gist Source - http://www.vim.org/scripts/script.php? script_id=2423 (drop this in your plugins dir) Be careful of settings: let g:gist_clip_command = 'pbcopy' let g:gist_open_browser_after_post = 1 let g:gist_detect_filetype = 1 Tuesday, November 23, 2010
  12. 12. Plugins:Endwise Tim Pope’s - https://github.com/tpope/vim-endwise ‘Wisely’ adds an ‘end’ where appropriate Tuesday, November 23, 2010
  13. 13. Plugins:Fugitive Tim Pope - https://github.com/tpope/vim-fugitive Git wrapper. Git activities in hackable buffers = awesome Fave tool: :Gblame Tuesday, November 23, 2010
  14. 14. Plugins:Rails Oh, Tim Pope. https://github.com/tpope/vim-fugitive Where might one begin? Tuesday, November 23, 2010
  15. 15. Pairingwithvim Vim is a serious text editor. In the way that Schubert has a serious movember ‘tache. Pairing is fine, but I think it makes sense to only have one driver at a time - it’s hard to ‘share’ typing. A common env is not impossible but it’s definitely ‘personal’ - fortunately it’s easy to switch ~/.vim Tuesday, November 23, 2010
  16. 16. Pontifications Vim is easy enough to learn if you’re willing to spend two weeks looking at a cheat sheet or bugging someone - or pair with someone. Textmate hasn’t changed significantly in forever, we all know it’s failings. Old and creaky. Rubymine takes 6 weeks to boot. Emacs. sigh, Godwin’s law, you win. Tuesday, November 23, 2010
  17. 17. MoreResources: http://vim.runpaint.org/ - looks ok http://www.viemu.com/ a_vi_vim_graphical_cheat_sheet_tutorial.html http://vim.wikia.com/ http://www.vim.org/scripts/index.php Tuesday, November 23, 2010

×