aboutsummaryrefslogtreecommitdiff
path: root/runtime/macros/less.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-04 19:18:16 -0400
committerGitHub <noreply@github.com>2021-05-04 19:18:16 -0400
commit4ad30f775e5564c539324b4818886f067d2ecd99 (patch)
tree97a554379bda7e5fc77e58c690db3f5a72db8c74 /runtime/macros/less.vim
parent63d8a8f4e8b02e524d85aed08aa16c5d9815598c (diff)
parentd5b063aec1db95704b37a77fdbd968cb6b48cc3b (diff)
downloadrneovim-4ad30f775e5564c539324b4818886f067d2ecd99.tar.gz
rneovim-4ad30f775e5564c539324b4818886f067d2ecd99.tar.bz2
rneovim-4ad30f775e5564c539324b4818886f067d2ecd99.zip
Merge pull request #14424 from janlazo/vim-8.1.1726
vim-patch:8.1.1726,8.2.{296,860,1827,2388,2788,2790,2801}
Diffstat (limited to 'runtime/macros/less.vim')
-rw-r--r--runtime/macros/less.vim18
1 files changed, 13 insertions, 5 deletions
diff --git a/runtime/macros/less.vim b/runtime/macros/less.vim
index aad122d70a..a4f96f340e 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: 2017 Mar 31
+" 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
@@ -66,8 +74,8 @@ endif
" When reading from stdin don't consider the file modified.
au VimEnter * set nomod
-" Can't modify the text
-set noma
+" Can't modify the text or write the file.
+set nomodifiable readonly
" Give help
noremap h :call <SID>Help()<CR>