X-Git-Url: https://git.grml.org/?p=grml-etc-core.git;a=blobdiff_plain;f=etc%2Fvim%2Fvimrc;h=0a658c1c5b2fc5b3147059c68df327dcaffba9fa;hp=4d7b86b70ac8c082f29d0844ca0ec3254acbd551;hb=94d6068324284c8c75bc6774ab73bfa29cb94374;hpb=91376e3f72889f1c0827af339e7981b9a89d9aed diff --git a/etc/vim/vimrc b/etc/vim/vimrc index 4d7b86b..0a658c1 100644 --- a/etc/vim/vimrc +++ b/etc/vim/vimrc @@ -27,7 +27,11 @@ runtime! debian.vim " | Do *not* source $VIMRUNTIME/defaults.vim (in case no user vimrc is found), " | since that prevents overwriting values we want to set in this file, " | instead we set settings similar to what can be found in default.vim below -let g:skip_defaults_vim=1 +" | +" | Only do this part when Vim was compiled with the +eval feature. +if 1 + let g:skip_defaults_vim=1 +endif " Use Vim settings, rather than Vi settings (much better!). " This must be first, because it changes other options as a side effect. @@ -54,7 +58,10 @@ set ttimeout " time out for key codes set ttimeoutlen=100 " wait up to 100ms after Esc for special key " Show @@@ in the last line if it is truncated. -set display=truncate +" | This features is only available in later versions +if has("patch-7.4.2115") + set display=truncate +endif " Show a few lines of context around the cursor. Note that this makes the " text scroll if you mouse-click near the start or end of the window. @@ -194,7 +201,11 @@ endif " list of strings used for list mode " set list listchars=eol:$ - set listchars=eol:$,precedes:«,extends:»,tab:»·,trail:· + if (&encoding =~ 'utf-8') + set listchars=eol:$,precedes:«,extends:»,tab:»·,trail:· + else + set listchars=eol:$ + endif " list of file names to search for tags " set tags=./tags,tags