設定:
ma
(a,b, c....是 bookmark id)回到...
`a
(a, b, c.. 回到 bookmark a, b, c..)
ctags -RCtrl-]Ctrl-T
在函数中移动光标的快捷键:
[{ 转到上一个位于第一列的"{"
}] 转到下一个位于第一列的"{"
{ 转到上一个空行
} 转到下一个空行
gd 转到当前光标所指的局部变量的定义
* 转到当前光标所指的单词下一次出现的地方
# 转到当前光标所指的单词上一次出现的地方#!/bin/sh
find . \
-path "arch/arm/*" -prune \
-o -path "include/asm-*" \
! -path "include/asm-i386*" -prune \
-o -path "tmp*" -prune \
-o -path "Documentation*" -prune \
-o -path "scripts*" -prune \
-o -path "drivers*" -prune \
-o -name "*.[chxsS]" -print > cscope.files
在 kernel source folder 執行完 script ,會在目錄下產生 cscope.files。cscope -b -q -k
Ctrl \ + g
到 定義的地方。Ctrl \ + d
列出這個 function 所有呼叫到的 function,讓你挑選。Ctrl \ + c
到 call 這個 function 的 code 去。Ctrl t
:cs help列出command....
find : Query for a pattern (Usage: find c|d|e|f|g|i|s|t name)
c: Find functions calling this function
d: Find functions called by this function
e: Find this egrep pattern
f: Find this file
g: Find this definition
i: Find files #including this file
s: Find this C symbol
t: Find assignments to
: vsplit file
Ctrl-W W
: hide
:Diff dir1 dir2Ctrl-W W]c 下一個差異[c 上一個差異dpdoCtrl-W Wugit difftool[diff]
tool = vimdiffzRza
#!/bin/sh
# Configure your favorite diff program here.
DIFF="/usr/bin/vimdiff"
# Subversion provides the paths we need as the sixth and seventh
# parameters.
LEFT=${6}
RIGHT=${7}
# Call the diff command (change the following line to make sense for
# your merge program).
$DIFF $LEFT $RIGHT
# Return an errorcode of 0 if no differences were detected, 1 if some were.
# Any other errorcode will be treated as fatal.
然後修改 ~/.subversion/config
[helpers]
diff-cmd = /home/matt/bin/diffwrap.sh
goproj.sh `pwd`