Table of Contents
Vim as a Python ide
Buffers explorer
- Download MiniBufExplorer and save it in ~/.vim/plugin/: http://www.vim.org/scripts/script.php?script_id=159
- Add config to ~/.vimrc config file:
let g:miniBufExplMapWindowNavVim = 1 let g:miniBufExplMapWindowNavArrows = 1 let g:miniBufExplMapCTabSwitchBufs = 1 let g:miniBufExplModSelTarget = 1
- Usage:
Project view with Taglist & ExuberantCtag
- install ctags-etags.x8664: yum install ctags-etags.x8664
- Download Taglist: http://vim-taglist.sourceforge.net/
- Add to ~/.vimrc: “ Taglist & exuberant ctag let TlistCtagsCmd='/usr/bin/ctags' let Tlist_WinWidth = 40 ” toggle Tlist window map <F4> :TlistToggle<cr> “ index current file map <F8> :!/usr/bin/ctags -R –c++-kinds=+p –fields=+iaS –extra=+q .<CR>
- Usage
:TlistToggle
Sources:
C++ autocompletion
Required setup
1. Install id=1520|text=OmniCppComplete. See its
doc/omnicppcomplete.txt
file for information.
- Make a directory, for example <code>~/.vim/tags</code> that will hold your ctags.
- Create stdc++ tags: Download and unpack the id=2358|text=modified libstdc++ headers to <code>~/.vim/tags/cpp_src</code>
- Run ctags: <code> $ cd ~/.vim/tags $ ctags -R –sort=1 –c++-kinds=+p –fields=+iaS –extra=+q –language-force=C++ -f cpp cpp_src </code>
- Add additional tags (change to your system/likings): <code> $ ctags -R –sort=yes –c++-kinds=+p –fields=+iaS –extra=+q –language-force=C++ -f gl /usr/include/GL/ # for OpenGL $ ctags -R –sort=yes –c++-kinds=+p –fields=+iaS –extra=+q –language-force=C++ -f sdl /usr/include/SDL/ # for SDL $ ctags -R –sort=yes –c++-kinds=+p –fields=+iaS –extra=+q –language-force=C++ -f qt4 /usr/include/qt4/ # for QT4 </code>
- Edit your ~/.vimrc and change to your system/likings: <code> ” configure tags - add additional tags here or comment out not-used ones set tags+=~/.vim/tags/cpp set tags+=~/.vim/tags/gl set tags+=~/.vim/tags/sdl set tags+=~/.vim/tags/qt4 “ build tags of your own project with Ctrl-F12 map <C-F12> :!ctags -R –sort=yes –c++-kinds=+p –fields=+iaS –extra=+q .<CR>
” OmniCppComplete let OmniCppNamespaceSearch = 1 let OmniCppGlobalScopeSearch = 1 let OmniCppShowAccess = 1 let OmniCppShowPrototypeInAbbr = 1 “ show function parameters let OmniCppMayCompleteDot = 1 ” autocomplete after . let OmniCppMayCompleteArrow = 1 “ autocomplete after → let OmniCppMayCompleteScope = 1 ” autocomplete after :: let OmniCppDefaultNamespaces = [“std”, “GLIBCXXSTD”] “ automatically open and close the popup menu / preview window au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif set completeopt=menuone,menu,longest,preview </code>
Tasklist
- install Tasklist in plugin: http://www.vim.org/scripts/download_script.php?src_id=10388
- Usage:
TaskList
autocompletion for python
- download pythoncomplete to plugin: http://www.vim.org/scripts/download_script.php?src_id=10872
- add to .vimrc file:
autocmd FileType python set omnifunc=pythoncomplete#Complete
* Usage: Ctrl+x Ctrl+o to open dropdown list.