aboutsummaryrefslogtreecommitdiff
path: root/vimrc-full
diff options
context:
space:
mode:
Diffstat (limited to 'vimrc-full')
-rw-r--r--vimrc-full68
1 files changed, 58 insertions, 10 deletions
diff --git a/vimrc-full b/vimrc-full
index 1b9b1f5..2a9cf88 100644
--- a/vimrc-full
+++ b/vimrc-full
@@ -1,6 +1,10 @@
1" vim: iskeyword+=\:,\!,\<,\>,\-,\&
1set textwidth=120 | " better done with modeline 2set textwidth=120 | " better done with modeline
2set ts=4 sts=4 sw=4 expandtab | " better done with a modeline 3set ts=4 sts=4 sw=4 expandtab | " better done with a modeline
3 4
5" scripts from the default vim installation, which do not get loaded by default, but are useful.
6source $VIMRUNTIME/macros/editexisting.vim
7
4"======================================================================================================================= 8"=======================================================================================================================
5" SETTINGS: 9" SETTINGS:
6"======================================================================================================================= 10"=======================================================================================================================
@@ -396,7 +400,7 @@ function! ExtendColorTheme()
396 highlight! PmenuThumb cterm=inverse 400 highlight! PmenuThumb cterm=inverse
397 highlight! MoreMsg cterm=inverse 401 highlight! MoreMsg cterm=inverse
398 highlight! link Folded LineNr 402 highlight! link Folded LineNr
399 highlight! Cursor guibg=green ctermbg=yellow 403 highlight! Cursor guibg=#729fcf ctermbg=yellow
400 highlight! link VertSplit LineNr 404 highlight! link VertSplit LineNr
401 highlight! SpellBad ctermbg=none 405 highlight! SpellBad ctermbg=none
402 highlight! SpecialKey ctermfg=19 406 highlight! SpecialKey ctermfg=19
@@ -437,7 +441,7 @@ endif
437" SPELL_CHECKING: 441" SPELL_CHECKING:
438"======================================================================================================================= 442"=======================================================================================================================
439let g:spellfile_URL='http://ftp.vim.org/vim/runtime/spell' 443let g:spellfile_URL='http://ftp.vim.org/vim/runtime/spell'
440set spell | " enable spell checker 444set nospell | " disable spell checker by default
441set spelllang=en,de | " languages for the spell checker 445set spelllang=en,de | " languages for the spell checker
442set spellsuggest=10 | " how many words will z= suggest? 446set spellsuggest=10 | " how many words will z= suggest?
443set thesaurus+=/home/max/.vim/thesaurus/php.txt 447set thesaurus+=/home/max/.vim/thesaurus/php.txt
@@ -652,15 +656,13 @@ if has("autocmd")
652 augroup extra_whitespace " { 656 augroup extra_whitespace " {
653 highlight ExtraWhitespace ctermbg=red ctermfg=white guibg=red 657 highlight ExtraWhitespace ctermbg=red ctermfg=white guibg=red
654 " autocmd BufEnter * syn match ExtraWhitespace /\s\+$/ 658 " autocmd BufEnter * syn match ExtraWhitespace /\s\+$/
655 autocmd BufEnter * match ExtraWhitespace /\s\+$/ 659 " autocmd BufEnter * match ExtraWhitespace /\s\+$/
656 augroup END "} 660 augroup END "}
657 661
658 augroup CurrentFileName 662 augroup CurrentFileName
659 highlight CurrentFileName ctermbg=yellow guibg=yellow 663 highlight CurrentFileName ctermbg=yellow guibg=yellow
660 664
661 665
662 let @w = ":execute ':match ColorColumn /\\%>'.&textwidth.'v./' | :2match ExtraWhitespace /\\s\\+$/"
663 " let @w = ":execute ':match ColorColumn /\\%>'.&textwidth.'v./'"
664 " highlight the current files name inside the document... 666 " highlight the current files name inside the document...
665 let @g = ":exe ':match CurrentFileName /'.escape(expand('%:t'), '.').'/'" 667 let @g = ":exe ':match CurrentFileName /'.escape(expand('%:t'), '.').'/'"
666 " put the current files name after the cursor... 668 " put the current files name after the cursor...
@@ -669,12 +671,58 @@ if has("autocmd")
669 " grep all buffers for a given string and return result in a quickfix window 671 " grep all buffers for a given string and return result in a quickfix window
670 let @q = ":cex [] | bufdo vimgrepadd /foo/g % | cw" 672 let @q = ":cex [] | bufdo vimgrepadd /foo/g % | cw"
671 673
672 " change to the current working directory (p like pwd)
673 let @p = ":lcd %:p:h"
674
675 let @l = ":let g:signify_vcs_cmds={'git': 'git diff --no-color --no-ext-diff -U0 HEAD^ -- %f'}|:SignifyRefresh" 674 let @l = ":let g:signify_vcs_cmds={'git': 'git diff --no-color --no-ext-diff -U0 HEAD^ -- %f'}|:SignifyRefresh"
676 675
677 let @r = ":exe ':!nvr --servername /tmp/nvimsocket --remote % +'.line('.')|:stopinsert|:set readonly" 676
677 source $VIMRUNTIME/menu.vim
678 set wildmenu
679 set cpo-=<
680 set wcm=<C-Z>
681 map <F4> :emenu <C-Z>
682
683 if has('menu')
684
685
686 menu &Chdir.Git\ root
687 \ :Gcd<CR>:pwd<CR>
688
689 menu &Chdir.current\ buffer
690 \ :lcd %:p:h<CR>:pwd<CR>
691
692 menu &Git.&Display\ last\ changes
693 \ :let g:signify_vcs_cmds={'git': 'git diff --no-color --no-ext-diff -U0 HEAD^ -- %f'}<CR>:SignifyRefresh<CR>
694
695 menu &UI.&Open\ in\ Serversession
696 \ :execute ':!nvr --servername /tmp/nvimsocket --remote % +'.line('.')<CR>:stopinsert<CR>:set readonly<CR>
697
698 menu &Verify.&Textwidth\ and\ white\ space
699 \ :execute ':match ColorColumn /\%>'.&textwidth.'v./'<CR>
700 \ :2match ExtraWhitespace /\s\+$/<CR>
701
702 menu &Verify.Highlight\ current\ file\ name
703 \ :execute ':match ColorColumn /'.escape(expand('%:t'), '.').'/'<CR>
704
705
706 menu &CScope.add
707 \ :cscope add .<CR>
708
709 menu &Window.-Sep- :
710
711 menu &Window.Quickfix\ List
712 \ :copen<CR>
713
714 menu &Window.Location\ List
715 \ :lopen<CR>
716
717 menu &Window.Scratch
718 \ :Scratch<CR>
719
720 menu &Go.file\ under\ the\ cursor<Tab>:gf
721 \ gf
722
723 endif
724
725
678 726
679 727
680 " exec current line as a command, insert output of command (from: https://youtu.be/MquaityA1SM?t=35m45s) 728 " exec current line as a command, insert output of command (from: https://youtu.be/MquaityA1SM?t=35m45s)
@@ -749,7 +797,7 @@ let g:netrw_preview = 0 | "
749let g:netrw_winsize = 20 | " window size in percent 797let g:netrw_winsize = 20 | " window size in percent
750 798
751 799
752highlight WordBold ctermbg=LightYellow ctermfg=black cterm=bold gui=bold 800highlight WordBold ctermbg=LightYellow ctermfg=black cterm=bold gui=bold guibg=LightYellow guifg=black
753let w:m1 = 0 801let w:m1 = 0
754function! HighlightWordUnderCursor() 802function! HighlightWordUnderCursor()
755 if(exists('w:m1') && w:m1 > 0) 803 if(exists('w:m1') && w:m1 > 0)
..