mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
parent
875a1bcf0a
commit
c05b0d8ec7
@ -99,7 +99,7 @@ is an error when 'cpoptions' includes the 'E' flag.
|
|||||||
J Join [count] lines, with a minimum of two lines.
|
J Join [count] lines, with a minimum of two lines.
|
||||||
Remove the indent and insert up to two spaces (see
|
Remove the indent and insert up to two spaces (see
|
||||||
below). Fails when on the last line of the buffer.
|
below). Fails when on the last line of the buffer.
|
||||||
If [count] is too big it is reduce to the number of
|
If [count] is too big it is reduced to the number of
|
||||||
lines available.
|
lines available.
|
||||||
|
|
||||||
*v_J*
|
*v_J*
|
||||||
@ -416,7 +416,7 @@ This depends on the 'nrformats' option:
|
|||||||
|
|
||||||
For decimals a leading negative sign is considered for incrementing or
|
For decimals a leading negative sign is considered for incrementing or
|
||||||
decrementing, for binary, octal and hex values, it won't be considered. To
|
decrementing, for binary, octal and hex values, it won't be considered. To
|
||||||
ignore the sign Visually select the number before using CTRL-A or CTRL-X.
|
ignore the sign Visually select the number before using CTRL-A or CTRL-X.
|
||||||
|
|
||||||
For numbers with leading zeros (including all octal and hexadecimal numbers),
|
For numbers with leading zeros (including all octal and hexadecimal numbers),
|
||||||
Vim preserves the number of characters in the number when possible. CTRL-A on
|
Vim preserves the number of characters in the number when possible. CTRL-A on
|
||||||
|
@ -1240,7 +1240,7 @@ or >
|
|||||||
to indicate the column of the error. This is to be used in a multi-line error
|
to indicate the column of the error. This is to be used in a multi-line error
|
||||||
message. See |errorformat-javac| for a useful example.
|
message. See |errorformat-javac| for a useful example.
|
||||||
|
|
||||||
The "%s" conversion specifies the text to search for to locate the error line.
|
The "%s" conversion specifies the text to search for, to locate the error line.
|
||||||
The text is used as a literal string. The anchors "^" and "$" are added to
|
The text is used as a literal string. The anchors "^" and "$" are added to
|
||||||
the text to locate the error line exactly matching the search text and the
|
the text to locate the error line exactly matching the search text and the
|
||||||
text is prefixed with the "\V" atom to make it "very nomagic". The "%s"
|
text is prefixed with the "\V" atom to make it "very nomagic". The "%s"
|
||||||
|
@ -31,12 +31,12 @@ An easy way back is with the CTRL-T command. Also read about the tag stack
|
|||||||
below.
|
below.
|
||||||
|
|
||||||
*:ta* *:tag* *E426* *E429*
|
*:ta* *:tag* *E426* *E429*
|
||||||
:[count]ta[g][!] {ident}
|
:[count]ta[g][!] {name}
|
||||||
Jump to the definition of {ident}, using the
|
Jump to the definition of {name}, using the
|
||||||
information in the tags file(s). Put {ident} in the
|
information in the tags file(s). Put {name} in the
|
||||||
tag stack. See |tag-!| for [!].
|
tag stack. See |tag-!| for [!].
|
||||||
{ident} can be a regexp pattern, see |tag-regexp|.
|
{name} can be a regexp pattern, see |tag-regexp|.
|
||||||
When there are several matching tags for {ident}, jump
|
When there are several matching tags for {name}, jump
|
||||||
to the [count] one. When [count] is omitted the
|
to the [count] one. When [count] is omitted the
|
||||||
first one is jumped to. See |tag-matchlist| for
|
first one is jumped to. See |tag-matchlist| for
|
||||||
jumping to other matching tags.
|
jumping to other matching tags.
|
||||||
@ -44,15 +44,15 @@ below.
|
|||||||
g<LeftMouse> *g<LeftMouse>*
|
g<LeftMouse> *g<LeftMouse>*
|
||||||
<C-LeftMouse> *<C-LeftMouse>* *CTRL-]*
|
<C-LeftMouse> *<C-LeftMouse>* *CTRL-]*
|
||||||
CTRL-] Jump to the definition of the keyword under the
|
CTRL-] Jump to the definition of the keyword under the
|
||||||
cursor. Same as ":tag {ident}", where {ident} is the
|
cursor. Same as ":tag {name}", where {name} is the
|
||||||
keyword under or after cursor.
|
keyword under or after cursor.
|
||||||
When there are several matching tags for {ident}, jump
|
When there are several matching tags for {name}, jump
|
||||||
to the [count] one. When no [count] is given the
|
to the [count] one. When no [count] is given the
|
||||||
first one is jumped to. See |tag-matchlist| for
|
first one is jumped to. See |tag-matchlist| for
|
||||||
jumping to other matching tags.
|
jumping to other matching tags.
|
||||||
|
|
||||||
*v_CTRL-]*
|
*v_CTRL-]*
|
||||||
{Visual}CTRL-] Same as ":tag {ident}", where {ident} is the text that
|
{Visual}CTRL-] Same as ":tag {name}", where {name} is the text that
|
||||||
is highlighted.
|
is highlighted.
|
||||||
|
|
||||||
*telnet-CTRL-]*
|
*telnet-CTRL-]*
|
||||||
@ -76,7 +76,7 @@ When there are multiple matches for a tag, this priority is used:
|
|||||||
|
|
||||||
Note that when the current file changes, the priority list is mostly not
|
Note that when the current file changes, the priority list is mostly not
|
||||||
changed, to avoid confusion when using ":tnext". It is changed when using
|
changed, to avoid confusion when using ":tnext". It is changed when using
|
||||||
":tag {ident}".
|
":tag {name}".
|
||||||
|
|
||||||
The ignore-case matches are not found for a ":tag" command when:
|
The ignore-case matches are not found for a ":tag" command when:
|
||||||
- the 'ignorecase' option is off and 'tagcase' is "followic"
|
- the 'ignorecase' option is off and 'tagcase' is "followic"
|
||||||
@ -161,7 +161,7 @@ You can get from main to FuncA by using CTRL-] on the call to FuncA. Then
|
|||||||
you can CTRL-] to get to FuncC. If you now want to go back to main you can
|
you can CTRL-] to get to FuncC. If you now want to go back to main you can
|
||||||
use CTRL-T twice. Then you can CTRL-] to FuncB.
|
use CTRL-T twice. Then you can CTRL-] to FuncB.
|
||||||
|
|
||||||
If you issue a ":ta {ident}" or CTRL-] command, this tag is inserted at the
|
If you issue a ":ta {name}" or CTRL-] command, this tag is inserted at the
|
||||||
current position in the stack. If the stack was full (it can hold up to 20
|
current position in the stack. If the stack was full (it can hold up to 20
|
||||||
entries), the oldest entry is deleted and the older entries shift one
|
entries), the oldest entry is deleted and the older entries shift one
|
||||||
position up (their index number is decremented by one). If the last used
|
position up (their index number is decremented by one). If the last used
|
||||||
@ -185,14 +185,14 @@ between them. Note that these commands don't change the tag stack, they keep
|
|||||||
the same entry.
|
the same entry.
|
||||||
|
|
||||||
*:ts* *:tselect*
|
*:ts* *:tselect*
|
||||||
:ts[elect][!] [ident] List the tags that match [ident], using the
|
:ts[elect][!] [name] List the tags that match [name], using the
|
||||||
information in the tags file(s).
|
information in the tags file(s).
|
||||||
When [ident] is not given, the last tag name from the
|
When [name] is not given, the last tag name from the
|
||||||
tag stack is used.
|
tag stack is used.
|
||||||
See |tag-!| for [!].
|
See |tag-!| for [!].
|
||||||
With a '>' in the first column is indicated which is
|
With a '>' in the first column is indicated which is
|
||||||
the current position in the list (if there is one).
|
the current position in the list (if there is one).
|
||||||
[ident] can be a regexp pattern, see |tag-regexp|.
|
[name] can be a regexp pattern, see |tag-regexp|.
|
||||||
See |tag-priority| for the priorities used in the
|
See |tag-priority| for the priorities used in the
|
||||||
listing.
|
listing.
|
||||||
Example output:
|
Example output:
|
||||||
@ -220,7 +220,7 @@ the same entry.
|
|||||||
type 'q' and enter the number.
|
type 'q' and enter the number.
|
||||||
|
|
||||||
*:sts* *:stselect*
|
*:sts* *:stselect*
|
||||||
:sts[elect][!] [ident] Does ":tselect[!] [ident]" and splits the window for
|
:sts[elect][!] [name] Does ":tselect[!] [name]" and splits the window for
|
||||||
the selected tag.
|
the selected tag.
|
||||||
|
|
||||||
*g]*
|
*g]*
|
||||||
@ -231,11 +231,11 @@ g] Like CTRL-], but use ":tselect" instead of ":tag".
|
|||||||
identifier.
|
identifier.
|
||||||
|
|
||||||
*:tj* *:tjump*
|
*:tj* *:tjump*
|
||||||
:tj[ump][!] [ident] Like ":tselect", but jump to the tag directly when
|
:tj[ump][!] [name] Like ":tselect", but jump to the tag directly when
|
||||||
there is only one match.
|
there is only one match.
|
||||||
|
|
||||||
*:stj* *:stjump*
|
*:stj* *:stjump*
|
||||||
:stj[ump][!] [ident] Does ":tjump[!] [ident]" and splits the window for the
|
:stj[ump][!] [name] Does ":tjump[!] [name]" and splits the window for the
|
||||||
selected tag.
|
selected tag.
|
||||||
|
|
||||||
*g_CTRL-]*
|
*g_CTRL-]*
|
||||||
@ -267,9 +267,9 @@ g CTRL-] Like CTRL-], but use ":tjump" instead of ":tag".
|
|||||||
:tl[ast][!] Jump to last matching tag. See |tag-!| for [!].
|
:tl[ast][!] Jump to last matching tag. See |tag-!| for [!].
|
||||||
|
|
||||||
*:lt* *:ltag*
|
*:lt* *:ltag*
|
||||||
:lt[ag][!] [ident] Jump to tag [ident] and add the matching tags to a new
|
:lt[ag][!] [name] Jump to tag [name] and add the matching tags to a new
|
||||||
location list for the current window. [ident] can be
|
location list for the current window. [name] can be
|
||||||
a regexp pattern, see |tag-regexp|. When [ident] is
|
a regexp pattern, see |tag-regexp|. When [name] is
|
||||||
not given, the last tag name from the tag stack is
|
not given, the last tag name from the tag stack is
|
||||||
used. The search pattern to locate the tag line is
|
used. The search pattern to locate the tag line is
|
||||||
prefixed with "\V" to escape all the special
|
prefixed with "\V" to escape all the special
|
||||||
@ -300,11 +300,11 @@ the same as above, with a "p" prepended.
|
|||||||
{not available when compiled without the |+quickfix| feature}
|
{not available when compiled without the |+quickfix| feature}
|
||||||
|
|
||||||
*:pts* *:ptselect*
|
*:pts* *:ptselect*
|
||||||
:pts[elect][!] [ident] Does ":tselect[!] [ident]" and shows the new tag in a
|
:pts[elect][!] [name] Does ":tselect[!] [name]" and shows the new tag in a
|
||||||
"Preview" window. See |:ptag| for more info.
|
"Preview" window. See |:ptag| for more info.
|
||||||
|
|
||||||
*:ptj* *:ptjump*
|
*:ptj* *:ptjump*
|
||||||
:ptj[ump][!] [ident] Does ":tjump[!] [ident]" and shows the new tag in a
|
:ptj[ump][!] [name] Does ":tjump[!] [name]" and shows the new tag in a
|
||||||
"Preview" window. See |:ptag| for more info.
|
"Preview" window. See |:ptag| for more info.
|
||||||
|
|
||||||
*:ptn* *:ptnext*
|
*:ptn* *:ptnext*
|
||||||
|
@ -425,6 +425,13 @@ au BufNewFile,BufRead control
|
|||||||
\| setf debcontrol
|
\| setf debcontrol
|
||||||
\| endif
|
\| endif
|
||||||
|
|
||||||
|
" Debian Copyright
|
||||||
|
au BufNewFile,BufRead */debian/copyright setf debcopyright
|
||||||
|
au BufNewFile,BufRead copyright
|
||||||
|
\ if getline(1) =~ '^Format:'
|
||||||
|
\| setf debcopyright
|
||||||
|
\| endif
|
||||||
|
|
||||||
" Debian Sources.list
|
" Debian Sources.list
|
||||||
au BufNewFile,BufRead */etc/apt/sources.list setf debsources
|
au BufNewFile,BufRead */etc/apt/sources.list setf debsources
|
||||||
au BufNewFile,BufRead */etc/apt/sources.list.d/*.list setf debsources
|
au BufNewFile,BufRead */etc/apt/sources.list.d/*.list setf debsources
|
||||||
|
@ -3,20 +3,20 @@
|
|||||||
" Maintainer: Debian Vim Maintainers
|
" Maintainer: Debian Vim Maintainers
|
||||||
" Former Maintainers: Michael Piefel <piefel@informatik.hu-berlin.de>
|
" Former Maintainers: Michael Piefel <piefel@informatik.hu-berlin.de>
|
||||||
" Stefano Zacchiroli <zack@debian.org>
|
" Stefano Zacchiroli <zack@debian.org>
|
||||||
" Last Change: 2018-01-06
|
" Last Change: 2018-01-28
|
||||||
" License: Vim License
|
" License: Vim License
|
||||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/debchangelog.vim
|
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/debchangelog.vim
|
||||||
|
|
||||||
" Bug completion requires apt-listbugs installed for Debian packages or
|
" Bug completion requires apt-listbugs installed for Debian packages or
|
||||||
" python-launchpadlib installed for Ubuntu packages
|
" python-launchpadlib installed for Ubuntu packages
|
||||||
|
|
||||||
if exists("b:did_ftplugin")
|
if exists('b:did_ftplugin')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let b:did_ftplugin=1
|
let b:did_ftplugin=1
|
||||||
|
|
||||||
" {{{1 Local settings (do on every load)
|
" {{{1 Local settings (do on every load)
|
||||||
if exists("g:debchangelog_fold_enable")
|
if exists('g:debchangelog_fold_enable')
|
||||||
setlocal foldmethod=expr
|
setlocal foldmethod=expr
|
||||||
setlocal foldexpr=DebGetChangelogFold(v:lnum)
|
setlocal foldexpr=DebGetChangelogFold(v:lnum)
|
||||||
setlocal foldtext=DebChangelogFoldText()
|
setlocal foldtext=DebChangelogFoldText()
|
||||||
@ -28,10 +28,10 @@ setlocal tw=78
|
|||||||
setlocal comments=f:*
|
setlocal comments=f:*
|
||||||
|
|
||||||
" Clean unloading
|
" Clean unloading
|
||||||
let b:undo_ftplugin = "setlocal tw< comments< foldmethod< foldexpr< foldtext<"
|
let b:undo_ftplugin = 'setlocal tw< comments< foldmethod< foldexpr< foldtext<'
|
||||||
" }}}1
|
" }}}1
|
||||||
|
|
||||||
if exists("g:did_changelog_ftplugin")
|
if exists('g:did_changelog_ftplugin')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -44,41 +44,41 @@ let g:did_changelog_ftplugin = 1
|
|||||||
" Returns full name, either from $DEBFULLNAME or debianfullname.
|
" Returns full name, either from $DEBFULLNAME or debianfullname.
|
||||||
" TODO Is there a way to determine name from anywhere else?
|
" TODO Is there a way to determine name from anywhere else?
|
||||||
function <SID>FullName()
|
function <SID>FullName()
|
||||||
if exists("$DEBFULLNAME")
|
if exists('$DEBFULLNAME')
|
||||||
return $DEBFULLNAME
|
return $DEBFULLNAME
|
||||||
elseif exists("g:debianfullname")
|
elseif exists('g:debianfullname')
|
||||||
return g:debianfullname
|
return g:debianfullname
|
||||||
else
|
else
|
||||||
return "Your Name"
|
return 'Your Name'
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Returns email address, from $DEBEMAIL, $EMAIL or debianemail.
|
" Returns email address, from $DEBEMAIL, $EMAIL or debianemail.
|
||||||
function <SID>Email()
|
function <SID>Email()
|
||||||
if exists("$DEBEMAIL")
|
if exists('$DEBEMAIL')
|
||||||
return $DEBEMAIL
|
return $DEBEMAIL
|
||||||
elseif exists("$EMAIL")
|
elseif exists('$EMAIL')
|
||||||
return $EMAIL
|
return $EMAIL
|
||||||
elseif exists("g:debianemail")
|
elseif exists('g:debianemail')
|
||||||
return g:debianemail
|
return g:debianemail
|
||||||
else
|
else
|
||||||
return "your@email.address"
|
return 'your@email.address'
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Returns date in RFC822 format.
|
" Returns date in RFC822 format.
|
||||||
function <SID>Date()
|
function <SID>Date()
|
||||||
let savelang = v:lc_time
|
let savelang = v:lc_time
|
||||||
execute "language time C"
|
execute 'language time C'
|
||||||
let dateandtime = strftime("%a, %d %b %Y %X %z")
|
let dateandtime = strftime('%a, %d %b %Y %X %z')
|
||||||
execute "language time " . savelang
|
execute 'language time ' . savelang
|
||||||
return dateandtime
|
return dateandtime
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function <SID>WarnIfNotUnfinalised()
|
function <SID>WarnIfNotUnfinalised()
|
||||||
if match(getline("."), " -- [[:alpha:]][[:alnum:].]")!=-1
|
if match(getline('.'), ' -- [[:alpha:]][[:alnum:].]')!=-1
|
||||||
echohl WarningMsg
|
echohl WarningMsg
|
||||||
echo "The entry has not been unfinalised before editing."
|
echo 'The entry has not been unfinalised before editing.'
|
||||||
echohl None
|
echohl None
|
||||||
return 1
|
return 1
|
||||||
endif
|
endif
|
||||||
@ -86,10 +86,10 @@ function <SID>WarnIfNotUnfinalised()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function <SID>Finalised()
|
function <SID>Finalised()
|
||||||
let savelinenum = line(".")
|
let savelinenum = line('.')
|
||||||
normal 1G
|
1
|
||||||
call search("^ -- ")
|
call search('^ -- ')
|
||||||
if match(getline("."), " -- [[:alpha:]][[:alnum:].]")!=-1
|
if match(getline('.'), ' -- [[:alpha:]][[:alnum:].]')!=-1
|
||||||
let returnvalue = 1
|
let returnvalue = 1
|
||||||
else
|
else
|
||||||
let returnvalue = 0
|
let returnvalue = 0
|
||||||
@ -109,54 +109,54 @@ function NewVersion()
|
|||||||
amenu disable Changelog.Unfinalise
|
amenu disable Changelog.Unfinalise
|
||||||
amenu enable Changelog.Finalise
|
amenu enable Changelog.Finalise
|
||||||
call append(0, substitute(getline(1), '-\([[:digit:]]\+\))', '-$$\1)', ''))
|
call append(0, substitute(getline(1), '-\([[:digit:]]\+\))', '-$$\1)', ''))
|
||||||
call append(1, "")
|
call append(1, '')
|
||||||
call append(2, "")
|
call append(2, '')
|
||||||
call append(3, " -- ")
|
call append(3, ' -- ')
|
||||||
call append(4, "")
|
call append(4, '')
|
||||||
call Urgency("low")
|
call Urgency('low')
|
||||||
normal 1G0
|
normal! 1G0
|
||||||
call search(")")
|
call search(')')
|
||||||
normal h
|
normal! h
|
||||||
normal
|
normal!
|
||||||
call setline(1, substitute(getline(1), '-\$\$', '-', ''))
|
call setline(1, substitute(getline(1), '-\$\$', '-', ''))
|
||||||
if exists("g:debchangelog_fold_enable")
|
if exists('g:debchangelog_fold_enable')
|
||||||
foldopen
|
foldopen
|
||||||
endif
|
endif
|
||||||
call AddEntry()
|
call AddEntry()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function AddEntry()
|
function AddEntry()
|
||||||
normal 1G
|
1
|
||||||
call search("^ -- ")
|
call search('^ -- ')
|
||||||
normal kk
|
.-2
|
||||||
call append(".", " * ")
|
call append('.', ' * ')
|
||||||
normal jjj
|
.+3
|
||||||
let warn=<SID>WarnIfNotUnfinalised()
|
let warn=<SID>WarnIfNotUnfinalised()
|
||||||
normal kk
|
.-2
|
||||||
if warn
|
if warn
|
||||||
echohl MoreMsg
|
echohl MoreMsg
|
||||||
call input("Hit ENTER")
|
call input('Hit ENTER')
|
||||||
echohl None
|
echohl None
|
||||||
endif
|
endif
|
||||||
startinsert!
|
startinsert!
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function CloseBug()
|
function CloseBug()
|
||||||
normal 1G
|
1
|
||||||
call search("^ -- ")
|
call search('^ -- ')
|
||||||
let warn=<SID>WarnIfNotUnfinalised()
|
let warn=<SID>WarnIfNotUnfinalised()
|
||||||
normal kk
|
.-2
|
||||||
call append(".", " * (closes: #" . input("Bug number to close: ") . ")")
|
call append('.', ' * (closes: #' . input('Bug number to close: ') . ')')
|
||||||
normal j^ll
|
normal! j^ll
|
||||||
startinsert
|
startinsert
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function Distribution(dist)
|
function Distribution(dist)
|
||||||
call setline(1, substitute(getline(1), ') *\%(UNRELEASED\|\l\+\);', ") " . a:dist . ";", ""))
|
call setline(1, substitute(getline(1), ') *\%(UNRELEASED\|\l\+\);', ') ' . a:dist . ';', ''))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function Urgency(urg)
|
function Urgency(urg)
|
||||||
call setline(1, substitute(getline(1), "urgency=.*$", "urgency=" . a:urg, ""))
|
call setline(1, substitute(getline(1), 'urgency=.*$', 'urgency=' . a:urg, ''))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function <SID>UnfinaliseMenu()
|
function <SID>UnfinaliseMenu()
|
||||||
@ -172,9 +172,9 @@ endfunction
|
|||||||
|
|
||||||
function Unfinalise()
|
function Unfinalise()
|
||||||
call <SID>UnfinaliseMenu()
|
call <SID>UnfinaliseMenu()
|
||||||
normal 1G
|
1
|
||||||
call search("^ -- ")
|
call search('^ -- ')
|
||||||
call setline(".", " -- ")
|
call setline('.', ' -- ')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function <SID>FinaliseMenu()
|
function <SID>FinaliseMenu()
|
||||||
@ -190,9 +190,9 @@ endfunction
|
|||||||
|
|
||||||
function Finalise()
|
function Finalise()
|
||||||
call <SID>FinaliseMenu()
|
call <SID>FinaliseMenu()
|
||||||
normal 1G
|
1
|
||||||
call search("^ -- ")
|
call search('^ -- ')
|
||||||
call setline(".", " -- " . <SID>FullName() . " <" . <SID>Email() . "> " . <SID>Date())
|
call setline('.', ' -- ' . <SID>FullName() . ' <' . <SID>Email() . '> ' . <SID>Date())
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ function! s:getAuthor(zonestart, zoneend)
|
|||||||
let linepos = a:zoneend
|
let linepos = a:zoneend
|
||||||
while linepos >= a:zonestart
|
while linepos >= a:zonestart
|
||||||
let line = getline(linepos)
|
let line = getline(linepos)
|
||||||
if line =~ '^ --'
|
if line =~# '^ --'
|
||||||
return substitute(line, '^ --\s*\([^<]\+\)\s*.*', '\1', '')
|
return substitute(line, '^ --\s*\([^<]\+\)\s*.*', '\1', '')
|
||||||
endif
|
endif
|
||||||
let linepos -= 1
|
let linepos -= 1
|
||||||
@ -254,7 +254,7 @@ function! DebGetPkgSrcName(lineno)
|
|||||||
let pkgname = ''
|
let pkgname = ''
|
||||||
while lineidx > 0
|
while lineidx > 0
|
||||||
let curline = getline(lineidx)
|
let curline = getline(lineidx)
|
||||||
if curline =~ '^\S'
|
if curline =~# '^\S'
|
||||||
let pkgname = matchlist(curline, '^\(\S\+\).*$')[1]
|
let pkgname = matchlist(curline, '^\(\S\+\).*$')[1]
|
||||||
break
|
break
|
||||||
endif
|
endif
|
||||||
@ -264,7 +264,7 @@ function! DebGetPkgSrcName(lineno)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! DebChangelogFoldText()
|
function! DebChangelogFoldText()
|
||||||
if v:folddashes == '-' " changelog entry fold
|
if v:folddashes ==# '-' " changelog entry fold
|
||||||
return foldtext() . ' -- ' . s:getAuthor(v:foldstart, v:foldend) . ' '
|
return foldtext() . ' -- ' . s:getAuthor(v:foldstart, v:foldend) . ' '
|
||||||
endif
|
endif
|
||||||
return foldtext()
|
return foldtext()
|
||||||
@ -272,19 +272,19 @@ endfunction
|
|||||||
|
|
||||||
function! DebGetChangelogFold(lnum)
|
function! DebGetChangelogFold(lnum)
|
||||||
let line = getline(a:lnum)
|
let line = getline(a:lnum)
|
||||||
if line =~ '^\w\+'
|
if line =~# '^\w\+'
|
||||||
return '>1' " beginning of a changelog entry
|
return '>1' " beginning of a changelog entry
|
||||||
endif
|
endif
|
||||||
if line =~ '^\s\+\[.*\]'
|
if line =~# '^\s\+\[.*\]'
|
||||||
return '>2' " beginning of an author-specific chunk
|
return '>2' " beginning of an author-specific chunk
|
||||||
endif
|
endif
|
||||||
if line =~ '^ --'
|
if line =~# '^ --'
|
||||||
return '1'
|
return '1'
|
||||||
endif
|
endif
|
||||||
return '='
|
return '='
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
if exists("g:debchangelog_fold_enable")
|
if exists('g:debchangelog_fold_enable')
|
||||||
silent! foldopen! " unfold the entry the cursor is on (usually the first one)
|
silent! foldopen! " unfold the entry the cursor is on (usually the first one)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -305,13 +305,13 @@ fun! DebCompleteBugs(findstart, base)
|
|||||||
let try_colidx = col('.') - 1
|
let try_colidx = col('.') - 1
|
||||||
let colidx = -1 " default to no-completion-possible
|
let colidx = -1 " default to no-completion-possible
|
||||||
|
|
||||||
while try_colidx > 0 && line[try_colidx - 1] =~ '\s\|\d\|#\|,\|:'
|
while try_colidx > 0 && line[try_colidx - 1] =~# '\s\|\d\|#\|,\|:'
|
||||||
let try_colidx = try_colidx - 1
|
let try_colidx = try_colidx - 1
|
||||||
if line[try_colidx] == '#' && colidx == -1
|
if line[try_colidx] ==# '#' && colidx == -1
|
||||||
" found hash, where we complete from:
|
" found hash, where we complete from:
|
||||||
let colidx = try_colidx
|
let colidx = try_colidx
|
||||||
elseif line[try_colidx] == ':'
|
elseif line[try_colidx] ==# ':'
|
||||||
if try_colidx > 1 && strpart(line, try_colidx - 2, 3) =~ '\clp:'
|
if try_colidx > 1 && strpart(line, try_colidx - 2, 3) =~? '\clp:'
|
||||||
let g:debchangelog_complete_mode = 'lp'
|
let g:debchangelog_complete_mode = 'lp'
|
||||||
endif
|
endif
|
||||||
break
|
break
|
||||||
@ -320,7 +320,7 @@ fun! DebCompleteBugs(findstart, base)
|
|||||||
return colidx
|
return colidx
|
||||||
else " return matches:
|
else " return matches:
|
||||||
let bug_lines = []
|
let bug_lines = []
|
||||||
if g:debchangelog_complete_mode == 'lp'
|
if g:debchangelog_complete_mode ==? 'lp'
|
||||||
if ! has('python')
|
if ! has('python')
|
||||||
echoerr 'vim must be built with Python support to use LP bug completion'
|
echoerr 'vim must be built with Python support to use LP bug completion'
|
||||||
return
|
return
|
||||||
@ -363,7 +363,7 @@ EOF
|
|||||||
for line in bug_lines
|
for line in bug_lines
|
||||||
let parts = matchlist(line, '^\s*\(#\S\+\)\s*-\s*\(.*\)$')
|
let parts = matchlist(line, '^\s*\(#\S\+\)\s*-\s*\(.*\)$')
|
||||||
" filter only those which match a:base:
|
" filter only those which match a:base:
|
||||||
if parts[1] !~ "^" . a:base
|
if parts[1] !~ '^' . a:base
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
let completion = {}
|
let completion = {}
|
||||||
|
@ -2,17 +2,17 @@
|
|||||||
" Language: Debian control files
|
" Language: Debian control files
|
||||||
" Maintainer: Debian Vim Maintainers
|
" Maintainer: Debian Vim Maintainers
|
||||||
" Former Maintainer: Pierre Habouzit <madcoder@debian.org>
|
" Former Maintainer: Pierre Habouzit <madcoder@debian.org>
|
||||||
" Last Change: 2018-01-06
|
" Last Change: 2018-01-28
|
||||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/debcontrol.vim
|
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/debcontrol.vim
|
||||||
|
|
||||||
" Do these settings once per buffer
|
" Do these settings once per buffer
|
||||||
if exists("b:did_ftplugin")
|
if exists('b:did_ftplugin')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let b:did_ftplugin=1
|
let b:did_ftplugin=1
|
||||||
|
|
||||||
" {{{1 Local settings (do on every load)
|
" {{{1 Local settings (do on every load)
|
||||||
if exists("g:debcontrol_fold_enable")
|
if exists('g:debcontrol_fold_enable')
|
||||||
setlocal foldmethod=expr
|
setlocal foldmethod=expr
|
||||||
setlocal foldexpr=DebControlFold(v:lnum)
|
setlocal foldexpr=DebControlFold(v:lnum)
|
||||||
setlocal foldtext=DebControlFoldText()
|
setlocal foldtext=DebControlFoldText()
|
||||||
@ -20,7 +20,7 @@ endif
|
|||||||
setlocal textwidth=0
|
setlocal textwidth=0
|
||||||
|
|
||||||
" Clean unloading
|
" Clean unloading
|
||||||
let b:undo_ftplugin = "setlocal tw< foldmethod< foldexpr< foldtext<"
|
let b:undo_ftplugin = 'setlocal tw< foldmethod< foldexpr< foldtext<'
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ function! s:getField(f, lnum)
|
|||||||
while line !~ '^'.a:f.':'
|
while line !~ '^'.a:f.':'
|
||||||
let fwdsteps += 1
|
let fwdsteps += 1
|
||||||
let line = getline(a:lnum + fwdsteps)
|
let line = getline(a:lnum + fwdsteps)
|
||||||
if line == ''
|
if line ==# ''
|
||||||
return 'unknown'
|
return 'unknown'
|
||||||
endif
|
endif
|
||||||
endwhile
|
endwhile
|
||||||
@ -40,9 +40,9 @@ function! s:getField(f, lnum)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! DebControlFoldText()
|
function! DebControlFoldText()
|
||||||
if v:folddashes == '-' " debcontrol entry fold
|
if v:folddashes ==# '-' " debcontrol entry fold
|
||||||
let type = substitute(getline(v:foldstart), ':.*', '', '')
|
let type = substitute(getline(v:foldstart), ':.*', '', '')
|
||||||
if type == 'Source'
|
if type ==# 'Source'
|
||||||
let ftext = substitute(foldtext(), ' *Source: *', ' ', '')
|
let ftext = substitute(foldtext(), ' *Source: *', ' ', '')
|
||||||
return ftext . ' -- ' . s:getField('Maintainer', v:foldstart) . ' '
|
return ftext . ' -- ' . s:getField('Maintainer', v:foldstart) . ' '
|
||||||
endif
|
endif
|
||||||
@ -56,11 +56,11 @@ endfunction
|
|||||||
function! DebControlFold(l)
|
function! DebControlFold(l)
|
||||||
|
|
||||||
" This is for not merging blank lines around folds to them
|
" This is for not merging blank lines around folds to them
|
||||||
if getline(a:l) =~ '^Source:'
|
if getline(a:l) =~# '^Source:'
|
||||||
return '>1'
|
return '>1'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if getline(a:l) =~ '^Package:'
|
if getline(a:l) =~# '^Package:'
|
||||||
return '>1'
|
return '>1'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: C#
|
" Language: C#
|
||||||
" Maintainer: Anduin Withers <awithers@anduin.com>
|
" Maintainer: Nick Jensen <nickspoon@gmail.com>
|
||||||
|
" Former Maintainer: Anduin Withers <awithers@anduin.com>
|
||||||
" Former Maintainer: Johannes Zellner <johannes@zellner.org>
|
" Former Maintainer: Johannes Zellner <johannes@zellner.org>
|
||||||
" Last Change: Fri Aug 14 13:56:37 PDT 2009
|
" Last Change: 2018-05-02
|
||||||
" Filenames: *.cs
|
" Filenames: *.cs
|
||||||
" $Id: cs.vim,v 1.4 2006/05/03 21:20:02 vimboss Exp $
|
" License: Vim (see :h license)
|
||||||
|
" Repository: https://github.com/nickspoons/vim-cs
|
||||||
"
|
"
|
||||||
" REFERENCES:
|
" REFERENCES:
|
||||||
" [1] ECMA TC39: C# Language Specification (WD13Oct01.doc)
|
" [1] ECMA TC39: C# Language Specification (WD13Oct01.doc)
|
||||||
@ -17,31 +19,23 @@ let s:cs_cpo_save = &cpo
|
|||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
|
|
||||||
" type
|
syn keyword csType bool byte char decimal double float int long object sbyte short string T uint ulong ushort var void dynamic
|
||||||
syn keyword csType bool byte char decimal double float int long object sbyte short string uint ulong ushort void
|
syn keyword csStorage delegate enum interface namespace struct
|
||||||
" storage
|
|
||||||
syn keyword csStorage class delegate enum interface namespace struct
|
|
||||||
" repeat / condition / label
|
|
||||||
syn keyword csRepeat break continue do for foreach goto return while
|
syn keyword csRepeat break continue do for foreach goto return while
|
||||||
syn keyword csConditional else if switch
|
syn keyword csConditional else if switch
|
||||||
syn keyword csLabel case default
|
syn keyword csLabel case default
|
||||||
" user labels (see [1] 8.6 Statements)
|
" user labels (see [1] 8.6 Statements)
|
||||||
syn match csLabel display +^\s*\I\i*\s*:\([^:]\)\@=+
|
syn match csLabel display +^\s*\I\i*\s*:\([^:]\)\@=+
|
||||||
" modifier
|
|
||||||
syn keyword csModifier abstract const extern internal override private protected public readonly sealed static virtual volatile
|
syn keyword csModifier abstract const extern internal override private protected public readonly sealed static virtual volatile
|
||||||
" constant
|
|
||||||
syn keyword csConstant false null true
|
syn keyword csConstant false null true
|
||||||
" exception
|
syn keyword csException try catch finally throw when
|
||||||
syn keyword csException try catch finally throw
|
syn keyword csLinq ascending by descending equals from group in into join let on orderby select where
|
||||||
|
syn keyword csAsync async await
|
||||||
|
|
||||||
" TODO:
|
syn keyword csUnspecifiedStatement as base checked event fixed get in is lock nameof operator out params ref set sizeof stackalloc this typeof unchecked unsafe using
|
||||||
syn keyword csUnspecifiedStatement as base checked event fixed in is lock new operator out params ref sizeof stackalloc this typeof unchecked unsafe using
|
|
||||||
" TODO:
|
|
||||||
syn keyword csUnsupportedStatement add remove value
|
syn keyword csUnsupportedStatement add remove value
|
||||||
" TODO:
|
|
||||||
syn keyword csUnspecifiedKeyword explicit implicit
|
syn keyword csUnspecifiedKeyword explicit implicit
|
||||||
|
|
||||||
|
|
||||||
" Contextual Keywords
|
" Contextual Keywords
|
||||||
syn match csContextualStatement /\<yield[[:space:]\n]\+\(return\|break\)/me=s+5
|
syn match csContextualStatement /\<yield[[:space:]\n]\+\(return\|break\)/me=s+5
|
||||||
syn match csContextualStatement /\<partial[[:space:]\n]\+\(class\|struct\|interface\)/me=s+7
|
syn match csContextualStatement /\<partial[[:space:]\n]\+\(class\|struct\|interface\)/me=s+7
|
||||||
@ -54,7 +48,7 @@ syn match csContextualStatement /\<where\>[^:]\+:/me=s+5
|
|||||||
"
|
"
|
||||||
" TODO: include strings ?
|
" TODO: include strings ?
|
||||||
"
|
"
|
||||||
syn keyword csTodo contained TODO FIXME XXX NOTE
|
syn keyword csTodo contained TODO FIXME XXX NOTE HACK
|
||||||
syn region csComment start="/\*" end="\*/" contains=@csCommentHook,csTodo,@Spell
|
syn region csComment start="/\*" end="\*/" contains=@csCommentHook,csTodo,@Spell
|
||||||
syn match csComment "//.*$" contains=@csCommentHook,csTodo,@Spell
|
syn match csComment "//.*$" contains=@csCommentHook,csTodo,@Spell
|
||||||
|
|
||||||
@ -87,8 +81,15 @@ syn region csPreCondit
|
|||||||
\ skip="\\$" end="$" contains=csComment keepend
|
\ skip="\\$" end="$" contains=csComment keepend
|
||||||
syn region csRegion matchgroup=csPreCondit start="^\s*#\s*region.*$"
|
syn region csRegion matchgroup=csPreCondit start="^\s*#\s*region.*$"
|
||||||
\ end="^\s*#\s*endregion" transparent fold contains=TOP
|
\ end="^\s*#\s*endregion" transparent fold contains=TOP
|
||||||
|
syn region csSummary start="^\s*/// <summary" end="^\(\s*///\)\@!" transparent fold keepend
|
||||||
|
|
||||||
|
|
||||||
|
syn region csClassType start="\(@\)\@<!class\>"hs=s+6 end="[:\n{]"he=e-1 contains=csClass
|
||||||
|
syn region csNewType start="\(@\)\@<!new\>"hs=s+4 end="[\(\<{\[]"he=e-1 contains=csNew contains=csNewType
|
||||||
|
syn region csIsType start="\v (is|as) "hs=s+4 end="\v[A-Za-z0-9]+" oneline contains=csIsAs
|
||||||
|
syn keyword csNew new contained
|
||||||
|
syn keyword csClass class contained
|
||||||
|
syn keyword csIsAs is as
|
||||||
|
|
||||||
" Strings and constants
|
" Strings and constants
|
||||||
syn match csSpecialError contained "\\."
|
syn match csSpecialError contained "\\."
|
||||||
@ -111,7 +112,11 @@ syn match csNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"
|
|||||||
|
|
||||||
" The default highlighting.
|
" The default highlighting.
|
||||||
hi def link csType Type
|
hi def link csType Type
|
||||||
|
hi def link csNewType Type
|
||||||
|
hi def link csClassType Type
|
||||||
|
hi def link csIsType Type
|
||||||
hi def link csStorage StorageClass
|
hi def link csStorage StorageClass
|
||||||
|
hi def link csClass StorageClass
|
||||||
hi def link csRepeat Repeat
|
hi def link csRepeat Repeat
|
||||||
hi def link csConditional Conditional
|
hi def link csConditional Conditional
|
||||||
hi def link csLabel Label
|
hi def link csLabel Label
|
||||||
@ -121,8 +126,13 @@ hi def link csException Exception
|
|||||||
hi def link csUnspecifiedStatement Statement
|
hi def link csUnspecifiedStatement Statement
|
||||||
hi def link csUnsupportedStatement Statement
|
hi def link csUnsupportedStatement Statement
|
||||||
hi def link csUnspecifiedKeyword Keyword
|
hi def link csUnspecifiedKeyword Keyword
|
||||||
|
hi def link csNew Statement
|
||||||
|
hi def link csLinq Statement
|
||||||
|
hi def link csIsAs Keyword
|
||||||
|
hi def link csAsync Keyword
|
||||||
hi def link csContextualStatement Statement
|
hi def link csContextualStatement Statement
|
||||||
hi def link csOperatorError Error
|
hi def link csOperatorError Error
|
||||||
|
hi def link csInterfaceDeclaration Include
|
||||||
|
|
||||||
hi def link csTodo Todo
|
hi def link csTodo Todo
|
||||||
hi def link csComment Comment
|
hi def link csComment Comment
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
" Maintainer: Debian Vim Maintainers
|
" Maintainer: Debian Vim Maintainers
|
||||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||||
" Wichert Akkerman <wakkerma@debian.org>
|
" Wichert Akkerman <wakkerma@debian.org>
|
||||||
" Last Change: 2018 Jan 06
|
" Last Change: 2018 May 03
|
||||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
|
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
|
||||||
|
|
||||||
" Standard syntax initialization
|
" Standard syntax initialization
|
||||||
if exists("b:current_syntax")
|
if exists('b:current_syntax')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ let s:binNMU='binary-only=yes'
|
|||||||
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
|
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
|
||||||
exe 'syn match debchangelogFirstKV contained "; \('.s:urgency.'\|'.s:binNMU.'\)"'
|
exe 'syn match debchangelogFirstKV contained "; \('.s:urgency.'\|'.s:binNMU.'\)"'
|
||||||
exe 'syn match debchangelogOtherKV contained ", \('.s:urgency.'\|'.s:binNMU.'\)"'
|
exe 'syn match debchangelogOtherKV contained ", \('.s:urgency.'\|'.s:binNMU.'\)"'
|
||||||
syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|%(wheezy|jessie)%(-backports%(-sloppy)=|-security)=|stretch%(-backports|-security)=|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty|artful|bionic)%(-%(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|jessie)%(-backports%(-sloppy)=|-security)=|stretch%(-backports|-security)=|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty|artful|bionic|cosmic)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
|
||||||
syn match debchangelogVersion contained "(.\{-})"
|
syn match debchangelogVersion contained "(.\{-})"
|
||||||
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
|
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
|
||||||
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
|
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
|
||||||
@ -46,6 +46,6 @@ hi def link debchangelogVersion Identifier
|
|||||||
hi def link debchangelogTarget Identifier
|
hi def link debchangelogTarget Identifier
|
||||||
hi def link debchangelogEmail Special
|
hi def link debchangelogEmail Special
|
||||||
|
|
||||||
let b:current_syntax = "debchangelog"
|
let b:current_syntax = 'debchangelog'
|
||||||
|
|
||||||
" vim: ts=8 sw=2
|
" vim: ts=8 sw=2
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
" Maintainer: Debian Vim Maintainers
|
" Maintainer: Debian Vim Maintainers
|
||||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||||
" Wichert Akkerman <wakkerma@debian.org>
|
" Wichert Akkerman <wakkerma@debian.org>
|
||||||
" Last Change: 2018 Jan 06
|
" Last Change: 2018 Jan 28
|
||||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcontrol.vim
|
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcontrol.vim
|
||||||
|
|
||||||
" Standard syntax initialization
|
" Standard syntax initialization
|
||||||
if exists("b:current_syntax")
|
if exists('b:current_syntax')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ hi def link debcontrolR3 Identifier
|
|||||||
hi def link debcontrolComment Comment
|
hi def link debcontrolComment Comment
|
||||||
hi def link debcontrolElse Special
|
hi def link debcontrolElse Special
|
||||||
|
|
||||||
let b:current_syntax = "debcontrol"
|
let b:current_syntax = 'debcontrol'
|
||||||
|
|
||||||
let &cpo = s:cpo_save
|
let &cpo = s:cpo_save
|
||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
|
33
runtime/syntax/debcopyright.vim
Normal file
33
runtime/syntax/debcopyright.vim
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
" Vim syntax file
|
||||||
|
" Language: Debian copyright file
|
||||||
|
" Maintainer: Debian Vim Maintainers
|
||||||
|
" Last Change: 2018 Feb 05
|
||||||
|
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcopyright.vim
|
||||||
|
|
||||||
|
" Standard syntax initialization
|
||||||
|
if exists('b:current_syntax')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
syn case match
|
||||||
|
|
||||||
|
syn match debcopyrightUrl "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"
|
||||||
|
syn match debcopyrightKey "^\%(Format\|Upstream-Name\|Upstream-Contact\|Disclaimer\|Source\|Comment\|Files\|Copyright\|License\): *"
|
||||||
|
syn match debcopyrightEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+"
|
||||||
|
syn match debcopyrightEmail "<.\{-}>"
|
||||||
|
syn match debcopyrightComment "^#.*$" contains=@Spell
|
||||||
|
|
||||||
|
hi def link debcopyrightUrl Identifier
|
||||||
|
hi def link debcopyrightKey Keyword
|
||||||
|
hi def link debcopyrightEmail Identifier
|
||||||
|
hi def link debcopyrightComment Comment
|
||||||
|
|
||||||
|
let b:current_syntax = 'debcopyright'
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
|
||||||
|
" vim: ts=8 sw=2
|
@ -2,11 +2,11 @@
|
|||||||
" Language: Debian sources.list
|
" Language: Debian sources.list
|
||||||
" Maintainer: Debian Vim Maintainers
|
" Maintainer: Debian Vim Maintainers
|
||||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||||
" Last Change: 2018 Jan 06
|
" Last Change: 2018 May 03
|
||||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
|
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
|
||||||
|
|
||||||
" Standard syntax initialization
|
" Standard syntax initialization
|
||||||
if exists("b:current_syntax")
|
if exists('b:current_syntax')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ let s:supported = [
|
|||||||
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
|
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
|
||||||
\ 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
|
\ 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
|
||||||
\
|
\
|
||||||
\ 'trusty', 'xenial', 'zesty', 'artful', 'bionic', 'devel'
|
\ 'trusty', 'xenial', 'artful', 'bionic', 'cosmic', 'devel'
|
||||||
\ ]
|
\ ]
|
||||||
let s:unsupported = [
|
let s:unsupported = [
|
||||||
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
|
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
|
||||||
@ -34,12 +34,12 @@ let s:unsupported = [
|
|||||||
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
|
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
|
||||||
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
|
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
|
||||||
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
|
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
|
||||||
\ 'utopic', 'vivid', 'wily', 'yakkety'
|
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty'
|
||||||
\ ]
|
\ ]
|
||||||
let &cpo=s:cpo
|
let &cpo=s:cpo
|
||||||
|
|
||||||
" Match uri's
|
" Match uri's
|
||||||
syn match debsourcesUri +\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++
|
syn match debsourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+'
|
||||||
exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:supported, '\|'). '\)\>\([-[:alnum:]_./]*\)+'
|
exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:supported, '\|'). '\)\>\([-[:alnum:]_./]*\)+'
|
||||||
exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:unsupported, '\|') .'\)\>\([-[:alnum:]_./]*\)+'
|
exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:unsupported, '\|') .'\)\>\([-[:alnum:]_./]*\)+'
|
||||||
|
|
||||||
@ -51,4 +51,4 @@ hi def link debsourcesUnsupportedDistrKeyword WarningMsg
|
|||||||
hi def link debsourcesComment Comment
|
hi def link debsourcesComment Comment
|
||||||
hi def link debsourcesUri Constant
|
hi def link debsourcesUri Constant
|
||||||
|
|
||||||
let b:current_syntax = "debsources"
|
let b:current_syntax = 'debsources'
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
" Maintainer: Daniel Kho <daniel.kho@tauhop.com>
|
" Maintainer: Daniel Kho <daniel.kho@tauhop.com>
|
||||||
" Previous Maintainer: Czo <Olivier.Sirol@lip6.fr>
|
" Previous Maintainer: Czo <Olivier.Sirol@lip6.fr>
|
||||||
" Credits: Stephan Hegel <stephan.hegel@snc.siemens.com.cn>
|
" Credits: Stephan Hegel <stephan.hegel@snc.siemens.com.cn>
|
||||||
" Last Changed: 2016 Mar 05 by Daniel Kho
|
" Last Changed: 2018 May 06 by Daniel Kho
|
||||||
|
|
||||||
" 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")
|
||||||
@ -43,6 +43,8 @@ syn keyword vhdlStatement sequence strong
|
|||||||
syn keyword vhdlStatement then to transport type
|
syn keyword vhdlStatement then to transport type
|
||||||
syn keyword vhdlStatement unaffected units until use
|
syn keyword vhdlStatement unaffected units until use
|
||||||
syn keyword vhdlStatement variable
|
syn keyword vhdlStatement variable
|
||||||
|
" VHDL-2017 interface
|
||||||
|
syn keyword vhdlStatement view
|
||||||
syn keyword vhdlStatement vmode vprop vunit
|
syn keyword vhdlStatement vmode vprop vunit
|
||||||
syn keyword vhdlStatement wait when while with
|
syn keyword vhdlStatement wait when while with
|
||||||
syn keyword vhdlStatement note warning error failure
|
syn keyword vhdlStatement note warning error failure
|
||||||
@ -69,9 +71,7 @@ syn match vhdlType "\<time_vector\>\'\="
|
|||||||
|
|
||||||
syn match vhdlType "\<character\>\'\="
|
syn match vhdlType "\<character\>\'\="
|
||||||
syn match vhdlType "\<string\>\'\="
|
syn match vhdlType "\<string\>\'\="
|
||||||
"syn keyword vhdlType severity_level
|
syn keyword vhdlType line text side width
|
||||||
syn keyword vhdlType line
|
|
||||||
syn keyword vhdlType text
|
|
||||||
|
|
||||||
" Predefined standard IEEE VHDL types
|
" Predefined standard IEEE VHDL types
|
||||||
syn match vhdlType "\<std_ulogic\>\'\="
|
syn match vhdlType "\<std_ulogic\>\'\="
|
||||||
@ -124,6 +124,8 @@ syn match vhdlAttribute "\'succ"
|
|||||||
syn match vhdlAttribute "\'val"
|
syn match vhdlAttribute "\'val"
|
||||||
syn match vhdlAttribute "\'image"
|
syn match vhdlAttribute "\'image"
|
||||||
syn match vhdlAttribute "\'value"
|
syn match vhdlAttribute "\'value"
|
||||||
|
" VHDL-2017 interface attribute
|
||||||
|
syn match vhdlAttribute "\'converse"
|
||||||
|
|
||||||
syn keyword vhdlBoolean true false
|
syn keyword vhdlBoolean true false
|
||||||
|
|
||||||
@ -165,6 +167,9 @@ syn match vhdlOperator "=\|\/=\|>\|<\|>="
|
|||||||
syn match vhdlOperator "<=\|:="
|
syn match vhdlOperator "<=\|:="
|
||||||
syn match vhdlOperator "=>"
|
syn match vhdlOperator "=>"
|
||||||
|
|
||||||
|
" VHDL-2017 concurrent signal association (spaceship) operator
|
||||||
|
syn match vhdlOperator "<=>"
|
||||||
|
|
||||||
" VHDL-2008 conversion, matching equality/non-equality operators
|
" VHDL-2008 conversion, matching equality/non-equality operators
|
||||||
syn match vhdlOperator "??\|?=\|?\/=\|?<\|?<=\|?>\|?>="
|
syn match vhdlOperator "??\|?=\|?\/=\|?<\|?<=\|?>\|?>="
|
||||||
|
|
||||||
@ -183,8 +188,11 @@ syn match vhdlError "\(<\)[&+\-\/\\]\+"
|
|||||||
syn match vhdlError "[>=&+\-\/\\]\+\(<\)"
|
syn match vhdlError "[>=&+\-\/\\]\+\(<\)"
|
||||||
" Covers most operators
|
" Covers most operators
|
||||||
" support negative sign after operators. E.g. q<=-b;
|
" support negative sign after operators. E.g. q<=-b;
|
||||||
syn match vhdlError "\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<=\|?>=\|>=\|<=\|:=\|=>\)[<>=&+\*\\?:]\+"
|
" Supports VHDL-2017 spaceship (concurrent simple signal association).
|
||||||
syn match vhdlError "[<>=&+\-\*\\:]\+\(&\|+\|\*\*\|\/=\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|>=\|<=\|:=\|=>\)"
|
syn match vhdlError "\(<=\)[<=&+\*\\?:]\+"
|
||||||
|
syn match vhdlError "[>=&+\-\*\\:]\+\(=>\)"
|
||||||
|
syn match vhdlError "\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<=\|?>=\|>=\|:=\|=>\)[<>=&+\*\\?:]\+"
|
||||||
|
syn match vhdlError "[<>=&+\-\*\\:]\+\(&\|+\|\*\*\|\/=\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|>=\|<=\|:=\)"
|
||||||
syn match vhdlError "\(?<\|?>\)[<>&+\*\/\\?:]\+"
|
syn match vhdlError "\(?<\|?>\)[<>&+\*\/\\?:]\+"
|
||||||
syn match vhdlError "\(<<\|>>\)[<>&+\*\/\\?:]\+"
|
syn match vhdlError "\(<<\|>>\)[<>&+\*\/\\?:]\+"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user