Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View topics.md

Sthlm Vim 040213

Programming language for editing text

Modes and rule of thumbs

  • Normal = moving and changing
  • Visual = selects text you want to modify
  • Insert = write stuff, no bloody movement
  • Ex(commandmode) = :w, :wq, :!echo "i love bananas"

Learning Curve

  1. vimtutor(~30 minutes)
  2. Getting by(first day)
  3. Pretty Efficient(first week)
  4. Here is the hard part(takes ages)
  5. Gurulevel(Unix beard time)

It helps to have a friend to ask questions!

Movement

  • hjkl instead of arrowkeys
  • use hjkl as textobjects
  • search = /
  • w = forward
  • b = back
  • a{p,w,ANYTIHNG}
  • t = 'til(exlusive), dtp(p for pig)
  • f = for(including), dfp(p for pig)
  • d = delete
  • y = yank

Modular Editing

Nouns and Verbs

daw = delete around words verb noun

cap = change around paragraph verb noun

cw = change word verb noun

d3w = delete 3 words verb noun

Vimrc

We all hate editing: 10j(3 keystrokes) vs. jjjjjjjjjj(10 keystrokes)

Make youself more efficient with your vimrc:

  • Embrace typos
  • Less keystrokes! i.e run tests from inside vim
  • Unbind things you hate

It's all about making yourself more efficient, it doesn't matter how you do it

Contact

Just ping me if you have any questions regarding anything vim-related!

@teoljungberg on twitter @metamorfos on github teo.ljungberg@gmail.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.