summaryrefslogtreecommitdiff
path: root/.vim
diff options
context:
space:
mode:
authorjohannst <stoelp@eit.uni-kl.de>2016-07-17 22:06:11 +0200
committerjohannst <stoelp@eit.uni-kl.de>2016-07-17 22:06:11 +0200
commit223ea8f5199aef6b7c6b771c4448282288f18d9b (patch)
treed3306ece2f782c84a29ab5c838ff8a37c3314331 /.vim
parentdc01638ea52980c64642bdd992dcc05bc3a4aab1 (diff)
downloaddotfiles-223ea8f5199aef6b7c6b771c4448282288f18d9b.tar.gz
dotfiles-223ea8f5199aef6b7c6b771c4448282288f18d9b.zip
Added vim omnicppcompleten suppoert
Diffstat (limited to '.vim')
-rw-r--r--.vim/vimrc_files/keymaps.vim12
-rw-r--r--.vim/vimrc_files/plugin_config.vim23
-rw-r--r--.vim/vimrc_files/vundle.vim2
3 files changed, 33 insertions, 4 deletions
diff --git a/.vim/vimrc_files/keymaps.vim b/.vim/vimrc_files/keymaps.vim
index fe78484..b440aed 100644
--- a/.vim/vimrc_files/keymaps.vim
+++ b/.vim/vimrc_files/keymaps.vim
@@ -86,14 +86,20 @@ nnoremap <c-n> :call ToggleRelativeNumber()<CR>
" add a marker fold snippet (for C/C++)
nnoremap <C-f> o//{{{ <Esc>o//}}}<Esc><Up>A
imap <C-f> <ESC><C-f>
-"only works with v-block (not v-line)
+" only works with v-block (not v-line)
vnoremap <C-f> VV'<O//{{{ <Esc>'>o//}}}<Esc>'<<ESC><Up>A
+" substitute selection
+vnoremap <C-r> "hy:%s/<C-r>h//gc<left><left><left>
+
+" +-----------------+
+" | Plugin specific |
+" +-----------------+
" Open BufferExplorer
nnoremap <C-b> :call BufExplorer()<CR>
" Toggle Tagbar
nnoremap <leader>t :TagbarToggle<CR>
-" substitute selection
-vnoremap <C-r> "hy:%s/<C-r>h//gc<left><left><left>
+" build tags of your own project with Ctrl-F12
+map <C-F12> :!ctags -R --sort=yes --c++-kinds=+pl --fields=+iaS --extra=+q --language-force=C++ .<CR>
diff --git a/.vim/vimrc_files/plugin_config.vim b/.vim/vimrc_files/plugin_config.vim
index ec61660..d4c0848 100644
--- a/.vim/vimrc_files/plugin_config.vim
+++ b/.vim/vimrc_files/plugin_config.vim
@@ -21,4 +21,25 @@ endif
" +----------------------------+
" | Tagbar |
" +----------------------------+
-let g:tagbar_ctags_bin='/u/jstolp/bin/ctags'
+let g:tagbar_ctags_bin='/u/jstolp/apps/bin/ctags'
+"let g:tagbar_ctags_bin='/home/johannst/apps/bin/ctags'
+
+
+" +----------------------------+
+" | OmniCppComplete |
+" +----------------------------+
+" add tags
+" set tags+=~/.vim/tags/cpp_tags
+
+" 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
diff --git a/.vim/vimrc_files/vundle.vim b/.vim/vimrc_files/vundle.vim
index 17d5786..b540ef0 100644
--- a/.vim/vimrc_files/vundle.vim
+++ b/.vim/vimrc_files/vundle.vim
@@ -17,5 +17,7 @@ Plugin 'vim-airline/vim-airline-themes'
Plugin 'majutsushi/tagbar'
+" c++ modifief headers: http://www.vim.org/scripts/script.php?script_id=2358
+Plugin 'vim-scripts/OmniCppComplete'
call vundle#end()