diff --git a/vimrc b/vimrc index 7d233ae..a317d49 100644 --- a/vimrc +++ b/vimrc @@ -152,9 +152,10 @@ function MyTabLabel(n) let pathparts = split(name, '/') if len(pathparts) == 1 return name + elseif len(pathparts[len(pathparts) - 2]) == 1 + return pathparts[len(pathparts) - 2][0] . '/' . pathparts[len(pathparts) - 1] else - return pathparts[len(pathparts) - 2] . '/' . pathparts[len(pathparts) - 1] - "return pathparts[len(pathparts) - 1] + return pathparts[len(pathparts) - 2][0:1] . '/' . pathparts[len(pathparts) - 1] endif endif endfunction @@ -351,6 +352,14 @@ set t_8b=[48:2::%lu:%lu:%lum command -nargs=* C !g++ %:p command -nargs=* CR rightb 15split +term\ g++\ \ %:p\ &&\ ./a.out command R rightb 15split +term\ ./a.out +command! -nargs=+ -complete=custom,s:GrepArgs G exe 'CocList --normal grep '. + +function! s:GrepArgs(...) + let list = ['-S', '-smartcase', '-i', '-ignorecase', '-w', '-word', + \ '-e', '-regex', '-u', '-skip-vcs-ignores', '-t', '-extension'] + return join(list, "\n") +endfunction + function MyCDB(file) tabe '+term g++ -g '. file .' && gdbtui ./a.out'