mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
parent
4cab90ad8c
commit
ef1f1907cc
@ -1,8 +1,12 @@
|
||||
" Author: Antony Lee <anntzer.lee@gmail.com>
|
||||
" Description: Helper functions for reStructuredText syntax folding
|
||||
" Last Modified: 2018-01-07
|
||||
" Last Modified: 2018-12-29
|
||||
|
||||
function s:CacheRstFold()
|
||||
if !g:rst_fold_enabled
|
||||
return
|
||||
endif
|
||||
|
||||
let closure = {'header_types': {}, 'max_level': 0, 'levels': {}}
|
||||
function closure.Process(match) dict
|
||||
let curline = getcurpos()[1]
|
||||
@ -20,12 +24,18 @@ function s:CacheRstFold()
|
||||
let self.levels[curline] = self.header_types[key]
|
||||
endfunction
|
||||
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
|
||||
call setpos('.', save_cursor)
|
||||
call setpos("'[", save_mark)
|
||||
let b:RstFoldCache = closure.levels
|
||||
endfunction
|
||||
|
||||
function RstFold#GetRstFold()
|
||||
if !g:rst_fold_enabled
|
||||
return
|
||||
endif
|
||||
|
||||
if !has_key(b:, 'RstFoldCache')
|
||||
call s:CacheRstFold()
|
||||
endif
|
||||
@ -37,6 +47,10 @@ function RstFold#GetRstFold()
|
||||
endfunction
|
||||
|
||||
function RstFold#GetRstFoldText()
|
||||
if !g:rst_fold_enabled
|
||||
return
|
||||
endif
|
||||
|
||||
if !has_key(b:, 'RstFoldCache')
|
||||
call s:CacheRstFold()
|
||||
endif
|
||||
|
@ -776,13 +776,14 @@ FilterReadPre Before reading a file from a filter command.
|
||||
Not triggered when 'shelltemp' is off.
|
||||
*FilterWritePost*
|
||||
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
|
||||
the current buffer as with FilterWritePre.
|
||||
Not triggered when 'shelltemp' is off.
|
||||
*FilterWritePre*
|
||||
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
|
||||
the current buffer, not the name 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-].
|
||||
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
|
||||
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".
|
||||
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
|
||||
through the help of many others. See |credits|.
|
||||
------------------------------------------------------------------------------
|
||||
*doc-file-list* *Q_ct*
|
||||
BASIC:
|
||||
|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
|
||||
|iccf| Helping poor children in Uganda
|
||||
|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
|
||||
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* >
|
||||
Too many different highlighting attributes in use
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
*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*
|
||||
|
||||
|
@ -92,7 +92,7 @@ See |sign_define()| for the equivalent Vim script function.
|
||||
:sign define {name} {argument}...
|
||||
Define a new sign or set attributes for an existing sign.
|
||||
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.
|
||||
About 120 different signs can be defined.
|
||||
|
||||
|
@ -2670,9 +2670,29 @@ later, and part earlier) adds.
|
||||
|
||||
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', ...]
|
||||
<
|
||||
|
||||
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*
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Vim help file
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Latest Revision: 2018-12-29
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
|
@ -1,16 +1,16 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Logcheck
|
||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Last Change: 2012 Jan 15
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Last Change: 2018 Dec 27
|
||||
" 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
|
||||
endif
|
||||
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
|
||||
" regular expression
|
||||
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
||||
" Original Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Website: https://github.com/marshallward/vim-restructuredtext
|
||||
" Latest Revision: 2018-01-07
|
||||
" Latest Revision: 2018-12-29
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -13,6 +13,11 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
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<"
|
||||
|
||||
setlocal comments=fb:.. commentstring=..\ %s expandtab
|
||||
|
@ -1,5 +1,5 @@
|
||||
" 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>
|
||||
" Version: 1.13.3, for Vim 6.3+
|
||||
" Fix from Tommy Allen included.
|
||||
@ -38,8 +38,7 @@
|
||||
" TODO: Add a level of indirection, so that custom % scripts can use my
|
||||
" work but extend it.
|
||||
|
||||
" allow user to prevent loading
|
||||
" and prevent duplicate loading
|
||||
" Allow user to prevent loading and prevent duplicate loading.
|
||||
if exists("loaded_matchit") || &cp
|
||||
finish
|
||||
endif
|
||||
|
@ -1,9 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: automake Makefile.am
|
||||
" Maintainer: Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Former Maintainer: John Williams <jrw@pobox.com>
|
||||
" Last Change: 2011-06-13
|
||||
" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/automake.vim
|
||||
" Language: automake Makefile.am
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainer: John Williams <jrw@pobox.com>
|
||||
" Last Change: 2018 Dec 27
|
||||
" 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
|
||||
" it only because patches have been submitted for it by Debian users and the
|
||||
@ -18,7 +18,7 @@
|
||||
" EXTRA_SOURCES.
|
||||
|
||||
" Standard syntax initialization
|
||||
if exists("b:current_syntax")
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
@ -37,8 +37,8 @@ syn match automakeConditional "^\(if\s*!\=\w\+\|else\|endif\)\s*$"
|
||||
|
||||
syn match automakeSubst "@\w\+@"
|
||||
syn match automakeSubst "^\s*@\w\+@"
|
||||
syn match automakeComment1 "#.*$" contains=automakeSubst
|
||||
syn match automakeComment2 "##.*$"
|
||||
syn match automakeComment1 "#.*$" contains=automakeSubst,@Spell
|
||||
syn match automakeComment2 "##.*$" contains=@Spell
|
||||
|
||||
syn match automakeMakeError "$[{(][^})]*[^a-zA-Z0-9_})][^})]*[})]" " GNU make function call
|
||||
syn match automakeMakeError "^AM_LDADD\s*\ze+\==" " Common mistake
|
||||
@ -72,6 +72,6 @@ hi def link automakeMakeSString makeSString
|
||||
hi def link automakeMakeBString makeBString
|
||||
|
||||
|
||||
let b:current_syntax = "automake"
|
||||
let b:current_syntax = 'automake'
|
||||
|
||||
" vi: ts=8 sw=4 sts=4
|
||||
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Website: https://github.com/marshallward/vim-restructuredtext
|
||||
" Latest Revision: 2018-07-23
|
||||
" Latest Revision: 2018-12-29
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@ -59,6 +59,7 @@ syn keyword rstTodo contained FIXME TODO XXX NOTE
|
||||
|
||||
execute 'syn region rstComment contained' .
|
||||
\ ' start=/.*/'
|
||||
\ ' skip=+^$+' .
|
||||
\ ' end=/^\s\@!/ contains=rstTodo'
|
||||
|
||||
execute 'syn region rstFootnote contained matchgroup=rstDirective' .
|
||||
|
@ -1,11 +1,11 @@
|
||||
" Vim syntax file
|
||||
" Language: tpp - Text Presentation Program
|
||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Former Maintainer: Gerfried Fuchs <alfie@ist.org>
|
||||
" Last Change: 2007-10-14
|
||||
" URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/syntax/tpp.vim;hb=debian
|
||||
" Filenames: *.tpp
|
||||
" License: BSD
|
||||
" Language: tpp - Text Presentation Program
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainer: Gerfried Fuchs <alfie@ist.org>
|
||||
" Last Change: 2018 Dec 27
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/master/syntax/tpp.vim
|
||||
" Filenames: *.tpp
|
||||
" License: BSD
|
||||
"
|
||||
" 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
|
||||
@ -18,11 +18,11 @@
|
||||
" SPAM is _NOT_ welcome - be ready to be reported!
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists("main_syntax")
|
||||
if !exists('main_syntax')
|
||||
let main_syntax = 'tpp'
|
||||
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 tppAbstractOption start="^--\%(author\|title\|date\|footer\)" end="$" contains=tppAbstractOptionKey oneline
|
||||
|
||||
if main_syntax != 'sh'
|
||||
if main_syntax !=# 'sh'
|
||||
" shell command
|
||||
syn include @tppShExec syntax/sh.vim
|
||||
unlet b:current_syntax
|
||||
@ -78,6 +78,6 @@ hi def link tppNewPageOption Error
|
||||
hi def link tppTimeOption Error
|
||||
|
||||
|
||||
let b:current_syntax = "tpp"
|
||||
let b:current_syntax = 'tpp'
|
||||
|
||||
" vim: ts=8 sw=2
|
||||
|
Loading…
Reference in New Issue
Block a user