目錄
windows環境
1. 下載源碼
1. 打開https://mirror.tuna.tsinghua.edu.cn/
2. 搜索kernel,點進去下載2.6.24版本和5.4版本的內核
2. 導入源碼
1. 解壓壓縮包
2. vscode打開文件夾
3. ctags解析
1. vscode安裝ctags support插件,c/c++插件(注意:不安裝這個插件的話沒法跳轉的)
2. 下載ctags58.zip:http://ctags.sourceforge.net/
3. 安裝git bash
4. 解壓ctags58.zip,然后打開git bash,在linux-2.6.24文件夾下,運行:
/c/Program\ Files/ctags58/ctags.exe -R -f .tags
5. 按ctrl + 鼠標,就可以進行跳轉操作了
vscode
vscode快捷鍵
ctrl + p 查找文件
Ctrl + f 查找符號
ctrl + 鼠標 跳轉符號
alt + 左右箭頭 返回或者前進剛才的位置(Android studio中也是這樣的)
vscode設置
1. 每次都在同一個窗口打開文件
關閉預覽模式:"workbench.editor.enablePreview": false,
遠程服務器離線安裝vscode插件
1. 打開https://marketplace.visualstudio.com/
2. 搜索你要的插件,然后點擊右邊Download Extension,下載vsix格式的插件
3. 將下載的vsix插件放在遠程服務器的一個目錄中
4. 打開左下角設置 -> extensions -> 右上角... -> install from vsix -> 打開遠程服務器的vsix文件即可安裝成功了
bash
1. 配置.bashrc文件
# ls區分文件和目錄的顏色
alias ls='ls --color=auto'
# grep的時候高亮
alias grep='grep --color=auto'