IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 开发工具 -> vim配置(嵌入式C语言开发) -> 正文阅读

[开发工具]vim配置(嵌入式C语言开发)

一、序言

??????本文针对是对于嵌入式开发者,个人而言比较好用一些的配置版本

二、使用方法

??????在家目录中添加**.vimrc**文件,将配置添加进去即可。

三、.vimrc配置文件

??????除了一些基础配置以外,还添加了一些好用的插件:Vundle、ctags、cscope等。使用效果图如下:
在这里插入图片描述

"    Author: Pitnitus
"    Created: 2022-01-01
" LastChange: 2022-05-08

"iGENERAL SETTINGS: {{{1
" To use VIM settings, out of VI compatible mode.
set nocompatible
" Enable file type detection.
filetype plugin indent on
" Syntax highlighting.
syntax on
" Setting colorscheme
" Other settings.
set   autoindent
set   autoread
set   autowrite
set   background=dark
set   backspace=indent,eol,start
set nobackup
set   cindent
set   cinoptions=:0
set   cursorline
set   completeopt=longest,menuone
set noexpandtab
set   fileencodings=utf-8,gb2312,gbk,gb18030
set   fileformat=unix
set   foldenable
set   foldmethod=marker
set   guioptions-=T
set   guioptions-=m
set   guioptions-=r
set   guioptions-=l
set   helpheight=10
set   helplang=cn
set   hidden
"set   history=100
set   hlsearch
set   ignorecase
set   incsearch
set   laststatus=2
set   mouse-=a
set   number
set   paste
set   pumheight=10
set   ruler
set   scrolloff=5
set   shiftwidth=4
set   showcmd
set   smartindent
set   smartcase
set   tabstop=4
set   termencoding=utf-8
set   textwidth=80
set   whichwrap=h,l
set   wildignore=*.bak,*.o,*.e,*~
set   wildmenu
set   wildmode=list:longest,full
set nowrap
"""""""""""""""""""""""""""""""""""""
"1 Vundle manage
set nocompatible 	"be iMproved, required
filetype off		"required

"set the runtime path to include Vundle and initialize
set rtp+=~/Vundle.vim
call vundle#begin()

"let Vundle manage Vundle, required
Plugin 'Vundle.vim'

"All of your Plugins must be added before the following line
call vundle#end()	" required
filetype plugin indent on "required


"""""""""""""""""""""""""""""""""""""'
"ctags manage
"sudo apt-get install ctags
"Use :
"    Process use command "ctags -R"
"	ctrl+] --> 
"	ctrl+T <--
:set tags=tags

""""""""""""""""""""""""""""""""""""
"cscope manage
"sudo apt-get install cscope
"
"cscope : build-in datalib:cscope-Rbq;
"	F5 : find c char;
"	F6 : find a string
"	F7 : find handle's define
"	F8 : find it who used handle
if has("cscope")
	set csprg=/usr/bin/cscope
	set csto=1
	set nocsverb
	"add any database in current directory
	if filereadable("cscope.out")
		cs add cscope.out
	endif
	set csverb
endif
:set cscopequickfix=s-,c-,d-,i-,t-,e-

nmap <silent> <F5> :cs find s <C-R>=expand("<cword>") <CR><CR>
nmap <silent> <F6> :cs find t <C-R>=expand("<cword>") <CR><CR>
nmap <silent> <F7> :cs find c <C-R>=expand("<cword>") <CR><CR>
nmap <silent> <F8> :cs find d <C-R>=expand("<cword>") <CR><CR>

"""""""""""""""""""""""""""""""""""""""""""""""""""""""
Plugin 'majutsushi/tagbar' " Tag bar"
" Tagbar
let g:tagbar_width=40
autocmd BufReadPost *.cpp,*.c,*.h,*.cc,*.cxx call tagbar#autoopen()

""""""""""""""""""""""""""""""""""""""""""""""""""""""
Plugin 'scrooloose/nerdtree'
" NetRedTree
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
let NERDTreeWinSize=15
let NERDTreeShowLineNumbers=5
let NERDTreeAutoCenter=1
let NERDTreeShowBookmarks=1

""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Tools for language rules to check
Plugin 'w0rp/ale'

let g:ale_sign_columm_always=1
let g:ale_sign_error = 'X'
let g:ale_sign_sign_warning = 'w'
let g:ale_statusline_format = ['X %d', '~~ %d', '\/ OK']
let g:ale_echo_msg_format = '[%linter%] %code: %%s'
let g:ale_lint_on_text_changed = 'normal'
let g:ale_lint_on_insert_leave = 1
let g:ale_c_gcc_options = '-Wall -O2 -std=c99'
let g:ale_cpp_gcc_options = '-Wall -O2 -std=c++14'
let g:ale_c_cppcheck_options = ''
let g:ale_cpp_cppcheck_options = ''

""""""""""""""""""""""""""""""""""""""""""""""""""
Plugin 'Valloric/YouCompleteMe'

set number

  开发工具 最新文章
Postman接口测试之Mock快速入门
ASCII码空格替换查表_最全ASCII码对照表0-2
如何使用 ssh 建立 socks 代理
Typora配合PicGo阿里云图床配置
SoapUI、Jmeter、Postman三种接口测试工具的
github用相对路径显示图片_GitHub 中 readm
Windows编译g2o及其g2o viewer
解决jupyter notebook无法连接/ jupyter连接
Git恢复到之前版本
VScode常用快捷键
上一篇文章      下一篇文章      查看所有文章
加:2022-05-10 12:06:52  更:2022-05-10 12:07:12 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年5日历 -2024/5/18 22:40:50-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码