From 85752ff8c965dd916dfc4588d15cf9c7ba37e292 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Tue, 29 Apr 2014 15:35:20 +0200 Subject: [PATCH] vimrc: fix syntax when reloading vimrc --- vimrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vimrc b/vimrc index 26c4f5f..4860c7f 100644 --- a/vimrc +++ b/vimrc @@ -763,7 +763,11 @@ inoreabbrev completly completely " Activate syntax coloring. if has('syntax') - syntax enable + " But only if it wasn't already active. Prevents breaking the syntax + " coloring when reloading the vimrc. Thanks to johnLate for the idea. + if !exists('g:syntax_on') + syntax enable + endif " Don't highlight more than 500 columns as I normally don't have that long " lines and they slow down syntax coloring. Thanks to Derek Wyatt -- 2.45.2