vi/vim NOTES (Don't like vim? See my 352 Emacs notes!) New: cMotion (motions: w, b, $, nG, t, f, etc.) . dMotion class Counter def initialize(label = "Counter") @count = 0; @label = label end def click @count += 1 end def reset @count = 0 end def count # Note the convention: count, not get_count @count end def to_s return "#{@label}'s count is #{@count}" end end Done: $ Go to end of line / & ? Search forward/backward ;/, Repeat intraline search same/opposite direction 0 Go to start of line a/A Append after current position (or end of line) b/B Move cursor backward by "words" (by "big words") f/F Intraline character search i/I Insert before current position (or beginning of line) o/O Open a line for input after (or before the current line) n/N Continue search in same/opposite direction r Replace current character R Enter overwrite mode t/T Intraline search up to character x/X Delete current character (or character before current character) nG Go to line n 1G goes to first line 23G goes to 23rd line G goes to last line hjkl Left, down, up, right w/W Move cursor forward by "words" (by "big words") Todo: ^ dX . cX % c%