sourceInsight-doc-使用

linux智能提示

源码下载

官方下载

官方源码地址https://git.kernel.org/,常用的2.6版本地址https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/refs/?h=linux-2.6.11.y

进入对应的版本分支网页后,切换到commit页签,点击download即可

linux源码下载

linux源码下载

linux系统拷贝

官方的下载速度真心的慢,到linux系统里面直接拷贝出来是相对的方便

1
2
3
4
5
6
7
8
# 复制头文件
cp -r /usr/include ./include/linux

# 压缩头文件
zip -r include.zip include

# 文件拉取到本地
sz include.zip

头文件引入

  • 选择Option的Prefrences进入引用设置
  • 在Prefrences菜单选择SymbolLookups,并且选择Import Symbols for All Projects添加头文件

进入Prefrences

进入Prefrences

导入所有项目

导入所有项目

添加头文件路径

添加头文件路径

快捷键设置

  • 开启Source Insight
  • options->key assignments
  • 快捷键设置对话框,搜索对应的key
  • 点击 Delete Assignment 删除原来的指令
  • 点击 Assign New Key 添加新的key
快捷键 描述
View: Clear Highlights 清除高亮
View: Highlight Word 关键字高亮
Edit: Comment Lines 注释
Edit: Un-Comment Lines 反注释