From c2808a2053fa4d382a1ad7edc9637951c9eefc55 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Thu, 4 Oct 2018 21:35:05 +0200 Subject: Minor refactoring - beautification of the vertical bar - removed Vim Minimap plugin - GIT shows recently changed files in the quickfix list instead of the location list --- after/syntax/c.vim | 10 +++++++--- after/syntax/cpp.vim | 1 + ftplugin/coffee.vim | 1 + gtk-3.0.css | 2 +- vimrc-full | 11 +++++------ 5 files changed, 15 insertions(+), 10 deletions(-) create mode 120000 after/syntax/cpp.vim create mode 100644 ftplugin/coffee.vim diff --git a/after/syntax/c.vim b/after/syntax/c.vim index f4b1de9..49e96f0 100644 --- a/after/syntax/c.vim +++ b/after/syntax/c.vim @@ -1,6 +1,10 @@ -set number -set foldenable -set foldmethod=syntax +setlocal number +setlocal foldenable +setlocal foldmethod=expr +setlocal foldcolumn=0 + +" setlocal foldexpr=get(synstack(v:lnum,1),0)==hlID('cComment') +setlocal foldexpr=index([0,hlID('cComment'),hlID('Comment')],get(synstack(v:lnum,1),0)) " syntax match cType "struct\s+[A-Za-z0-9_]+\>" " syn clear cStructure diff --git a/after/syntax/cpp.vim b/after/syntax/cpp.vim new file mode 120000 index 0000000..64e3fd4 --- /dev/null +++ b/after/syntax/cpp.vim @@ -0,0 +1 @@ +c.vim \ No newline at end of file diff --git a/ftplugin/coffee.vim b/ftplugin/coffee.vim new file mode 100644 index 0000000..5d5675c --- /dev/null +++ b/ftplugin/coffee.vim @@ -0,0 +1 @@ +let coffee_indent_keep_current = 1 " avoid problems with html indentation diff --git a/gtk-3.0.css b/gtk-3.0.css index 04e8fc0..f347a83 100644 --- a/gtk-3.0.css +++ b/gtk-3.0.css @@ -53,7 +53,7 @@ window#vim-main-window > box /* within window > box ... */ menubar#vim-menubar { - font-family: "Hasklug Nerd Font Mono", "Source Code Pro for Powerline", "Source Code Pro", "Roboto"; + font-family: "monospace", "Hasklug Nerd Font Mono", "Source Code Pro for Powerline", "Source Code Pro", "Roboto"; font-weight:bold; font-size:8pt; background: #fff; diff --git a/vimrc-full b/vimrc-full index c0ac443..cc7cce0 100644 --- a/vimrc-full +++ b/vimrc-full @@ -249,7 +249,7 @@ set foldopen=block,hor,search | " when do we unfold? " set foldtext=Foldtext() | " " set foldtext=v:folddashes.substitute(getline(v:foldstart),'\\v^/[/*]\','','g') " set foldtext='⊞\ '.substitute(getline(v:foldstart),'^[\ '.printf(&cms,'').']*','','').'↵'.getline(v:foldstart+1).'↵'.getline(v:foldstart+2) -set foldtext='⊞\ '.substitute(substitute(join(getline(v:foldstart,v:foldend)),'\\s\\s\\+\\\|\[\*\/\]','\ ','g'),'\^\\s\\+','','g') +set foldtext='⊞\ '.substitute(substitute(substitute(join(getline(v:foldstart,v:foldend)),'\\s\\s\\+\\\|\[\*\/\]','\ ','g'),'\^\\s\\+','','g'),\ '\\s\\s\\+',\ '\ ',\ 'g') " vim window behaviour set splitbelow | " open new windows below the current one (i find that more intuitive) @@ -517,8 +517,8 @@ if has("autocmd") menu &Git.&Display\ uncommited\ files\ in\ location\ list \ :call setloclist(0, map(systemlist("git diff --name-only --pretty=''"), {_, p->{'filename': fnamemodify(p, ':.')}})):lopen - menu &Git.&Display\ recently\ changed\ files\ in\ location\ list - \ :call setloclist(0, map(systemlist("git show --name-only --pretty=''"), {_, p->{'filename': fnamemodify(p, ':.')}})):lopen + menu &Git.&Display\ recently\ changed\ files\ in\ quickfix\ list + \ :call setqflist([], 'r', {'title': 'Recently changed in GIT', 'items':map(systemlist("git show --name-only --pretty=''"), {_, p->{'filename': fnamemodify(p, ':.')}}) }):copen menu &Git.&Display\ last\ changes \ :let g:signify_vcs_cmds={'git': 'git diff --no-color --no-ext-diff -U0 HEAD^ -- %f'}:SignifyRefresh menu &Git.&Display\ unmerged\ files\ in\ location\ list @@ -690,7 +690,6 @@ Plug 'NLKNguyen/papercolor-theme' | " the one I like the most Plug 'mhinz/vim-signify' | " uses the sign column to indicate added, modified and removed lines Plug 'tpope/vim-fugitive' | " the most complete GIT integration plugin Plug 'godlygeek/tabular' | " align code on a sign, like :Tab/= -Plug 'severin-lemaignan/vim-minimap' Plug 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with ' let g:signify_vcs_list = [ 'git' ] | " use signify only with git (improves speed when loading buffers, see :h signify) let g:signify_cursorhold_insert = 0 @@ -998,7 +997,7 @@ function! ExtendColorTheme() highlight! MoreMsg cterm=inverse highlight! link Folded LineNr " highlight! Cursor guibg=#729fcf ctermbg=yellow - highlight! link VertSplit LineNr + highlight! link VertSplit NonText " highlight! SpellBad ctermbg=none highlight! SpecialKey ctermfg=19 highlight! WhiteSpace ctermfg=19 @@ -1180,7 +1179,7 @@ augroup status \ ."%{(&readonly\ ?\ '\ \ \ '\ :\ '')}" \ ."%{(&modified\ ?\ '\ \ '.nr2char(0xF0C7).'\ '\ :\ '')\ }" \ ."%{(haslocaldir() ?\ ' '.fnamemodify(getcwd(),\ ':.').' '.nr2char(0xe0b1)\ \:\ '')}\ " - \ ."%{(&buftype\ ==\ \"terminal\"\ ?\ b:term_title\ :\ substitute(expand('%:p'),\ '^'.getcwd(-1).'/*',\ '',\ ''))\ }" + \ ."%{(&buftype\ ==\ \"terminal\"\ ?\ has('nvim')?b:term_title:expand(&titlestring)\ :\ substitute(expand('%:p'),\ '^'.getcwd(-1).'/*',\ '',\ ''))\ }" \ ."%1(%)" \ ."%#".l:invert_group."#" \ .g:status_sym_end -- cgit v1.2.3