Linux下用Vim+cscope+ctags打造具有Source Insight便利性的IDE
来源:互联网 发布:孔北海知世间有刘备耶 编辑:程序博客网 时间:2024/05/16 06:57
Vim简单介绍:Linux/Unix下的文本编辑软件。
使用Vim coding优势:
1.无需鼠标,全键盘操作。对于coding来说,可以双手专注盲打coding,无需切换鼠标导致分散注意力。
2.支持插件,从而可以利用插件,在Linux下将Vim打造成和SourceInsight一样强大的代码阅读器。
只需要学习简单的Vim基本命令,配置常用的插件,就可以把Vim打造成属于自己的编辑利器!
效果图如下,左边是function、中间是正文、右边是文件夹路径。
vim config已上传:http://download.csdn.net/detail/u014558668/9741632
只需要将其中的隐藏文件扔到编译网盘的根目录下,执行shell:.generate_cscope_ctags.sh 自动生成cscope&ctags,就能正常使用!
.vimrc如下
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" VIM userinterface"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""syntax enablesyntax onset nuset tabstop=4set softtabstop=4set shiftwidth=4set textwidth=80"Highlight search thingsset hlsearchset incsearch"show matching bracetsset showmatch"Always show current positionset ruler"Ignore case when searching"set ignorecase"Enable filetype pluginfiletype plugin onfiletype indent onset completeopt=longest,menu"Set to auto read when a file is changed from the outsideset autoread"Have the mouse enabled all the time:"set mouse=a"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Colors and Fonts"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""colorscheme desert"colorscheme desert_my"colorscheme murphy "colorscheme darkblueset guifont=Courier\ New:h10"set guifont=consolas"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Code fold """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""set foldmarker={,}"set foldmethod=markerset foldmethod=syntaxset foldlevel=100 " Don't autofold anything (but I can still fold manually)"set foldopen-=search " don't open folds when you search into them"set foldopen-=undo " don't open folds when you undo stuff"set foldcolumn=4"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Plugin configuration"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Taglist setting""""""""""""""""""""""""""""""let Tlist_Ctags_Cmd = '/usr/bin/ctags'let Tlist_Show_One_File=1let Tlist_Exit_OnlyWindow=1"let Tlist_Use_Right_Window=1let Tlist_Show_Menu=1nmap tl :Tlist<cr>""""""""""""""""""""""""""""""" winmanager setting""""""""""""""""""""""""""""""let g:winManagerWindowLayout='BufExplorer,FileExplorer|Taglist'"let g:winManagerWidth = 30"let g:defaultExplorer = 0"let g:netrw_winsize = 30nmap wm :WMToggle<cr>""""""""""""""""""""""""""""""" miniBufExpl setting""""""""""""""""""""""""""""""let g:miniBufExplMapWindowNavArrows = 1let g:miniBufExplMapCTabSwitchBufs = 1nmap mb :TMiniBufExplorer<CR>""""""""""""""""""""""""""""""" mark setting""""""""""""""""""""""""""""""nmap <silent> <leader>hl <Plug>MarkSetvmap <silent> <leader>hl <Plug>MarkSetnmap <silent> <leader>hh <Plug>MarkClearvmap <silent> <leader>hh <Plug>MarkClearnmap <silent> <leader>hr <Plug>MarkRegexvmap <silent> <leader>hr <Plug>MarkRegex""""""""""""""""""""""""""""""" Grep setting""""""""""""""""""""""""""""""nnoremap <silent> <F3> :Rgrep<CR>""""""""""""""""""""""""""""""" a.vim setting:change .c to .h in the same dir""""""""""""""""""""""""""""""nnoremap <silent> <F12> :A<CR>"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" ctags setting""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""set tags=~/source/tagsset tags=tags;"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" cscope setting"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""set cscopequickfix=s-,c-,d-,i-,t-,e-set nocscopeverbose"cs add ~/source/cscope.out ~/sourceif filereadable("cscope.out")cs add cscope.out . endifnmap <C-\>s :cs find s <C-R>=expand("<cword>")<CR><CR>nmap <C-\>g :cs find g <C-R>=expand("<cword>")<CR><CR>nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR>nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR>nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR>nmap <C-\>f :cs find f <C-R>=expand("<cfile>")<CR><CR>nmap <C-\>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>nmap <C-\>d :cs find d <C-R>=expand("<cword>")<CR><CR>"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Coding setting """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""ab debug1 printf("@@@@@ %s %s line=%d\n",__FILE__,__func__,__LINE__);ab debug2 printf("@@@@@ %s line=%d\n",__func__,__LINE__);
0 0
- Linux下用Vim+cscope+ctags打造具有Source Insight便利性的IDE
- Vim+Ctags+Cscope打造linux下的source insight
- Vim + Cscope打造Linux下的Source Insight
- Vim + Cscope打造Linux下的Source Insight
- Vim + Cscope打造Linux下的Source Insight
- Vim + Cscope打造Linux下的Source Insight
- Vim + Cscope打造Linux下的Source Insight
- vim+cscope+ctags打造属于自己的IDE
- vim+cscope+ctags打造属于自己的IDE
- ctags + cscope + vim + 打造 mac 环境下的VIM神器
- Linux下VIM作为IDE:玩转cscope+ctags
- ctags+cscope+vim打造linux版si
- 用vim+ctags+taglist+cscope打造文本模式下的Kscope
- 用vim+ctags+taglist+cscope打造文本模式下的Kscope
- 用vim+ctags+taglist+cscope打造文本模式下的Kscope
- Cygwin+vim+cscope+ctags+taglist打造个性IDE开发环境
- linux下的vim + ctags +cscope 的使用
- 用vim替代source insight(ctags+taglist+)
- 文字转语音开源软件-espeak
- 寒假集训day7
- React Native从零开始(九)ViewPagerAndroid的使用,和简单框架搭建
- Swift和Objective-C交互
- HDU - 1166.敌兵布阵
- Linux下用Vim+cscope+ctags打造具有Source Insight便利性的IDE
- java项目到处jar包,转成.exe可执行文件
- VPN篇(5.2) 08. PPTP VPN 与 L2TP VPN ❀ 飞塔 (Fortinet) 防火墙
- Java编码问题汇总
- git flow git工作流
- Error creating bean with name 'signService': Injection
- div 显示与隐藏
- Bird私房菜学习笔记1 命令记录
- RPL(7):RFC6550翻译(7)---Upward Routes