diff options
author | Max Christian Pohle | 2018-04-24 19:58:22 +0200 |
---|---|---|
committer | Max Christian Pohle | 2018-04-24 19:58:22 +0200 |
commit | a8d7afffdfc4b2c853b14aff1652b4abe4353f86 (patch) | |
tree | 7931cd6c868371791f4d25621fc8bddb0e5582df | |
parent | fffdbfc807b450007ca74248aa60a269ab9d4e5d (diff) | |
download | vim-a8d7afffdfc4b2c853b14aff1652b4abe4353f86.tar.bz2 vim-a8d7afffdfc4b2c853b14aff1652b4abe4353f86.zip |
BufToArg changed, cwd shown per win, improved deoplete integration
-rw-r--r-- | vimrc-full | 29 |
1 files changed, 21 insertions, 8 deletions
@@ -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 | ||
959 | command BufToArg :exec ':args '.join(map(range(0, bufnr('$')), 'fnameescape(fnamemodify(bufname(v:val), ":."))')) | 967 | command BuffersToArg :exec ':args '.join(map(range(0, bufnr('$')), 'fnameescape(fnamemodify(bufname(v:val), ":."))')) |
968 | command BufToArg :argadd %:. | ||
960 | 969 | ||
961 | "======================================================================================================================= | 970 | "======================================================================================================================= |
962 | call plug#end() | " all plugins are getting loaded on this line, don't remove! | 971 | call plug#end() | " all plugins are getting loaded on this line, don't remove! |
@@ -1105,12 +1114,15 @@ command Vimls | |||
1105 | \ ")) | 1114 | \ ")) |
1106 | 1115 | ||
1107 | command Ctoggle | 1116 | command 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 |
1109 | command Ltoggle | 1118 | command 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 | ||
1112 | nnoremap <silent> <F7> :Ltoggle<CR> | 1121 | |
1113 | nnoremap <silent> <F8> :Ctoggle<CR> | 1122 | |
1123 | nnoremap <silent> <ESC> :lclose<CR> | ||
1124 | nnoremap <silent> <F7> :Ltoggle<CR> | ||
1125 | nnoremap <silent> <F8> :Ctoggle<CR> | ||
1114 | nnoremap <silent> <F12> :Vimls<CR>:Ltoggle<CR> | 1126 | nnoremap <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 |
1131 | map <leader>h :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')<CR> | 1143 | map <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, ':.')}})) | ||