diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index f783438fc9a68c..50af87097522a5 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -30,7 +30,7 @@ files matching *.c. You can also use autocommands to implement advanced features, such as editing compressed files (see |gzip-example|). The usual place to put autocommands is in your vimrc file. - *E203* *E204* *E143* *E855* + *E203* *E204* *E143* *E855* *E937* WARNING: Using autocommands is very powerful, and may lead to unexpected side effects. Be careful not to destroy your text. - It's a good idea to do some testing on an expendable copy of a file first. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 931e1821cd2080..7573165c60c00a 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -7061,7 +7061,7 @@ strcharpart({src}, {start}[, {len}]) *strcharpart()* Like |strpart()| but using character index and length instead of byte index and length. When a character index is used where a character does not - exist it is assumed to be one byte. For example: > + exist it is assumed to be one character. For example: > strcharpart('abc', -1, 2) < results in 'a'. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 0492ba891d7dd6..668462648790c4 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -4085,7 +4085,7 @@ A jump table for the options with a short description can be found at |Q_op|. local to buffer When off the buffer contents cannot be changed. The 'fileformat' and 'fileencoding' options also can't be changed. - Can be reset with the |-M| command line argument. + Can be reset on startup with the |-M| command line argument. *'modified'* *'mod'* *'nomodified'* *'nomod'* 'modified' 'mod' boolean (default off) @@ -4656,6 +4656,7 @@ A jump table for the options with a short description can be found at |Q_op|. buffer, unless the 'Z' flag is in 'cpoptions'. When using the ":view" command the 'readonly' option is set for the newly edited buffer. + See 'modifiable' for disallowing changes to the buffer. *'redrawtime'* *'rdt'* 'redrawtime' 'rdt' number (default 2000) diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index edb0770313a12c..5822510a8a6d18 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -181,6 +181,7 @@ argument. the executable "view" has the same effect as the -R argument. The 'updatecount' option will be set to 10000, meaning that the swap file will not be updated automatically very often. + See |-M| for disallowing modifications. *-m* -m Modifications not allowed to be written. The 'write' option @@ -734,7 +735,7 @@ There are several ways to exit Vim: - Use `:cquit`. Also when there are changes. When using `:cquit` or when there was an error message Vim exits with exit -code 1. Errors can be avoided by using `:silent!`. +code 1. Errors can be avoided by using `:silent!` or with `:catch`. ============================================================================== 6. Saving settings *save-settings* diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 039e7b3d05a9b8..7d0f9cf7797563 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -672,8 +672,14 @@ au BufNewFile,BufRead *.dtd setf dtd " DTS/DSTI (device tree files) au BufNewFile,BufRead *.dts,*.dtsi setf dts -" EDIF (*.edf,*.edif,*.edn,*.edo) -au BufNewFile,BufRead *.ed\(f\|if\|n\|o\) setf edif +" EDIF (*.edf,*.edif,*.edn,*.edo) or edn +au BufNewFile,BufRead *.ed\(f\|if\|o\) setf edif +au BufNewFile,BufRead *.edn + \ if getline(1) =~ '^\s*(\s*edif\>' | + \ setf edif | + \ else | + \ setf clojure | + \ endif " EditorConfig (close enough to dosini) au BufNewFile,BufRead .editorconfig setf dosini diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim index 3dc3f5c2d6de7c..23db7b10e899bb 100644 --- a/runtime/syntax/css.vim +++ b/runtime/syntax/css.vim @@ -6,7 +6,8 @@ " Nikolai Weibull (Add CSS2 support) " Maintainer: Jules Wang " URL: https://github.com/JulesWang/css.vim -" Last Change: 2015 Apr.17 +" Last Change: 2017 Jan 14 +" cssClassName updated by Ryuichi Hayashida Jan 2016 " quit when a syntax file was already loaded if !exists("main_syntax") @@ -56,7 +57,7 @@ syn match cssSelectorOp2 "[~|^$*]\?=" contained syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ " .class and #id -syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+" contains=cssClassNameDot +syn match cssClassName "\.-\=[A-Za-z_][A-Za-z0-9_-]*" contains=cssClassNameDot syn match cssClassNameDot contained '\.' try diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim index a10e4ad342f5c1..eb02aaf4af50e6 100644 --- a/runtime/syntax/debchangelog.vim +++ b/runtime/syntax/debchangelog.vim @@ -3,7 +3,7 @@ " Maintainer: Debian Vim Maintainers " Former Maintainers: Gerfried Fuchs " Wichert Akkerman -" Last Change: 2016 Aug 30 +" Last Change: 2016 Nov 12 " URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debchangelog.vim " Standard syntax initialization @@ -21,7 +21,7 @@ let binNMU='binary-only=yes' syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ " exe 'syn match debchangelogFirstKV contained "; \('.urgency.'\|'.binNMU.'\)"' exe 'syn match debchangelogOtherKV contained ", \('.urgency.'\|'.binNMU.'\)"' -syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|wheezy-%(backports%(-sloppy)=|security)|jessie%(-backports|-security)=|stretch|%(devel|precise|trusty|vivid|wily|xenial|yakkety)%(-%(security|proposed|updates|backports|commercial|partner))=)+" +syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|wheezy-%(backports%(-sloppy)=|security)|jessie%(-backports|-security)=|stretch|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty)%(-%(security|proposed|updates|backports|commercial|partner))=)+" syn match debchangelogVersion contained "(.\{-})" syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*" syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*" diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim index b52c496c957b68..b1bc9f8bfe2d2a 100644 --- a/runtime/syntax/debcontrol.vim +++ b/runtime/syntax/debcontrol.vim @@ -38,7 +38,7 @@ unlet s:kernels s:archs s:pairs syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)" syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+" syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)" -syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)" +syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java|javascript|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|rust|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)" syn match debcontrolPackageType contained "u\?deb" syn match debcontrolVariable contained "\${.\{-}}" syn match debcontrolDmUpload contained "\cyes" diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim index 27779449715fda..390c43035ec22c 100644 --- a/runtime/syntax/debsources.vim +++ b/runtime/syntax/debsources.vim @@ -2,7 +2,7 @@ " Language: Debian sources.list " Maintainer: Debian Vim Maintainers " Former Maintainer: Matthijs Mohlmann -" Last Change: 2016 Sep 27 +" Last Change: 2016 Nov 12 " URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim " Standard syntax initialization @@ -25,7 +25,7 @@ let s:supported = [ \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', \ 'squeeze', 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy', \ - \ 'precise', 'trusty', 'xenial', 'yakkety', 'devel' + \ 'precise', 'trusty', 'xenial', 'yakkety', 'zesty', 'devel' \ ] let s:unsupported = [ \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',