From: Iain Patterson Date: Fri, 4 Oct 2013 12:16:43 +0000 (+0100) Subject: Fixes for console mode vim on Windows. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=2b2cc57a1351e773ec48b7d4cb154b7041d0bd58;p=profile.git Fixes for console mode vim on Windows. Console vim running on windows supports UTF-8. The vim which ships with GNU On Windows doesn't have the necessary support files for syntax highlighting to work. Wrap "syn enable" in a try..catch block so parsing .vimrc doesn't fail when run by GOW vim. --- diff --git a/.vimrc b/.vimrc index 18e34fa..a76c6a0 100644 --- a/.vimrc +++ b/.vimrc @@ -796,7 +796,7 @@ endif "}}}1 if version >= "600" "{{{1 version 6.0 -if has("gui_win32") +if has("win32") || has("win64") se encoding=utf-8 endif @@ -810,7 +810,14 @@ filetype indent on " Less intrusive syntax highlighting. if has("syntax") - syn enable + " The :syntax enable command tries to source the syntax.vim runtime script. + " Parsing this .vimrc will fail if for some reason the runtime doesn't + " exist, as could be the case if the binary was installed with no support + " files. GNU On Windows is one example of an incomplete installation. + try + syn enable + catch + endtry endif " Set colours.