aboutsummaryrefslogtreecommitdiff
path: root/vimrc-full
diff options
context:
space:
mode:
authorMax Christian Pohle2018-04-24 19:58:22 +0200
committerMax Christian Pohle2018-04-24 19:58:22 +0200
commita8d7afffdfc4b2c853b14aff1652b4abe4353f86 (patch)
tree7931cd6c868371791f4d25621fc8bddb0e5582df /vimrc-full
parentfffdbfc807b450007ca74248aa60a269ab9d4e5d (diff)
downloadvim-karlmarks-a8d7afffdfc4b2c853b14aff1652b4abe4353f86.tar.bz2
vim-karlmarks-a8d7afffdfc4b2c853b14aff1652b4abe4353f86.zip
BufToArg changed, cwd shown per win, improved deoplete integration
Diffstat (limited to 'vimrc-full')
-rw-r--r--vimrc-full29
1 files changed, 21 insertions, 8 deletions
diff --git a/vimrc-full b/vimrc-full
index f192eb3..2d076b8 100644
--- a/vimrc-full
+++ b/vimrc-full
@@ -780,11 +780,11 @@ let g:lightline = {
780 \ 'separator': { 'left': "\uE0B4", 'right': "\uE0B6" }, 780 \ 'separator': { 'left': "\uE0B4", 'right': "\uE0B6" },
781 \ 'subseparator': { 'left': "\uE0b1", 'right': "\uE0b3" }, 781 \ 'subseparator': { 'left': "\uE0b1", 'right': "\uE0b3" },
782 \ 'inactive': { 782 \ 'inactive': {
783 \ 'left': [ ['absolutepath'] ], 783 \ 'left': [ [ 'pwd', 'relativepath'] ],
784 \ 'right': [] 784 \ 'right': []
785 \ }, 785 \ },
786 \ 'active': { 786 \ 'active': {
787 \ 'left': [ [ 'mode', 'register', 'paste' ], [ 'absolutepath', 'title' ] , ['tagbar']], 787 \ 'left': [ [ 'mode', 'register', 'paste' ], [ 'pwd', 'relativepath', 'title' ] , ['tagbar']],
788 \ 'right': [ [ 'lineinfo', 'percent' ], [ 'filetype', 'readonly', 'spell', 'fileencoding', 'fileformat' ] ] 788 \ 'right': [ [ 'lineinfo', 'percent' ], [ 'filetype', 'readonly', 'spell', 'fileencoding', 'fileformat' ] ]
789 \ }, 789 \ },
790 \ 'component': { 790 \ 'component': {
@@ -798,7 +798,9 @@ let g:lightline = {
798 \ 'tabnumber': " %{tabpagenr()}/%{tabpagenr('$')}", 798 \ 'tabnumber': " %{tabpagenr()}/%{tabpagenr('$')}",
799 \ 'readonly': '%{&readonly ? "" : ""}', 799 \ 'readonly': '%{&readonly ? "" : ""}',
800 \ 'register': '%{v:register}', 800 \ 'register': '%{v:register}',
801 \ 'title': '%{getwinvar(0, "quickfix_title")}' 801 \ 'title': '%{getwinvar(0, "quickfix_title")}',
802 \ 'pwd': '%{getcwd()}',
803 \ 'relativepath': '%{fnamemodify(expand("%"), ":.")}'
802 \ }, 804 \ },
803 \ 'component_expand': { 805 \ 'component_expand': {
804 \ 'buffercurrent': 'lightline#buffer#buffercurrent2', 806 \ 'buffercurrent': 'lightline#buffer#buffercurrent2',
@@ -844,7 +846,6 @@ if has("python")
844 846
845 if has('nvim') 847 if has('nvim')
846 Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } 848 Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
847 " Plug 'tweekmonster/deoplete-clang2'
848 " Use deoplete. 849 " Use deoplete.
849 let g:deoplete#enable_at_startup = 1 850 let g:deoplete#enable_at_startup = 1
850 inoremap <silent><expr> <C-Space> deoplete#mappings#manual_complete() 851 inoremap <silent><expr> <C-Space> deoplete#mappings#manual_complete()
@@ -853,8 +854,15 @@ if has("python")
853 let g:echodoc#enable_at_startup = 1 854 let g:echodoc#enable_at_startup = 1
854 855
855 " Plug 'Rip-Rip/clang_complete' 856 " Plug 'Rip-Rip/clang_complete'
857 " Plug 'tweekmonster/deoplete-clang2'
856 Plug 'zchee/deoplete-clang' 858 Plug 'zchee/deoplete-clang'
859 let g:deoplete#sources#clang#libclang_path = "/usr/lib/libclang.so"
860 let g:deoplete#sources#clang#clang_header = "/usr/lib/clang/6.0.0/"
861 " let g:deoplete#sources#clang#clang_complete_database = "/home/max/src"
857 Plug 'Shougo/neoinclude.vim' 862 Plug 'Shougo/neoinclude.vim'
863
864
865 " Plug 'roxma/nvim-completion-manager' unmaintained python version
858 else 866 else
859 Plug 'idanarye/vim-vebugger' 867 Plug 'idanarye/vim-vebugger'
860 868
@@ -956,7 +964,8 @@ autocmd FileType c,cpp,objc map <buffer> = :pyf /usr/share/clang/clang-format.py
956" found this command instead (use as PAGER): 964" found this command instead (use as PAGER):
957" man -P 'nvim -R -u NORC -c":%!col -b" -c":set buftype=nowrite filetype=man" -' ls 965" man -P 'nvim -R -u NORC -c":%!col -b" -c":set buftype=nowrite filetype=man" -' ls
958 966
959command BufToArg :exec ':args '.join(map(range(0, bufnr('$')), 'fnameescape(fnamemodify(bufname(v:val), ":."))')) 967command BuffersToArg :exec ':args '.join(map(range(0, bufnr('$')), 'fnameescape(fnamemodify(bufname(v:val), ":."))'))
968command BufToArg :argadd %:.
960 969
961"======================================================================================================================= 970"=======================================================================================================================
962call plug#end() | " all plugins are getting loaded on this line, don't remove! 971call plug#end() | " all plugins are getting loaded on this line, don't remove!
@@ -1105,12 +1114,15 @@ command Vimls
1105 \ ")) 1114 \ "))
1106 1115
1107command Ctoggle 1116command Ctoggle
1108 \ if(get(getqflist({'winid':1}), 'winid') == win_getid())|cclose|else|copen|endif 1117 \ if(get(getqflist({'winid':1}), 'winid') == win_getid())|cclose|else|botright copen|endif
1109command Ltoggle 1118command Ltoggle
1110 \ if(get(getloclist(0, {'winid':1}), 'winid') == win_getid())|lclose|else|lopen|endif 1119 \ if(get(getloclist(0, {'winid':1}), 'winid') == win_getid())|lclose|else|lopen|endif
1111 1120
1112nnoremap <silent> <F7> :Ltoggle<CR> 1121
1113nnoremap <silent> <F8> :Ctoggle<CR> 1122
1123nnoremap <silent> <ESC> :lclose<CR>
1124nnoremap <silent> <F7> :Ltoggle<CR>
1125nnoremap <silent> <F8> :Ctoggle<CR>
1114nnoremap <silent> <F12> :Vimls<CR>:Ltoggle<CR> 1126nnoremap <silent> <F12> :Vimls<CR>:Ltoggle<CR>
1115 1127
1116" exec current line as a command, insert output of command (from: https://youtu.be/MquaityA1SM?t=35m45s) 1128" exec current line as a command, insert output of command (from: https://youtu.be/MquaityA1SM?t=35m45s)
@@ -1130,3 +1142,4 @@ autocmd VimEnter,WinEnter * exec ':set scrolljump='.winheight(0)/2
1130" display highlight group under the cursor 1142" display highlight group under the cursor
1131map <leader>h :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')<CR> 1143map <leader>h :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')<CR>
1132 1144
1145" call setqflist( map(systemlist("git show --name-only --pretty=''"), {_, p->{'filename': fnamemodify(p, ':.')}}))
..