From 2e5cd5cfcd176ce893a62b76b9ee377ef8139d83 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Sat, 25 Jul 2015 00:44:38 +0200 Subject: [PATCH] Added usefull programming plugins to neovim --- nvim/.nvim/autoload/plug.vim | 1 + nvim/.nvim/plugged/OmniCppComplete | 1 + nvim/.nvim/plugged/YouCompleteMe | 1 - nvim/.nvim/plugged/supertab | 1 + nvim/.nvim/plugged/tlib_vim | 1 + nvim/.nvim/plugged/vim-addon-mw-utils | 1 + nvim/.nvim/plugged/vim-snipmate | 1 + nvim/.nvim/plugged/vim-snippets | 1 + nvim/.nvim/snippets/cpp.snippets | 15 ++++++++++++ nvim/.nvimrc | 34 +++++++++++++++++++++++---- 10 files changed, 52 insertions(+), 5 deletions(-) create mode 160000 nvim/.nvim/plugged/OmniCppComplete delete mode 160000 nvim/.nvim/plugged/YouCompleteMe create mode 160000 nvim/.nvim/plugged/supertab create mode 160000 nvim/.nvim/plugged/tlib_vim create mode 160000 nvim/.nvim/plugged/vim-addon-mw-utils create mode 160000 nvim/.nvim/plugged/vim-snipmate create mode 160000 nvim/.nvim/plugged/vim-snippets create mode 100644 nvim/.nvim/snippets/cpp.snippets diff --git a/nvim/.nvim/autoload/plug.vim b/nvim/.nvim/autoload/plug.vim index cabeb4f..9102a09 100644 --- a/nvim/.nvim/autoload/plug.vim +++ b/nvim/.nvim/autoload/plug.vim @@ -33,6 +33,7 @@ " " Unmanaged plugin (manually installed and updated) " Plug '~/my-prototype-plugin' " +" " Add plugins to &runtimepath " call plug#end() " " Then reload .vimrc and :PlugInstall to install plugins. diff --git a/nvim/.nvim/plugged/OmniCppComplete b/nvim/.nvim/plugged/OmniCppComplete new file mode 160000 index 0000000..2fac015 --- /dev/null +++ b/nvim/.nvim/plugged/OmniCppComplete @@ -0,0 +1 @@ +Subproject commit 2fac015957895dffa6b298e3c028ac30560d015b diff --git a/nvim/.nvim/plugged/YouCompleteMe b/nvim/.nvim/plugged/YouCompleteMe deleted file mode 160000 index b9dd909..0000000 --- a/nvim/.nvim/plugged/YouCompleteMe +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b9dd9096a34c1d720878f0058dc3e68f9e9c87ea diff --git a/nvim/.nvim/plugged/supertab b/nvim/.nvim/plugged/supertab new file mode 160000 index 0000000..c8bfece --- /dev/null +++ b/nvim/.nvim/plugged/supertab @@ -0,0 +1 @@ +Subproject commit c8bfeceb1fc92ad58f2ae6967cbfcd6fbcb0d6e7 diff --git a/nvim/.nvim/plugged/tlib_vim b/nvim/.nvim/plugged/tlib_vim new file mode 160000 index 0000000..c9ffbef --- /dev/null +++ b/nvim/.nvim/plugged/tlib_vim @@ -0,0 +1 @@ +Subproject commit c9ffbef0718a35bd30eb711456e2100e4adf79f7 diff --git a/nvim/.nvim/plugged/vim-addon-mw-utils b/nvim/.nvim/plugged/vim-addon-mw-utils new file mode 160000 index 0000000..0c5612f --- /dev/null +++ b/nvim/.nvim/plugged/vim-addon-mw-utils @@ -0,0 +1 @@ +Subproject commit 0c5612fa31ee434ba055e21c76f456244b3b5109 diff --git a/nvim/.nvim/plugged/vim-snipmate b/nvim/.nvim/plugged/vim-snipmate new file mode 160000 index 0000000..c86c645 --- /dev/null +++ b/nvim/.nvim/plugged/vim-snipmate @@ -0,0 +1 @@ +Subproject commit c86c64508a5b0309040429460c3a13fb90ac708e diff --git a/nvim/.nvim/plugged/vim-snippets b/nvim/.nvim/plugged/vim-snippets new file mode 160000 index 0000000..c5af9b9 --- /dev/null +++ b/nvim/.nvim/plugged/vim-snippets @@ -0,0 +1 @@ +Subproject commit c5af9b925f9213c290bf5253eac116987516d057 diff --git a/nvim/.nvim/snippets/cpp.snippets b/nvim/.nvim/snippets/cpp.snippets new file mode 100644 index 0000000..fce720b --- /dev/null +++ b/nvim/.nvim/snippets/cpp.snippets @@ -0,0 +1,15 @@ +#header +snippet header + #ifndef ${1:`toupper(vim_snippets#Filename('$1_H', 'UNTITLED_H'))`} + #define $1 + + #include "Standard.h" + + ${0} + + #endif + +snippet incl + #include "${1:`vim_snippets#Filename('$1.h', 'Untitled.h')`}" + + ${0} diff --git a/nvim/.nvimrc b/nvim/.nvimrc index c3d417c..41137fa 100644 --- a/nvim/.nvimrc +++ b/nvim/.nvimrc @@ -13,7 +13,13 @@ Plug 'tommcdo/vim-exchange' Plug 'justinmk/vim-matchparenalways' Plug 'tpope/vim-surround' Plug 'christoomey/vim-tmux-navigator' -Plug 'Valloric/YouCompleteMe' +Plug 'vim-scripts/OmniCppComplete' +Plug 'ervandew/supertab' +Plug 'MarcWeber/vim-addon-mw-utils' +Plug 'tomtom/tlib_vim' +Plug 'garbas/vim-snipmate' +Plug 'honza/vim-snippets' +" Plug 'Valloric/YouCompleteMe' call plug#end() let g:neomake_airline=1 @@ -28,12 +34,15 @@ set t_Co=256 set t_ZH= set t_ZR= set background=dark +" set background=light let g:indentLine_char = '│' -map :NERDTreeToggle +" map :NERDTreeToggle +map :NERDTreeToggle -map :TagbarToggle +" map :TagbarToggle +map :TagbarToggle let g:airline_powerline_fonts = 1 let g:airline#extensions#tabline#enabled = 1 @@ -44,9 +53,23 @@ map :TmuxNavigateDown map :TmuxNavigateUp map :TmuxNavigateRight +set omnifunc=syntaxcomplete#Complete " override built-in C omnicomplete with C++ OmniCppComplete plugin +let OmniCpp_GlobalScopeSearch = 1 +let OmniCpp_DisplayMode = 1 +let OmniCpp_ShowScopeInAbbr = 0 "do not show namespace in pop-up +let OmniCpp_ShowPrototypeInAbbr = 1 "show prototype in pop-up +let OmniCpp_ShowAccess = 1 "show access in pop-up +let OmniCpp_SelectFirstItem = 1 "select first item in pop-up +set completeopt=menuone,menu,longest + +let g:SuperTabDefaultCompletionType = "" + +" let g:SuperTabDefaultCompletionType = "" + syntax on filetype plugin indent on +set nocp set smartindent set number set relativenumber @@ -54,6 +77,7 @@ set laststatus=2 set softtabstop=4 set shiftwidth=4 set noexpandtab +set completeopt-=preview map :bn map :bp @@ -61,4 +85,6 @@ map :bp map map -map :Topen gradle build +map :make:cw +map :!./platformer +map :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .