From a8d7afffdfc4b2c853b14aff1652b4abe4353f86 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Tue, 24 Apr 2018 19:58:22 +0200 Subject: BufToArg changed, cwd shown per win, improved deoplete integration --- vimrc-full | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'vimrc-full') 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 = { \ 'separator': { 'left': "\uE0B4", 'right': "\uE0B6" }, \ 'subseparator': { 'left': "\uE0b1", 'right': "\uE0b3" }, \ 'inactive': { - \ 'left': [ ['absolutepath'] ], + \ 'left': [ [ 'pwd', 'relativepath'] ], \ 'right': [] \ }, \ 'active': { - \ 'left': [ [ 'mode', 'register', 'paste' ], [ 'absolutepath', 'title' ] , ['tagbar']], + \ 'left': [ [ 'mode', 'register', 'paste' ], [ 'pwd', 'relativepath', 'title' ] , ['tagbar']], \ 'right': [ [ 'lineinfo', 'percent' ], [ 'filetype', 'readonly', 'spell', 'fileencoding', 'fileformat' ] ] \ }, \ 'component': { @@ -798,7 +798,9 @@ let g:lightline = { \ 'tabnumber': " %{tabpagenr()}/%{tabpagenr('$')}", \ 'readonly': '%{&readonly ? "" : ""}', \ 'register': '%{v:register}', - \ 'title': '%{getwinvar(0, "quickfix_title")}' + \ 'title': '%{getwinvar(0, "quickfix_title")}', + \ 'pwd': '%{getcwd()}', + \ 'relativepath': '%{fnamemodify(expand("%"), ":.")}' \ }, \ 'component_expand': { \ 'buffercurrent': 'lightline#buffer#buffercurrent2', @@ -844,7 +846,6 @@ if has("python") if has('nvim') Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } - " Plug 'tweekmonster/deoplete-clang2' " Use deoplete. let g:deoplete#enable_at_startup = 1 inoremap deoplete#mappings#manual_complete() @@ -853,8 +854,15 @@ if has("python") let g:echodoc#enable_at_startup = 1 " Plug 'Rip-Rip/clang_complete' + " Plug 'tweekmonster/deoplete-clang2' Plug 'zchee/deoplete-clang' + let g:deoplete#sources#clang#libclang_path = "/usr/lib/libclang.so" + let g:deoplete#sources#clang#clang_header = "/usr/lib/clang/6.0.0/" + " let g:deoplete#sources#clang#clang_complete_database = "/home/max/src" Plug 'Shougo/neoinclude.vim' + + + " Plug 'roxma/nvim-completion-manager' unmaintained python version else Plug 'idanarye/vim-vebugger' @@ -956,7 +964,8 @@ autocmd FileType c,cpp,objc map = :pyf /usr/share/clang/clang-format.py " found this command instead (use as PAGER): " man -P 'nvim -R -u NORC -c":%!col -b" -c":set buftype=nowrite filetype=man" -' ls -command BufToArg :exec ':args '.join(map(range(0, bufnr('$')), 'fnameescape(fnamemodify(bufname(v:val), ":."))')) +command BuffersToArg :exec ':args '.join(map(range(0, bufnr('$')), 'fnameescape(fnamemodify(bufname(v:val), ":."))')) +command BufToArg :argadd %:. "======================================================================================================================= call plug#end() | " all plugins are getting loaded on this line, don't remove! @@ -1105,12 +1114,15 @@ command Vimls \ ")) command Ctoggle - \ if(get(getqflist({'winid':1}), 'winid') == win_getid())|cclose|else|copen|endif + \ if(get(getqflist({'winid':1}), 'winid') == win_getid())|cclose|else|botright copen|endif command Ltoggle \ if(get(getloclist(0, {'winid':1}), 'winid') == win_getid())|lclose|else|lopen|endif -nnoremap :Ltoggle -nnoremap :Ctoggle + + +nnoremap :lclose +nnoremap :Ltoggle +nnoremap :Ctoggle nnoremap :Vimls:Ltoggle " 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 " display highlight group under the cursor map h :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")') +" call setqflist( map(systemlist("git show --name-only --pretty=''"), {_, p->{'filename': fnamemodify(p, ':.')}})) -- cgit v1.2.3