Skip to content

Latest commit

 

History

History
64 lines (42 loc) · 1.39 KB

TraceCode.md

File metadata and controls

64 lines (42 loc) · 1.39 KB

Trace Code Skill

VIM Related

  • gf: go file
    • e.g. put cursor on the filename (#include "filename.h")
  • Ctrl + o: jump back
  • *: search same word
  • n/N: next/previous one

Ctags

this support function and symbol

Install ctags

sudo apt-get install ctags

Usage

On the top of the directory type

ctags -R

this will generate a tag file

In VIM you can use the key combination

  • Ctrl + ]: go to defination
  • Ctrl + t: back to previous tag

Ctags related plugin

Grep

grep -inr keyword *
  • -i: case-insensitive
  • -n: prefix output with line numbers
  • -r: recurse subdirectories

With find

find . -name *.c | xargs grep -rn keyword