先挑選你要的 color scheme,然後在 .vimrc 加入一行 (以 pablo 為例):
colorscheme pablo
ref:
colorscheme pablo
gvim () { command gvim --remote-tab-silent $@ || command gvim $@; }
這樣以後每次在 command line 用 gvim 開啟檔案時,都會自動加上 --remote-tab-silent 選項。 ctags -RCtrl-]Ctrl-T
在函数中移动光标的快捷键:
[{ 转到上一个位于第一列的"{"
}] 转到下一个位于第一列的"{"
{ 转到上一个空行
} 转到下一个空行
gd 转到当前光标所指的局部变量的定义
* 转到当前光标所指的单词下一次出现的地方
# 转到当前光标所指的单词上一次出现的地方:set ls=2
可以把這個寫在 vimrc 裡。#!/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
vi -p serial_core.c mxc_uart.c
:tabn
下一個 tab:tabp
上一個 tab :tabn 2
後2 個 tabtabc