summaryrefslogtreecommitdiffstats
path: root/runtime/macros
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-12-23 13:56:35 +0100
committerBram Moolenaar <Bram@vim.org>2020-12-23 13:56:35 +0100
commit4072ba571babd733d1800c082416fe8fe3c28ed7 (patch)
tree398563288ba4d793e4f2e6d819f292ff4bba2754 /runtime/macros
parent9f63a65f22b6a899925ba15adbb711e86251114e (diff)
Update runtime files.
Diffstat (limited to 'runtime/macros')
-rw-r--r--runtime/macros/less.vim14
1 files changed, 11 insertions, 3 deletions
diff --git a/runtime/macros/less.vim b/runtime/macros/less.vim
index 5ba685cbc3..17433f4ab8 100644
--- a/runtime/macros/less.vim
+++ b/runtime/macros/less.vim
@@ -1,6 +1,6 @@
" Vim script to work like "less"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2020 May 18
+" Last Change: 2020 Dec 17
" Avoid loading this file twice, allow the user to define his own script.
if exists("loaded_less")
@@ -35,8 +35,16 @@ if argc() > 0
endwhile
endif
-set nocp
-syntax on
+" we don't want 'compatible' here
+if &cp
+ set nocp
+endif
+
+" enable syntax highlighting if not done already
+if !get(g:, 'syntax_on', 0)
+ syntax enable
+endif
+
set so=0
set hlsearch
set incsearch