## vi cheatsheet

  • ~~~~ command mode #roughly ranked
  • A — to append at end of current line
  • C — wipe out from cursor to end of line and puts you into insert mode
  • cw — wipe out from cursor to end of word and puts you into insert mode
    • c2w?
  • capital O — open new line above cursor
  • small O — open new line below cursor
  • ~~~~ insert mode #roughly ranked

scan codebase for a given func name

–Challenge: scan a c++ codebase for a given func name

  • A script would offer more flexibility.
  • find + perl + grep is a crude solution, without support for comments

See also the task in Outlook!

–A related challenge: suppose you have the definition of a function, how do you see all the callers?

Csmi.C: In static member function ‘static csmiparser::Csmi& csmiparser::Csmi::getInstance()’:
Csmi.C:14: warning: ‘__comp_ctor ’ is deprecated (declared at /home/vtan/tp/plugins/xtap/csmi/include/Csmi.h:33)

  • Technique — Rename the by appending _xxx and rebuild