====== 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.x86_64:
yum install ctags-etags.x86_64
* Download Taglist: http://vim-taglist.sourceforge.net/
* Add to ~/.vimrc:
" Taglist & exuberant ctag
let Tlist_Ctags_Cmd='/usr/bin/ctags'
let Tlist_WinWidth = 40
" toggle Tlist window
map :TlistToggle
" index current file
map :!/usr/bin/ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .
* Usage
:TlistToggle
Sources:
* http://amix.dk/blog/post/19329
==== C++ autocompletion ====
Sources:
* http://vim.wikia.com/wiki/C%2B%2B_code_completion
===Required setup===
1. Install {{script|id=1520|text=OmniCppComplete}}. See its doc/omnicppcomplete.txt file for information.
2. Make a directory, for example ~/.vim/tags that will hold your ctags.
3. Create stdc++ tags: Download and unpack the {{script|id=2358|text=modified libstdc++ headers}} to ~/.vim/tags/cpp_src
4. Run ctags:
$ cd ~/.vim/tags
$ ctags -R --sort=1 --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ -f cpp cpp_src
5. Add additional tags (change to your system/likings):
$ 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
6. Edit your ~/.vimrc and change to your system/likings:
" 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 :!ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q .
" OmniCppComplete
let OmniCpp_NamespaceSearch = 1
let OmniCpp_GlobalScopeSearch = 1
let OmniCpp_ShowAccess = 1
let OmniCpp_ShowPrototypeInAbbr = 1 " show function parameters
let OmniCpp_MayCompleteDot = 1 " autocomplete after .
let OmniCpp_MayCompleteArrow = 1 " autocomplete after ->
let OmniCpp_MayCompleteScope = 1 " autocomplete after ::
let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"]
" automatically open and close the popup menu / preview window
au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
set completeopt=menuone,menu,longest,preview
===== 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.
===== Vim PDB for debugging =====
* http://code.google.com/p/vimpdb/
===== Source =====
* http://blog.dispatched.ch/2009/05/24/vim-as-python-ide/