mirror of
https://github.com/gryf/.vim.git
synced 2026-03-21 12:03:31 +01:00
Update plugins: ctrl_p, syntastic, tagbar, taglisttoo and mark.
Added skeleton to make autocompletion for kickassembler.
This commit is contained in:
@@ -45,6 +45,7 @@ let s:icon_open = g:tagbar_iconchars[1]
|
||||
|
||||
let s:type_init_done = 0
|
||||
let s:autocommands_done = 0
|
||||
let s:autocommands_enabled = 0
|
||||
" 0: not checked yet; 1: checked and found; 2: checked and not found
|
||||
let s:checked_ctags = 0
|
||||
let s:checked_ctags_types = 0
|
||||
@@ -60,7 +61,7 @@ let s:window_expanded = 0
|
||||
let s:compare_typeinfo = {}
|
||||
|
||||
|
||||
let s:access_symbols = {
|
||||
let s:visibility_symbols = {
|
||||
\ 'public' : '+',
|
||||
\ 'protected' : '#',
|
||||
\ 'private' : '-'
|
||||
@@ -971,6 +972,19 @@ function! s:CreateAutocommands() abort
|
||||
augroup END
|
||||
|
||||
let s:autocommands_done = 1
|
||||
let s:autocommands_enabled = 1
|
||||
endfunction
|
||||
|
||||
" s:PauseAutocommands() {{{2
|
||||
" Toggle autocommands
|
||||
function! s:PauseAutocommands() abort
|
||||
if s:autocommands_enabled == 1
|
||||
autocmd! TagbarAutoCmds
|
||||
let s:autocommands_enabled = 0
|
||||
else
|
||||
call s:CreateAutocommands()
|
||||
call s:AutoUpdate(fnamemodify(expand('%'), ':p'), 0)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" s:CheckForExCtags() {{{2
|
||||
@@ -1193,10 +1207,13 @@ function! s:BaseTag._getPrefix() abort dict
|
||||
else
|
||||
let prefix = ' '
|
||||
endif
|
||||
if has_key(self.fields, 'access')
|
||||
let prefix .= get(s:access_symbols, self.fields.access, ' ')
|
||||
else
|
||||
let prefix .= ' '
|
||||
" Visibility is called 'access' in the ctags output
|
||||
if g:tagbar_show_visibility
|
||||
if has_key(self.fields, 'access')
|
||||
let prefix .= get(s:visibility_symbols, self.fields.access, ' ')
|
||||
else
|
||||
let prefix .= ' '
|
||||
endif
|
||||
endif
|
||||
|
||||
return prefix
|
||||
@@ -2499,7 +2516,10 @@ function! s:PrintKinds(typeinfo, fileinfo) abort
|
||||
" only if they are not scope-defining tags (since
|
||||
" those already have an identifier)
|
||||
if !has_key(a:typeinfo.kind2scope, ckind.short)
|
||||
silent put =repeat(' ', g:tagbar_indent + 2) .
|
||||
let indent = g:tagbar_indent
|
||||
let indent += g:tagbar_show_visibility
|
||||
let indent += 1 " fold symbol
|
||||
silent put =repeat(' ', indent) .
|
||||
\ '[' . ckind.long . ']'
|
||||
" Add basic tag to allow folding when on the
|
||||
" header line
|
||||
@@ -2532,10 +2552,11 @@ function! s:PrintKinds(typeinfo, fileinfo) abort
|
||||
let foldmarker = s:icon_open
|
||||
endif
|
||||
|
||||
let padding = g:tagbar_show_visibility ? ' ' : ''
|
||||
if g:tagbar_compact && first_tag && s:short_help
|
||||
silent 0put =foldmarker . ' ' . kind.long
|
||||
silent 0put =foldmarker . padding . kind.long
|
||||
else
|
||||
silent put =foldmarker . ' ' . kind.long
|
||||
silent put =foldmarker . padding . kind.long
|
||||
endif
|
||||
|
||||
let curline = line('.')
|
||||
@@ -2586,7 +2607,10 @@ function! s:PrintTag(tag, depth, fileinfo, typeinfo) abort
|
||||
" are not scope-defining tags (since those already have an
|
||||
" identifier)
|
||||
if !has_key(a:typeinfo.kind2scope, ckind.short)
|
||||
silent put =repeat(' ', (a:depth + 1) * g:tagbar_indent + 2)
|
||||
let indent = g:tagbar_indent
|
||||
let indent += g:tagbar_show_visibility
|
||||
let indent += 1 " fold symbol
|
||||
silent put =repeat(' ', (a:depth + 1) * indent)
|
||||
\ . '[' . ckind.long . ']'
|
||||
" Add basic tag to allow folding when on the header line
|
||||
let headertag = s:BaseTag.New(ckind.long)
|
||||
@@ -3455,6 +3479,11 @@ endfunction
|
||||
function! tagbar#RestoreSession() abort
|
||||
call s:RestoreSession()
|
||||
endfunction
|
||||
|
||||
function! tagbar#PauseAutocommands() abort
|
||||
call s:PauseAutocommands()
|
||||
endfunction
|
||||
|
||||
" }}}2
|
||||
|
||||
" tagbar#getusertypes() {{{2
|
||||
|
||||
@@ -61,7 +61,7 @@ Then Tagbar would display the tag information like so:
|
||||
<
|
||||
This example shows several important points. First, the tags are listed
|
||||
indented below the scope they are defined in. Second, the type of a scope is
|
||||
listed after its name and a colon. Third, tags for which the access/visibility
|
||||
listed after its name and a colon. Third, tags for which the visibility
|
||||
information is known are prefixed with a symbol indicating that.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
@@ -194,6 +194,13 @@ You can also use |:TagbarOpenAutoClose| to open the Tagbar window, jump to it
|
||||
and have it close automatically on tag selection regardless of the
|
||||
|g:tagbar_autoclose| setting.
|
||||
|
||||
Pausing the Tagbar window~
|
||||
Use |:TagbarTogglePause| to toggle freezing the Tagbar window on its currently
|
||||
displayed file. Freezing the window stops the Tagbar contents from changing
|
||||
when switching to a different source file. All Tagbar functionality continues
|
||||
to work as expected. Unfreezing the window will cause it to load the current
|
||||
source file.
|
||||
|
||||
Jumping to tags~
|
||||
When you're inside the Tagbar window you can jump to the definition of a tag
|
||||
by moving the cursor to a tag and pressing <Enter> or double-clicking on it
|
||||
@@ -260,6 +267,10 @@ COMMANDS *tagbar-commands*
|
||||
Open the Tagbar window, jump to it and close it on tag selection. This is
|
||||
an alias for ":TagbarOpen fjc".
|
||||
|
||||
:TagbarTogglePause *:TagbarTogglePause*
|
||||
Freezes/Unfreezes the Tagbar window. Stops the contents of the window
|
||||
from changing when a different source file is selected.
|
||||
|
||||
:TagbarSetFoldlevel[!] {number} *:TagbarSetFoldlevel*
|
||||
Set the foldlevel of the tags of the current file to {number}. The
|
||||
foldlevel of tags in other files remains unaffected. Works in the same way
|
||||
@@ -420,6 +431,18 @@ Example:
|
||||
let g:tagbar_indent = 1
|
||||
<
|
||||
|
||||
*g:tagbar_show_visibility*
|
||||
g:tagbar_show_visibility~
|
||||
Default: 1
|
||||
|
||||
Show the visibility symbols (public/protected/private) to the left of the tag
|
||||
name.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_show_visibility = 0
|
||||
<
|
||||
|
||||
*g:tagbar_expand*
|
||||
g:tagbar_expand~
|
||||
Default: 0
|
||||
@@ -545,14 +568,14 @@ TagbarFoldIcon
|
||||
TagbarHighlight
|
||||
The colour that is used for automatically highlighting the current tag.
|
||||
|
||||
TagbarAccessPublic
|
||||
The "public" visibility/access symbol.
|
||||
TagbarVisibilityPublic
|
||||
The "public" visibility symbol.
|
||||
|
||||
TagbarAccessProtected
|
||||
The "protected" visibility/access symbol.
|
||||
TagbarVisibilityProtected
|
||||
The "protected" visibility symbol.
|
||||
|
||||
TagbarAccessPrivate
|
||||
The "private" visibility/access symbol.
|
||||
TagbarVisibilityPrivate
|
||||
The "private" visibility symbol.
|
||||
|
||||
If you want to change any of those colours put a line like the following in
|
||||
your vimrc:
|
||||
@@ -954,9 +977,9 @@ imporant tips to get it to integrate well with Tagbar:
|
||||
* line: The line number of the tag.
|
||||
* column: The column number of the tag.
|
||||
* signature: The signature of a function.
|
||||
* access: Visibility/access information of a tag; the values
|
||||
"public", "protected" and "private" will be denoted with
|
||||
a special symbol in Tagbar.
|
||||
* access: Visibility information of a tag; the values "public",
|
||||
"protected" and "private" will be denoted with a special
|
||||
symbol in Tagbar.
|
||||
|
||||
In addition fields that describe the surrounding scope of the tag are
|
||||
supported if they are specified in the type configuration as explained at
|
||||
@@ -1172,6 +1195,7 @@ Seth Milliken
|
||||
Kien N
|
||||
pielgrzym
|
||||
Taybin Rutkin
|
||||
Kian Ryan
|
||||
Ville Valkonen
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -70,6 +70,10 @@ if !exists('g:tagbar_indent')
|
||||
let g:tagbar_indent = 2
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_show_visibility')
|
||||
let g:tagbar_show_visibility = 1
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_expand')
|
||||
let g:tagbar_expand = 0
|
||||
endif
|
||||
@@ -115,6 +119,7 @@ command! -nargs=? TagbarCurrentTag echo tagbar#currenttag('%s', 'No current t
|
||||
command! -nargs=1 TagbarGetTypeConfig call tagbar#gettypeconfig(<f-args>)
|
||||
command! -nargs=? TagbarDebug call tagbar#StartDebug(<f-args>)
|
||||
command! -nargs=0 TagbarDebugEnd call tagbar#StopDebug()
|
||||
command! -nargs=0 TagbarTogglePause call tagbar#PauseAutocommands()
|
||||
|
||||
" Modeline {{{1
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
|
||||
@@ -20,21 +20,21 @@ if s:io =~ '[]^\\-]'
|
||||
let s:io = '\' . s:io
|
||||
endif
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . '] \)\@<=[^-+: ]\+[^:]\+$'
|
||||
let s:pattern = '\([' . s:ic . s:io . '] \?\)\@<=[^-+: ]\+[^:]\+$'
|
||||
execute "syntax match TagbarKind '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . '][-+# ]\)\@<=[^*]\+\(\*\?\(([^)]\+)\)\? :\)\@='
|
||||
let s:pattern = '\([' . s:ic . s:io . '][-+# ]\?\)\@<=[^*(]\+\(\*\?\(([^)]\+)\)\? :\)\@='
|
||||
execute "syntax match TagbarScope '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '[' . s:ic . s:io . ']\([-+# ]\)\@='
|
||||
let s:pattern = '[' . s:ic . s:io . ']\([-+# ]\?\)\@='
|
||||
execute "syntax match TagbarFoldIcon '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=+\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarAccessPublic '" . s:pattern . "'"
|
||||
execute "syntax match TagbarVisibilityPublic '" . s:pattern . "'"
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=#\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarAccessProtected '" . s:pattern . "'"
|
||||
execute "syntax match TagbarVisibilityProtected '" . s:pattern . "'"
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=-\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarAccessPrivate '" . s:pattern . "'"
|
||||
execute "syntax match TagbarVisibilityPrivate '" . s:pattern . "'"
|
||||
|
||||
unlet s:pattern
|
||||
|
||||
@@ -57,6 +57,9 @@ highlight default link TagbarHighlight Search
|
||||
highlight default TagbarAccessPublic guifg=Green ctermfg=Green
|
||||
highlight default TagbarAccessProtected guifg=Blue ctermfg=Blue
|
||||
highlight default TagbarAccessPrivate guifg=Red ctermfg=Red
|
||||
highlight default link TagbarVisibilityPublic TagbarAccessPublic
|
||||
highlight default link TagbarVisibilityProtected TagbarAccessProtected
|
||||
highlight default link TagbarVisibilityPrivate TagbarAccessPrivate
|
||||
|
||||
let b:current_syntax = "tagbar"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user