aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/man.vim2
-rw-r--r--runtime/doc/diff.txt3
-rw-r--r--runtime/doc/vim_diff.txt5
-rw-r--r--runtime/filetype.vim15
-rw-r--r--runtime/syntax/gitconfig.vim12
5 files changed, 22 insertions, 15 deletions
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim
index dab88fde23..5008b8cfaf 100644
--- a/runtime/autoload/man.vim
+++ b/runtime/autoload/man.vim
@@ -13,8 +13,6 @@ function! man#init() abort
try
" Check for -l support.
call s:get_page(s:get_path('', 'man'))
- catch /E145:/
- " Ignore the error in restricted mode
catch /command error .*/
let s:localfile_arg = v:false
endtry
diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt
index 20eaa47b26..2a972483ff 100644
--- a/runtime/doc/diff.txt
+++ b/runtime/doc/diff.txt
@@ -20,8 +20,7 @@ additionally sets up for viewing the differences between the arguments. >
nvim -d file1 file2 [file3 [file4]]
-In addition to the |-d| argument, |-R| may be used for readonly mode
-respectively.
+In addition to the |-d| argument, |-R| may be used for readonly mode.
The second and following arguments may also be a directory name. Vim will
then append the file name of the first argument to the directory name to find
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index ac24f22bc6..0f15aefd17 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -416,8 +416,8 @@ Aliases:
gvimdiff (GUI)
rgview (GUI)
rgvim (GUI)
- rview (alias for "nvim -RZ")
- rvim (alias for "nvim -Z")
+ rview
+ rvim
view (alias for "nvim -R")
vimdiff (alias for "nvim -d" |diff-mode|)
@@ -496,6 +496,7 @@ Startup:
--literal (file args are always literal; to expand wildcards on Windows, use
|:n| e.g. `nvim +"n *"`)
Easy mode: eview, evim, nvim -y
+ Restricted mode: rview, rvim, nvim -Z
Vi mode: nvim -v
Test functions:
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 4e617052a9..4e54bcaefd 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -692,12 +692,21 @@ au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc
au BufNewFile,BufRead *.haml setf haml
" Hamster Classic | Playground files
-au BufNewFile,BufRead *.hsc,*.hsm setf hamster
+au BufNewFile,BufRead *.hsm setf hamster
+au BufNewFile,BufRead *.hsc
+ \ if match(join(getline(1,10), "\n"), '\%(^\|\n\)\s*\%({-#\_s*LANGUAGE\>\|\<module\>\)') != -1 |
+ \ setf haskell |
+ \ else |
+ \ setf hamster |
+ \ endif
" Haskell
au BufNewFile,BufRead *.hs,*.hs-boot setf haskell
au BufNewFile,BufRead *.lhs setf lhaskell
au BufNewFile,BufRead *.chs setf chaskell
+au BufNewFile,BufRead cabal.project setf cabalproject
+au BufNewFile,BufRead $HOME/.cabal/config setf cabalconfig
+au BufNewFile,BufRead cabal.config setf cabalconfig
" Haste
au BufNewFile,BufRead *.ht setf haste
@@ -2042,12 +2051,14 @@ au BufNewFile,BufRead bzr_log.* setf bzr
" Bazel build file
if !has("fname_case")
- au BufNewFile,BufRead *.BUILD,BUILD setf bzl
+ au BufNewFile,BufRead *.BUILD,BUILD setf bzl
endif
" BIND zone
au BufNewFile,BufRead */named/db.*,*/bind/db.* call s:StarSetf('bindzone')
+au BufNewFile,BufRead cabal.project.* call s:StarSetf('cabalproject')
+
" Calendar
au BufNewFile,BufRead */.calendar/*,
\*/share/calendar/*/calendar.*,*/share/calendar/calendar.*
diff --git a/runtime/syntax/gitconfig.vim b/runtime/syntax/gitconfig.vim
index c6c56f77b6..e5eaf10f94 100644
--- a/runtime/syntax/gitconfig.vim
+++ b/runtime/syntax/gitconfig.vim
@@ -2,24 +2,22 @@
" Language: git config file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: gitconfig, .gitconfig, *.git/config
-" Last Change: 2010 May 21
+" Last Change: 2019 Dec 05
if exists("b:current_syntax")
finish
endif
-setlocal iskeyword+=-
-setlocal iskeyword-=_
syn case ignore
syn sync minlines=10
-syn match gitconfigComment "[#;].*"
+syn match gitconfigComment "[#;].*" contains=@Spell
syn match gitconfigSection "\%(^\s*\)\@<=\[[a-z0-9.-]\+\]"
syn match gitconfigSection '\%(^\s*\)\@<=\[[a-z0-9.-]\+ \+\"\%([^\\"]\|\\.\)*"\]'
-syn match gitconfigVariable "\%(^\s*\)\@<=\a\k*\%(\s*\%([=#;]\|$\)\)\@=" nextgroup=gitconfigAssignment skipwhite
+syn match gitconfigVariable "\%(^\s*\)\@<=\a[a-z0-9-]*\%(\s*\%([=#;]\|$\)\)\@=" nextgroup=gitconfigAssignment skipwhite
syn region gitconfigAssignment matchgroup=gitconfigNone start=+=\s*+ skip=+\\+ end=+\s*$+ contained contains=gitconfigBoolean,gitconfigNumber,gitConfigString,gitConfigEscape,gitConfigError,gitconfigComment keepend
syn keyword gitconfigBoolean true false yes no contained
-syn match gitconfigNumber "\d\+" contained
+syn match gitconfigNumber "\<\d\+\>" contained
syn region gitconfigString matchgroup=gitconfigDelim start=+"+ skip=+\\+ end=+"+ matchgroup=gitconfigError end=+[^\\"]\%#\@!$+ contained contains=gitconfigEscape,gitconfigEscapeError
syn match gitconfigError +\\.+ contained
syn match gitconfigEscape +\\[\\"ntb]+ contained
@@ -32,7 +30,7 @@ hi def link gitconfigBoolean Boolean
hi def link gitconfigNumber Number
hi def link gitconfigString String
hi def link gitconfigDelim Delimiter
-hi def link gitconfigEscape Delimiter
+hi def link gitconfigEscape Special
hi def link gitconfigError Error
let b:current_syntax = "gitconfig"