mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
parent
4cab90ad8c
commit
ef1f1907cc
@ -1,8 +1,12 @@
|
|||||||
" Author: Antony Lee <anntzer.lee@gmail.com>
|
" Author: Antony Lee <anntzer.lee@gmail.com>
|
||||||
" Description: Helper functions for reStructuredText syntax folding
|
" Description: Helper functions for reStructuredText syntax folding
|
||||||
" Last Modified: 2018-01-07
|
" Last Modified: 2018-12-29
|
||||||
|
|
||||||
function s:CacheRstFold()
|
function s:CacheRstFold()
|
||||||
|
if !g:rst_fold_enabled
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
let closure = {'header_types': {}, 'max_level': 0, 'levels': {}}
|
let closure = {'header_types': {}, 'max_level': 0, 'levels': {}}
|
||||||
function closure.Process(match) dict
|
function closure.Process(match) dict
|
||||||
let curline = getcurpos()[1]
|
let curline = getcurpos()[1]
|
||||||
@ -20,12 +24,18 @@ function s:CacheRstFold()
|
|||||||
let self.levels[curline] = self.header_types[key]
|
let self.levels[curline] = self.header_types[key]
|
||||||
endfunction
|
endfunction
|
||||||
let save_cursor = getcurpos()
|
let save_cursor = getcurpos()
|
||||||
|
let save_mark = getpos("'[")
|
||||||
silent keeppatterns %s/\v^%(%(([=`:.'"~^_*+#-])\1+\n)?.{1,2}\n([=`:.'"~^_*+#-])\2+)|%(%(([=`:.''"~^_*+#-])\3{2,}\n)?.{3,}\n([=`:.''"~^_*+#-])\4{2,})$/\=closure.Process(submatch(0))/gn
|
silent keeppatterns %s/\v^%(%(([=`:.'"~^_*+#-])\1+\n)?.{1,2}\n([=`:.'"~^_*+#-])\2+)|%(%(([=`:.''"~^_*+#-])\3{2,}\n)?.{3,}\n([=`:.''"~^_*+#-])\4{2,})$/\=closure.Process(submatch(0))/gn
|
||||||
call setpos('.', save_cursor)
|
call setpos('.', save_cursor)
|
||||||
|
call setpos("'[", save_mark)
|
||||||
let b:RstFoldCache = closure.levels
|
let b:RstFoldCache = closure.levels
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function RstFold#GetRstFold()
|
function RstFold#GetRstFold()
|
||||||
|
if !g:rst_fold_enabled
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
if !has_key(b:, 'RstFoldCache')
|
if !has_key(b:, 'RstFoldCache')
|
||||||
call s:CacheRstFold()
|
call s:CacheRstFold()
|
||||||
endif
|
endif
|
||||||
@ -37,6 +47,10 @@ function RstFold#GetRstFold()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function RstFold#GetRstFoldText()
|
function RstFold#GetRstFoldText()
|
||||||
|
if !g:rst_fold_enabled
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
if !has_key(b:, 'RstFoldCache')
|
if !has_key(b:, 'RstFoldCache')
|
||||||
call s:CacheRstFold()
|
call s:CacheRstFold()
|
||||||
endif
|
endif
|
||||||
|
@ -776,13 +776,14 @@ FilterReadPre Before reading a file from a filter command.
|
|||||||
Not triggered when 'shelltemp' is off.
|
Not triggered when 'shelltemp' is off.
|
||||||
*FilterWritePost*
|
*FilterWritePost*
|
||||||
FilterWritePost After writing a file for a filter command or
|
FilterWritePost After writing a file for a filter command or
|
||||||
making a diff.
|
making a diff with an external diff (see
|
||||||
|
DiffUpdated for internal diff).
|
||||||
Vim checks the pattern against the name of
|
Vim checks the pattern against the name of
|
||||||
the current buffer as with FilterWritePre.
|
the current buffer as with FilterWritePre.
|
||||||
Not triggered when 'shelltemp' is off.
|
Not triggered when 'shelltemp' is off.
|
||||||
*FilterWritePre*
|
*FilterWritePre*
|
||||||
FilterWritePre Before writing a file for a filter command or
|
FilterWritePre Before writing a file for a filter command or
|
||||||
making a diff.
|
making a diff with an external diff.
|
||||||
Vim checks the pattern against the name of
|
Vim checks the pattern against the name of
|
||||||
the current buffer, not the name of the
|
the current buffer, not the name of the
|
||||||
temporary file that is the output of the
|
temporary file that is the output of the
|
||||||
|
@ -9,7 +9,7 @@ Close this window: Use ":q<Enter>".
|
|||||||
|
|
||||||
Jump to a subject: Position the cursor on a tag (e.g. |bars|) and hit CTRL-].
|
Jump to a subject: Position the cursor on a tag (e.g. |bars|) and hit CTRL-].
|
||||||
With the mouse: Double-click the left mouse button on a tag, e.g. |bars|.
|
With the mouse: Double-click the left mouse button on a tag, e.g. |bars|.
|
||||||
Jump back: Type CTRL-T or CTRL-O. Repeat to go further back.
|
Jump back: Type CTRL-O. Repeat to go further back.
|
||||||
|
|
||||||
Get specific help: It is possible to go directly to whatever you want help
|
Get specific help: It is possible to go directly to whatever you want help
|
||||||
on, by giving an argument to the |:help| command.
|
on, by giving an argument to the |:help| command.
|
||||||
@ -30,13 +30,17 @@ Get specific help: It is possible to go directly to whatever you want help
|
|||||||
help entries for "word".
|
help entries for "word".
|
||||||
Or use ":helpgrep word". |:helpgrep|
|
Or use ":helpgrep word". |:helpgrep|
|
||||||
|
|
||||||
|
Getting started: Do the Vim tutor, a 20 minute interactive training for the
|
||||||
|
basic commands, see |vimtutor|.
|
||||||
|
Read the user manual from start to end: |usr_01.txt|
|
||||||
|
|
||||||
Vim stands for Vi IMproved. Most of Vim was made by Bram Moolenaar, but only
|
Vim stands for Vi IMproved. Most of Vim was made by Bram Moolenaar, but only
|
||||||
through the help of many others. See |credits|.
|
through the help of many others. See |credits|.
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*doc-file-list* *Q_ct*
|
*doc-file-list* *Q_ct*
|
||||||
BASIC:
|
BASIC:
|
||||||
|quickref| Overview of the most common commands you will use
|
|quickref| Overview of the most common commands you will use
|
||||||
|tutor| 30 minutes training course for beginners
|
|tutor| 20 minutes training course for beginners
|
||||||
|copying| About copyrights
|
|copying| About copyrights
|
||||||
|iccf| Helping poor children in Uganda
|
|iccf| Helping poor children in Uganda
|
||||||
|sponsor| Sponsor Vim development, become a registered Vim user
|
|sponsor| Sponsor Vim development, become a registered Vim user
|
||||||
|
@ -534,14 +534,6 @@ This message is only given when Vim detects a problem when searching for a
|
|||||||
tag. Sometimes this message is not given, even though the tags file is not
|
tag. Sometimes this message is not given, even though the tags file is not
|
||||||
properly sorted.
|
properly sorted.
|
||||||
|
|
||||||
*E460* >
|
|
||||||
The resource fork would be lost (add ! to override)
|
|
||||||
|
|
||||||
On the Macintosh (classic), when writing a file, Vim attempts to preserve all
|
|
||||||
info about a file, including its resource fork. If this is not possible you
|
|
||||||
get this error message. Append "!" to the command name to write anyway (and
|
|
||||||
lose the info).
|
|
||||||
|
|
||||||
*E424* >
|
*E424* >
|
||||||
Too many different highlighting attributes in use
|
Too many different highlighting attributes in use
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
*pi_matchit.txt* Extended "%" matching
|
*pi_matchit.txt* Extended "%" matching
|
||||||
|
|
||||||
For Vim version 6.3. Last change: 2017 May 14
|
For Vim version 6.3. Last change: 2018 Dec 31
|
||||||
|
|
||||||
*matchit* *matchit.vim*
|
*matchit* *matchit.vim*
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ See |sign_define()| for the equivalent Vim script function.
|
|||||||
:sign define {name} {argument}...
|
:sign define {name} {argument}...
|
||||||
Define a new sign or set attributes for an existing sign.
|
Define a new sign or set attributes for an existing sign.
|
||||||
The {name} can either be a number (all digits) or a name
|
The {name} can either be a number (all digits) or a name
|
||||||
starting with a non-digit. Leading digits are ignored, thus
|
starting with a non-digit. Leading zeros are ignored, thus
|
||||||
"0012", "012" and "12" are considered the same name.
|
"0012", "012" and "12" are considered the same name.
|
||||||
About 120 different signs can be defined.
|
About 120 different signs can be defined.
|
||||||
|
|
||||||
|
@ -2670,9 +2670,29 @@ later, and part earlier) adds.
|
|||||||
|
|
||||||
RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax*
|
RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax*
|
||||||
|
|
||||||
You may set what syntax definitions should be used for code blocks via >
|
Syntax highlighting is enabled for code blocks within the document for a
|
||||||
|
select number of file types. See $VIMRUNTIME/syntax/rst.vim for the default
|
||||||
|
syntax list.
|
||||||
|
|
||||||
|
To set a user-defined list of code block syntax highlighting: >
|
||||||
let rst_syntax_code_list = ['vim', 'lisp', ...]
|
let rst_syntax_code_list = ['vim', 'lisp', ...]
|
||||||
<
|
|
||||||
|
To assign multiple code block types to a single syntax, define
|
||||||
|
`rst_syntax_code_list` as a mapping: >
|
||||||
|
let rst_syntax_code_list = {
|
||||||
|
\ 'cpp' = ['cpp', 'c++'],
|
||||||
|
\ 'bash' = ['bash', 'sh'],
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
To use color highlighting for emphasis text: >
|
||||||
|
let rst_use_emphasis_colors = 1
|
||||||
|
|
||||||
|
To enable folding of sections: >
|
||||||
|
let rst_fold_enabled = 1
|
||||||
|
|
||||||
|
Note that folding can cause performance issues on some platforms.
|
||||||
|
|
||||||
|
|
||||||
REXX *rexx.vim* *ft-rexx-syntax*
|
REXX *rexx.vim* *ft-rexx-syntax*
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" Vim filetype plugin file
|
" Vim filetype plugin file
|
||||||
" Language: Vim help file
|
" Language: Vim help file
|
||||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||||
" Latest Revision: 2008-07-09
|
" Latest Revision: 2018-12-29
|
||||||
|
|
||||||
if exists("b:did_ftplugin")
|
if exists("b:did_ftplugin")
|
||||||
finish
|
finish
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
" Vim filetype plugin file
|
" Vim filetype plugin file
|
||||||
" Language: Logcheck
|
" Language: Logcheck
|
||||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
" Maintainer: Debian Vim Maintainers
|
||||||
" Last Change: 2012 Jan 15
|
" Last Change: 2018 Dec 27
|
||||||
" License: Vim License
|
" License: Vim License
|
||||||
" URL: http://hg.debian.org/hg/pkg-vim/vim/file/unstable/runtime/ftplugin/logcheck.vim
|
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/logcheck.vim
|
||||||
|
|
||||||
if exists("b:did_ftplugin")
|
if exists('b:did_ftplugin')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let b:did_ftplugin = 1
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
let b:undo_ftplugin = "setl fo<"
|
let b:undo_ftplugin = 'setl fo<'
|
||||||
|
|
||||||
" Do not hard-wrap non-comment lines since each line is a self-contained
|
" Do not hard-wrap non-comment lines since each line is a self-contained
|
||||||
" regular expression
|
" regular expression
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
||||||
" Original Maintainer: Nikolai Weibull <now@bitwi.se>
|
" Original Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||||
" Website: https://github.com/marshallward/vim-restructuredtext
|
" Website: https://github.com/marshallward/vim-restructuredtext
|
||||||
" Latest Revision: 2018-01-07
|
" Latest Revision: 2018-12-29
|
||||||
|
|
||||||
if exists("b:did_ftplugin")
|
if exists("b:did_ftplugin")
|
||||||
finish
|
finish
|
||||||
@ -13,6 +13,11 @@ let b:did_ftplugin = 1
|
|||||||
let s:cpo_save = &cpo
|
let s:cpo_save = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
|
"Disable folding
|
||||||
|
if !exists('g:rst_fold_enabled')
|
||||||
|
let g:rst_fold_enabled = 0
|
||||||
|
endif
|
||||||
|
|
||||||
let b:undo_ftplugin = "setl com< cms< et< fo<"
|
let b:undo_ftplugin = "setl com< cms< et< fo<"
|
||||||
|
|
||||||
setlocal comments=fb:.. commentstring=..\ %s expandtab
|
setlocal comments=fb:.. commentstring=..\ %s expandtab
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
" matchit.vim: (global plugin) Extended "%" matching
|
" matchit.vim: (global plugin) Extended "%" matching
|
||||||
" Last Change: 2018 Jul 3 by Christian Brabandt
|
" Last Change: 2018 Dec 31
|
||||||
" Maintainer: Benji Fisher PhD <benji@member.AMS.org>
|
" Maintainer: Benji Fisher PhD <benji@member.AMS.org>
|
||||||
" Version: 1.13.3, for Vim 6.3+
|
" Version: 1.13.3, for Vim 6.3+
|
||||||
" Fix from Tommy Allen included.
|
" Fix from Tommy Allen included.
|
||||||
@ -38,8 +38,7 @@
|
|||||||
" TODO: Add a level of indirection, so that custom % scripts can use my
|
" TODO: Add a level of indirection, so that custom % scripts can use my
|
||||||
" work but extend it.
|
" work but extend it.
|
||||||
|
|
||||||
" allow user to prevent loading
|
" Allow user to prevent loading and prevent duplicate loading.
|
||||||
" and prevent duplicate loading
|
|
||||||
if exists("loaded_matchit") || &cp
|
if exists("loaded_matchit") || &cp
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: automake Makefile.am
|
" Language: automake Makefile.am
|
||||||
" Maintainer: Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
" Maintainer: Debian Vim Maintainers
|
||||||
" Former Maintainer: John Williams <jrw@pobox.com>
|
" Former Maintainer: John Williams <jrw@pobox.com>
|
||||||
" Last Change: 2011-06-13
|
" Last Change: 2018 Dec 27
|
||||||
" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/automake.vim
|
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/automake.vim
|
||||||
"
|
"
|
||||||
" XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain
|
" XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain
|
||||||
" it only because patches have been submitted for it by Debian users and the
|
" it only because patches have been submitted for it by Debian users and the
|
||||||
@ -18,7 +18,7 @@
|
|||||||
" EXTRA_SOURCES.
|
" EXTRA_SOURCES.
|
||||||
|
|
||||||
" Standard syntax initialization
|
" Standard syntax initialization
|
||||||
if exists("b:current_syntax")
|
if exists('b:current_syntax')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -37,8 +37,8 @@ syn match automakeConditional "^\(if\s*!\=\w\+\|else\|endif\)\s*$"
|
|||||||
|
|
||||||
syn match automakeSubst "@\w\+@"
|
syn match automakeSubst "@\w\+@"
|
||||||
syn match automakeSubst "^\s*@\w\+@"
|
syn match automakeSubst "^\s*@\w\+@"
|
||||||
syn match automakeComment1 "#.*$" contains=automakeSubst
|
syn match automakeComment1 "#.*$" contains=automakeSubst,@Spell
|
||||||
syn match automakeComment2 "##.*$"
|
syn match automakeComment2 "##.*$" contains=@Spell
|
||||||
|
|
||||||
syn match automakeMakeError "$[{(][^})]*[^a-zA-Z0-9_})][^})]*[})]" " GNU make function call
|
syn match automakeMakeError "$[{(][^})]*[^a-zA-Z0-9_})][^})]*[})]" " GNU make function call
|
||||||
syn match automakeMakeError "^AM_LDADD\s*\ze+\==" " Common mistake
|
syn match automakeMakeError "^AM_LDADD\s*\ze+\==" " Common mistake
|
||||||
@ -72,6 +72,6 @@ hi def link automakeMakeSString makeSString
|
|||||||
hi def link automakeMakeBString makeBString
|
hi def link automakeMakeBString makeBString
|
||||||
|
|
||||||
|
|
||||||
let b:current_syntax = "automake"
|
let b:current_syntax = 'automake'
|
||||||
|
|
||||||
" vi: ts=8 sw=4 sts=4
|
" vi: ts=8 sw=4 sts=4
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
||||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||||
" Website: https://github.com/marshallward/vim-restructuredtext
|
" Website: https://github.com/marshallward/vim-restructuredtext
|
||||||
" Latest Revision: 2018-07-23
|
" Latest Revision: 2018-12-29
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
@ -59,6 +59,7 @@ syn keyword rstTodo contained FIXME TODO XXX NOTE
|
|||||||
|
|
||||||
execute 'syn region rstComment contained' .
|
execute 'syn region rstComment contained' .
|
||||||
\ ' start=/.*/'
|
\ ' start=/.*/'
|
||||||
|
\ ' skip=+^$+' .
|
||||||
\ ' end=/^\s\@!/ contains=rstTodo'
|
\ ' end=/^\s\@!/ contains=rstTodo'
|
||||||
|
|
||||||
execute 'syn region rstFootnote contained matchgroup=rstDirective' .
|
execute 'syn region rstFootnote contained matchgroup=rstDirective' .
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: tpp - Text Presentation Program
|
" Language: tpp - Text Presentation Program
|
||||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
" Maintainer: Debian Vim Maintainers
|
||||||
" Former Maintainer: Gerfried Fuchs <alfie@ist.org>
|
" Former Maintainer: Gerfried Fuchs <alfie@ist.org>
|
||||||
" Last Change: 2007-10-14
|
" Last Change: 2018 Dec 27
|
||||||
" URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/syntax/tpp.vim;hb=debian
|
" URL: https://salsa.debian.org/vim-team/vim-debian/master/syntax/tpp.vim
|
||||||
" Filenames: *.tpp
|
" Filenames: *.tpp
|
||||||
" License: BSD
|
" License: BSD
|
||||||
"
|
"
|
||||||
" XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain
|
" XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain
|
||||||
" it only because patches have been submitted for it by Debian users and the
|
" it only because patches have been submitted for it by Debian users and the
|
||||||
@ -18,11 +18,11 @@
|
|||||||
" SPAM is _NOT_ welcome - be ready to be reported!
|
" SPAM is _NOT_ welcome - be ready to be reported!
|
||||||
|
|
||||||
" quit when a syntax file was already loaded
|
" quit when a syntax file was already loaded
|
||||||
if exists("b:current_syntax")
|
if exists('b:current_syntax')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists("main_syntax")
|
if !exists('main_syntax')
|
||||||
let main_syntax = 'tpp'
|
let main_syntax = 'tpp'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ syn region tppNewPageOption start="^--newpage" end="$" contains=tppNewPageOption
|
|||||||
syn region tppPageLocalOption start="^--\%(heading\|center\|right\|huge\|sethugefont\|exec\)" end="$" contains=tppPageLocalOptionKey oneline
|
syn region tppPageLocalOption start="^--\%(heading\|center\|right\|huge\|sethugefont\|exec\)" end="$" contains=tppPageLocalOptionKey oneline
|
||||||
syn region tppAbstractOption start="^--\%(author\|title\|date\|footer\)" end="$" contains=tppAbstractOptionKey oneline
|
syn region tppAbstractOption start="^--\%(author\|title\|date\|footer\)" end="$" contains=tppAbstractOptionKey oneline
|
||||||
|
|
||||||
if main_syntax != 'sh'
|
if main_syntax !=# 'sh'
|
||||||
" shell command
|
" shell command
|
||||||
syn include @tppShExec syntax/sh.vim
|
syn include @tppShExec syntax/sh.vim
|
||||||
unlet b:current_syntax
|
unlet b:current_syntax
|
||||||
@ -78,6 +78,6 @@ hi def link tppNewPageOption Error
|
|||||||
hi def link tppTimeOption Error
|
hi def link tppTimeOption Error
|
||||||
|
|
||||||
|
|
||||||
let b:current_syntax = "tpp"
|
let b:current_syntax = 'tpp'
|
||||||
|
|
||||||
" vim: ts=8 sw=2
|
" vim: ts=8 sw=2
|
||||||
|
Loading…
Reference in New Issue
Block a user