1
0
mirror of https://github.com/gryf/.vim.git synced 2025-12-17 19:40:29 +01:00

Update plugins: ctrl_p, syntastic, tagbar, taglisttoo and mark.

Added skeleton to make autocompletion for kickassembler.
This commit is contained in:
2012-11-25 15:55:59 +01:00
parent 6fcf232124
commit bc4032accb
50 changed files with 1679 additions and 153 deletions

View File

@@ -7,7 +7,7 @@ ScriptID SourceID Filename
3304 18081 gundo.vim
2727 11120 jsbeautify.vim
2289 8922 loremipsum
2666 18598 Mark
2666 18811 Mark
1218 14455 nerdcommenter
2262 8944 occur.vim
2136 8206 repeat.vim

View File

@@ -273,7 +273,7 @@ fu! s:Close()
if exists('s:glb_acd') | let &acd = s:glb_acd | en
let g:ctrlp_lines = []
if s:winres[1] >= &lines && s:winres[2] == winnr('$')
exe s:winres[0]
exe s:winres[0].s:winres[0]
en
unl! s:focus s:hisidx s:hstgot s:marked s:statypes s:cline s:init s:savestr
\ s:mrbs s:did_exp
@@ -2054,7 +2054,7 @@ fu! ctrlp#hicheck(grp, defgrp)
endf
fu! ctrlp#call(func, ...)
cal call(a:func, a:000)
retu call(a:func, a:000)
endf
"}}}1
" * Initialization {{{1

View File

@@ -14,6 +14,7 @@ fu! ctrlp#mrufiles#opts()
\ 'exclude': ['s:ex', ''],
\ 'case_sensitive': ['s:cseno', 1],
\ 'relative': ['s:re', 0],
\ 'save_on_update': ['s:soup', 1],
\ }]
for [ke, va] in items(opts)
let [{va[0]}, {pref.ke}] = [pref.ke, exists(pref.ke) ? {pref.ke} : va[1]]
@@ -62,8 +63,14 @@ fu! s:addtomrufs(fname)
if ( !empty({s:in}) && fn !~# {s:in} ) || ( !empty({s:ex}) && fn =~# {s:ex} )
\ || !empty(getbufvar('^'.fn.'$', '&bt')) || !filereadable(fn) | retu
en
if ( {s:cseno} && get(s:mrufs, 0, '') !=# fn )
\ || ( !{s:cseno} && get(s:mrufs, 0, '') !=? fn )
cal filter(s:mrufs, 'v:val !='.( {s:cseno} ? '#' : '?' ).' fn')
cal insert(s:mrufs, fn)
if {s:soup}
cal s:savetofile(s:mergelists())
en
en
endf
fu! s:savetofile(mrufs)
@@ -118,7 +125,7 @@ fu! ctrlp#mrufiles#init()
let s:locked = 0
aug CtrlPMRUF
au!
au BufAdd,BufEnter,BufLeave,BufUnload * cal s:record(expand('<abuf>', 1))
au BufAdd,BufEnter,BufLeave,BufWritePost * cal s:record(expand('<abuf>', 1))
au QuickFixCmdPre *vimgrep* let s:locked = 1
au QuickFixCmdPost *vimgrep* let s:locked = 0
au VimLeavePre * cal s:savetofile(s:mergelists())

View File

@@ -75,6 +75,7 @@ Overview:~
|ctrlp_mruf_relative|.........Show only MRU files in the working directory.
|ctrlp_mruf_default_order|....Disable sorting.
|ctrlp_mruf_case_sensitive|...MRU files are case sensitive or not.
|ctrlp_mruf_save_on_update|...Save the list to disk whenever it's updated.
Advanced options:
|ctrlp_open_func|.............Use custom file opening functions.
@@ -574,6 +575,12 @@ MRU entries: >
let g:ctrlp_mruf_case_sensitive = 1
<
*'g:ctrlp_mruf_save_on_update'*
Set this to 0 to disable saving of the MRU list to disk whenever the list is
updated, saving will then only occur when exiting Vim: >
let g:ctrlp_mruf_save_on_update = 1
<
----------------------------------------
Advanced options:~
@@ -1241,6 +1248,7 @@ Special thanks:~
* Lowe Thiderman <github.com/thiderman>
* Christopher Fredén <github.com/icetan>
* Zahary Karadjov <github.com/zah>
* Jo De Boeck <github.com/grimpy>
===============================================================================
CHANGELOG *ctrlp-changelog*
@@ -1248,7 +1256,8 @@ CHANGELOG *ctrlp-changelog*
+ New options: |g:ctrlp_abbrev|,
|g:ctrlp_key_loop|,
|g:ctrlp_open_func|,
|g:ctrlp_tabpage_position|
|g:ctrlp_tabpage_position|,
|g:ctrlp_mruf_save_on_update|
+ Rename:
*g:ctrlp_dotfiles* -> |g:ctrlp_show_hidden|.
+ Change |g:ctrlp_switch_buffer|'s and |g:ctrlp_working_path_mode|'s type

View File

@@ -0,0 +1,13 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

View File

@@ -2,7 +2,7 @@
/ \,,_ .'|
,{{| /}}}}/_.' _____________________________________________
}}}}` '{{' '. / \
{{{{{ _ ;, \ / Gentlemen, \
{{{{{ _ ;, \ / Ladies and Gentlemen, \
,}}}}}} /o`\ ` ;) | |
{{{{{{ / ( | this is ... |
}}}}}} | \ | |

View File

@@ -0,0 +1,18 @@
if exists("g:loaded_syntastic_util_autoload")
finish
endif
let g:loaded_syntastic_util_autoload = 1
let s:save_cpo = &cpo
set cpo&vim
function! syntastic#util#DevNull()
if has('win32')
return 'NUL'
endif
return '/dev/null'
endfunction
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:

View File

@@ -274,7 +274,7 @@ this option has the following effects:
Default: [Syntax: line:%F (%t)]
Use this option to control what the syntastic statusline text contains. Several
magic flags are availble to insert information:
magic flags are available to insert information:
%e - number of errors
%w - number of warnings
%t - total number of warnings and errors

View File

@@ -55,9 +55,8 @@ if !exists("g:syntastic_enable_highlighting")
endif
" highlighting requires getmatches introduced in 7.1.040
if g:syntastic_enable_highlighting == 1 &&
\ (v:version < 701 || v:version == 701 && has('patch040'))
let g:syntastic_enable_highlighting = 1
if v:version < 701 || (v:version == 701 && !has('patch040'))
let g:syntastic_enable_highlighting = 0
endif
if !exists("g:syntastic_echo_current_error")
@@ -439,7 +438,10 @@ function! s:WideMsg(msg)
let old_ruler = &ruler
let old_showcmd = &showcmd
let msg = strpart(a:msg, 0, winwidth(0)-1)
"convert tabs to spaces so that the tabs count towards the window width
"as the proper amount of characters
let msg = substitute(a:msg, "\t", repeat(" ", &tabstop), "g")
let msg = strpart(msg, 0, winwidth(0)-1)
"This is here because it is possible for some error messages to begin with
"\n which will cause a "press enter" prompt. I have noticed this in the
@@ -486,10 +488,11 @@ endfunction
"the script changes &shellpipe and &shell to stop the screen flicking when
"shelling out to syntax checkers. Not all OSs support the hacks though
function! s:OSSupportsShellpipeHack()
if !exists("s:os_supports_shellpipe_hack")
let s:os_supports_shellpipe_hack = !s:running_windows && (s:uname() !~ "FreeBSD") && (s:uname() !~ "OpenBSD")
endif
return s:os_supports_shellpipe_hack
return !s:running_windows && (s:uname() !~ "FreeBSD") && (s:uname() !~ "OpenBSD")
endfunction
function! s:IsRedrawRequiredAfterMake()
return !s:running_windows && (s:uname() =~ "FreeBSD" || s:uname() =~ "OpenBSD")
endfunction
function! s:uname()
@@ -610,7 +613,7 @@ function! SyntasticMake(options)
let &shellpipe=old_shellpipe
let &shell=old_shell
if s:OSSupportsShellpipeHack()
if s:IsRedrawRequiredAfterMake()
redraw!
endif

View File

@@ -0,0 +1,132 @@
"============================================================================
"File: ada.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Alfredo Di Napoli <alfredo.dinapoli@gmail.com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law.
"
"============================================================================
" in order to also check header files add this to your .vimrc:
" (this usually creates a .gch file in your source directory)
"
" let g:syntastic_ada_check_header = 1
"
" To disable the search of included header files after special
" libraries like gtk and glib add this line to your .vimrc:
"
" let g:syntastic_ada_no_include_search = 1
"
" In order to add some custom include directories that should be added to the
" gcc command line you can add those to the global variable
" g:syntastic_ada_include_dirs. This list can be used like this:
"
" let g:syntastic_ada_include_dirs = [ 'includes', 'headers' ]
"
" To enable header files being re-checked on every file write add the
" following line to your .vimrc. Otherwise the header files are checked only
" one time on initially loading the file.
" In order to force syntastic to refresh the header includes simply
" unlet b:syntastic_ada_includes. Then the header files are being re-checked
" on the next file write.
"
" let g:syntastic_ada_auto_refresh_includes = 1
"
" Alternatively you can set the buffer local variable b:syntastic_ada_cflags.
" If this variable is set for the current buffer no search for additional
" libraries is done. I.e. set the variable like this:
"
" let b:syntastic_ada_cflags = ' -I/usr/include/libsoup-2.4'
"
" Moreover it is possible to add additional compiler options to the syntax
" checking execution via the variable 'g:syntastic_ada_compiler_options':
"
" let g:syntastic_ada_compiler_options = ' -std=c++0x'
"
" Additionally the setting 'g:syntastic_ada_config_file' allows you to define
" a file that contains additional compiler arguments like include directories
" or CFLAGS. The file is expected to contain one option per line. If none is
" given the filename defaults to '.syntastic_ada_config':
"
" let g:syntastic_ada_config_file = '.config'
"
" Using the global variable 'g:syntastic_ada_remove_include_errors' you can
" specify whether errors of files included via the
" g:syntastic_ada_include_dirs' setting are removed from the result set:
"
" let g:syntastic_ada_remove_include_errors = 1
if exists('loaded_ada_syntax_checker')
finish
endif
let loaded_ada_syntax_checker = 1
if !executable('gcc')
finish
endif
let s:save_cpo = &cpo
set cpo&vim
if !exists('g:syntastic_ada_config_file')
let g:syntastic_ada_config_file = '.syntastic_ada_config'
endif
function! SyntaxCheckers_ada_GetLocList()
let makeprg = 'gcc -c -fsyntax-only '
let errorformat = '%-G%f:%s:,%f:%l:%c: %m,%f:%l: %m'
if exists('g:syntastic_ada_compiler_options')
let makeprg .= g:syntastic_ada_compiler_options
endif
let makeprg .= ' ' . shellescape(expand('%')) .
\ ' ' . syntastic#c#GetIncludeDirs('ada')
if expand('%') =~? '\%(.h\|.hpp\|.hh\)$'
if exists('g:syntastic_ada_check_header')
let makeprg = 'g++ -c '.shellescape(expand('%')).
\ ' ' . syntastic#c#GetIncludeDirs('ada')
else
return []
endif
endif
if !exists('b:syntastic_ada_cflags')
if !exists('g:syntastic_ada_no_include_search') ||
\ g:syntastic_ada_no_include_search != 1
if exists('g:syntastic_ada_auto_refresh_includes') &&
\ g:syntastic_ada_auto_refresh_includes != 0
let makeprg .= syntastic#c#SearchHeaders()
else
if !exists('b:syntastic_ada_includes')
let b:syntastic_ada_includes = syntastic#c#SearchHeaders()
endif
let makeprg .= b:syntastic_ada_includes
endif
endif
else
let makeprg .= b:syntastic_ada_cflags
endif
" add optional config file parameters
let makeprg .= ' ' . syntastic#c#ReadConfig(g:syntastic_ada_config_file)
" process makeprg
let errors = SyntasticMake({ 'makeprg': makeprg,
\ 'errorformat': errorformat })
" filter the processed errors if desired
if exists('g:syntastic_ada_remove_include_errors') &&
\ g:syntastic_ada_remove_include_errors != 0
return filter(errors,
\ 'has_key(v:val, "bufnr") && v:val["bufnr"]=='.bufnr(''))
else
return errors
endif
endfunction
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:

View File

@@ -0,0 +1,35 @@
"============================================================================
"File: checkpatch.vim
"Description: Syntax checking plugin for syntastic.vim using checkpatch.pl
"Maintainer: Daniel Walker <dwalker at fifo99 dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"============================================================================
if exists("loaded_checkpatch_syntax_checker")
finish
endif
let loaded_checkpatch_syntax_checker = 1
" Bail if the user doesn't have `checkpatch.pl` or ./scripts/checkpatch.pl installed.
if executable("checkpatch.pl")
let g:syntastic_c_checker_checkpatch_location = 'checkpatch.pl'
elseif executable("./scripts/checkpatch.pl")
let g:syntastic_c_checker_checkpatch_location = './scripts/checkpatch.pl'
else
finish
endif
function! SyntaxCheckers_c_GetLocList()
let makeprg = g:syntastic_c_checker_checkpatch_location
let makeprg .= " --no-summary --no-tree --terse --file ".shellescape(expand('%'))
let errorformat = '%f:%l: %tARNING: %m,%f:%l: %tRROR: %m'
let loclist = SyntasticMake({ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'defaults': {'bufnr': bufnr("")} })
return loclist
endfunction

View File

@@ -0,0 +1,159 @@
"============================================================================
"File: c.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Gregor Uhlenheuer <kongo2002 at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
" In order to also check header files add this to your .vimrc:
"
" let g:syntastic_c_check_header = 1
"
" To disable the search of included header files after special
" libraries like gtk and glib add this line to your .vimrc:
"
" let g:syntastic_c_no_include_search = 1
"
" To enable header files being re-checked on every file write add the
" following line to your .vimrc. Otherwise the header files are checked only
" one time on initially loading the file.
" In order to force syntastic to refresh the header includes simply
" unlet b:syntastic_c_includes. Then the header files are being re-checked on
" the next file write.
"
" let g:syntastic_c_auto_refresh_includes = 1
"
" Alternatively you can set the buffer local variable b:syntastic_c_cflags.
" If this variable is set for the current buffer no search for additional
" libraries is done. I.e. set the variable like this:
"
" let b:syntastic_c_cflags = ' -I/usr/include/libsoup-2.4'
"
" In order to add some custom include directories that should be added to the
" gcc command line you can add those to the global variable
" g:syntastic_c_include_dirs. This list can be used like this:
"
" let g:syntastic_c_include_dirs = [ 'includes', 'headers' ]
"
" Moreover it is possible to add additional compiler options to the syntax
" checking execution via the variable 'g:syntastic_c_compiler_options':
"
" let g:syntastic_c_compiler_options = ' -ansi'
"
" Additionally the setting 'g:syntastic_c_config_file' allows you to define a
" file that contains additional compiler arguments like include directories or
" CFLAGS. The file is expected to contain one option per line. If none is
" given the filename defaults to '.syntastic_c_config':
"
" let g:syntastic_c_config_file = '.config'
"
" Using the global variable 'g:syntastic_c_remove_include_errors' you can
" specify whether errors of files included via the g:syntastic_c_include_dirs'
" setting are removed from the result set:
"
" let g:syntastic_c_remove_include_errors = 1
"
" Use the variable 'g:syntastic_c_errorformat' to override the default error
" format:
"
" let g:syntastic_c_errorformat = '%f:%l:%c: %trror: %m'
if exists('loaded_gcc_syntax_checker')
finish
endif
let loaded_gcc_syntax_checker = 1
if !executable('gcc')
finish
endif
let s:save_cpo = &cpo
set cpo&vim
if !exists('g:syntastic_c_compiler_options')
let g:syntastic_c_compiler_options = '-std=gnu99'
endif
if !exists('g:syntastic_c_config_file')
let g:syntastic_c_config_file = '.syntastic_c_config'
endif
function! SyntaxCheckers_c_GetLocList()
let makeprg = 'gcc -fsyntax-only '
let errorformat = '%-G%f:%s:,%-G%f:%l: %#error: %#(Each undeclared '.
\ 'identifier is reported only%.%#,%-G%f:%l: %#error: %#for '.
\ 'each function it appears%.%#,%-GIn file included%.%#,'.
\ '%-G %#from %f:%l\,,%f:%l:%c: %trror: %m,%f:%l:%c: '.
\ '%tarning: %m,%f:%l:%c: %m,%f:%l: %trror: %m,'.
\ '%f:%l: %tarning: %m,%f:%l: %m'
if exists('g:syntastic_c_errorformat')
let errorformat = g:syntastic_c_errorformat
endif
" add optional user-defined compiler options
let makeprg .= g:syntastic_c_compiler_options
let makeprg .= ' '.shellescape(expand('%')).
\ ' '.syntastic#c#GetIncludeDirs('c')
" determine whether to parse header files as well
if expand('%') =~? '.h$'
if exists('g:syntastic_c_check_header')
let makeprg = 'gcc -c '.shellescape(expand('%')) .
\ ' ' . g:syntastic_c_compiler_options .
\ ' ' . syntastic#c#GetNullDevice() .
\ ' ' . syntastic#c#GetIncludeDirs('c')
else
return []
endif
endif
" check if the user manually set some cflags
if !exists('b:syntastic_c_cflags')
" check whether to search for include files at all
if !exists('g:syntastic_c_no_include_search') ||
\ g:syntastic_c_no_include_search != 1
" refresh the include file search if desired
if exists('g:syntastic_c_auto_refresh_includes') &&
\ g:syntastic_c_auto_refresh_includes != 0
let makeprg .= syntastic#c#SearchHeaders()
else
" search for header includes if not cached already
if !exists('b:syntastic_c_includes')
let b:syntastic_c_includes = syntastic#c#SearchHeaders()
endif
let makeprg .= b:syntastic_c_includes
endif
endif
else
" use the user-defined cflags
let makeprg .= b:syntastic_c_cflags
endif
" add optional config file parameters
let makeprg .= ' '.syntastic#c#ReadConfig(g:syntastic_c_config_file)
" process makeprg
let errors = SyntasticMake({ 'makeprg': makeprg,
\ 'errorformat': errorformat })
" filter the processed errors if desired
if exists('g:syntastic_c_remove_include_errors') &&
\ g:syntastic_c_remove_include_errors != 0
return filter(errors,
\ 'has_key(v:val, "bufnr") && v:val["bufnr"]=='.bufnr(''))
else
return errors
endif
endfunction
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:

View File

@@ -0,0 +1,34 @@
"============================================================================
"File: sparse.vim
"Description: Syntax checking plugin for syntastic.vim using sparse.pl
"Maintainer: Daniel Walker <dwalker at fifo99 dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"============================================================================
if exists("loaded_sparse_syntax_checker")
finish
endif
let loaded_sparse_syntax_checker = 1
" Bail if the user doesn't have `sparse.pl` or ./scripts/checkpatch.pl installed.
if !executable("sparse")
finish
endif
function! SyntaxCheckers_c_GetLocList()
let makeprg = "sparse "
let makeprg .= ' '.syntastic#c#ReadConfig(g:syntastic_sparse_config_file).' '
let makeprg .= shellescape(expand('%'))
let errorformat = '%f:%l:%c: %trror: %m,%f:%l:%c: %tarning: %m,'
let loclist = SyntasticMake({ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'defaults': {'bufnr': bufnr("")} })
return loclist
endfunction

View File

@@ -0,0 +1,27 @@
"============================================================================
"File: co.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Andrew Kelley <superjoe30@gmail.com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
if exists("loaded_co_syntax_checker")
finish
endif
let loaded_co_syntax_checker = 1
"bail if the user doesnt have coco installed
if !executable("coco")
finish
endif
function! SyntaxCheckers_co_GetLocList()
let makeprg = 'coco -c -o /tmp '.shellescape(expand('%'))
let errorformat = '%EFailed at: %f,%ZSyntax%trror: %m on line %l,%EFailed at: %f,%Z%trror: Parse error on line %l: %m'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction

View File

@@ -0,0 +1,30 @@
"============================================================================
"File: cs.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Daniel Walker <dwalker@fifo99.com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
if exists('loaded_cs_syntax_checker')
finish
endif
let loaded_cs_syntax_checker = 1
if !executable('mcs')
finish
endif
function! SyntaxCheckers_cs_GetLocList()
let makeprg = "mcs --parse ".shellescape(expand('%'))
let errorformat = '%f(%l\,%c): %trror %m'
let loclist = SyntasticMake({ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'defaults': {'bufnr': bufnr("")} })
return loclist
endfunction

View File

@@ -0,0 +1,30 @@
"============================================================================
"File: elixir.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Richard Ramsden <rramsden at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
if exists("loaded_elixir_syntax_checker")
finish
endif
let loaded_elixir_syntax_checker = 1
if !executable('elixir')
finish
endif
function! SyntaxCheckers_elixir_GetLocList()
let makeprg = 'elixir ' . shellescape(expand('%'))
let errorformat = '** %*[^\ ] %f:%l: %m'
let elixir_results = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
if !empty(elixir_results)
return elixir_results
endif
endfunction

View File

@@ -12,5 +12,7 @@ main([FileName]) ->
warn_export_vars,
strong_validation,
report,
{i, filename:dirname(FileName) ++ "/../include"}
{i, filename:dirname(FileName) ++ "/../include"},
{i, filename:dirname(FileName) ++ "/../deps"},
{i, filename:dirname(FileName) ++ "/../../../deps"}
]).

View File

@@ -14,23 +14,26 @@ if exists("loaded_eruby_syntax_checker")
endif
let loaded_eruby_syntax_checker = 1
if !exists("g:syntastic_ruby_exec")
let g:syntastic_ruby_exec = "ruby"
endif
"bail if the user doesnt have ruby installed
if !executable("ruby")
if !executable(expand(g:syntastic_ruby_exec))
finish
endif
function! SyntaxCheckers_eruby_GetLocList()
"gsub fixes issue #7 rails has it's own eruby syntax
if has('win32')
let makeprg='ruby -rerb -e "puts ERB.new(File.read(''' .
\ (expand("%")) .
\ ''').gsub(''<\%='',''<\%''), nil, ''-'').src" \| ruby -c'
else
let makeprg='RUBYOPT= ruby -rerb -e "puts ERB.new(File.read(''' .
\ (expand("%")) .
\ ''').gsub(''<\%='',''<\%''), nil, ''-'').src" \| RUBYOPT= ruby -c'
let ruby_exec=expand(g:syntastic_ruby_exec)
if !has('win32')
let ruby_exec='RUBYOPT= ' . ruby_exec
endif
"gsub fixes issue #7 rails has it's own eruby syntax
let makeprg=ruby_exec . ' -rerb -e "puts ERB.new(File.read(''' .
\ (expand("%")) .
\ ''').gsub(''<\%='',''<\%''), nil, ''-'').src" \| ' . ruby_exec . ' -c'
let errorformat='%-GSyntax OK,%E-:%l: syntax error\, %m,%Z%p^,%W-:%l: warning: %m,%Z%p^,%-C%.%#'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat})

View File

@@ -18,5 +18,5 @@ if exists("loaded_go_syntax_checker")
endif
let loaded_go_syntax_checker = 1
let s:supported_checkers = ["go", "6g", "gofmt"]
let s:supported_checkers = ["go", "gofmt"]
call SyntasticLoadChecker(s:supported_checkers, 'go')

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: go.vim
"Description: Check go syntax using 'go build'
"Description: Check go syntax using 'gofmt -l' followed by 'go [build|test]'
"Maintainer: Kamil Kisiel <kamil@kamilkisiel.net>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
@@ -8,10 +8,44 @@
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
" This syntax checker does not reformat your source code.
" Use a BufWritePre autocommand to that end:
" autocmd FileType go autocmd BufWritePre <buffer> Fmt
"============================================================================
function! SyntaxCheckers_go_GetLocList()
let makeprg = 'go build -o /dev/null'
let errorformat = '%f:%l:%c:%m,%E%f:%l:%m,%C%m,%-G#%.%#'
" Check with gofmt first, since `go build` and `go test` might not report
" syntax errors in the current file if another file with syntax error is
" compiled first.
let makeprg = 'gofmt -l % 1>/dev/null'
let errorformat = '%f:%l:%c: %m,%-G%.%#'
let errors = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'type': 'e'} })
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
if !empty(errors)
return errors
endif
" Test files, i.e. files with a name ending in `_test.go`, are not
" compiled by `go build`, therefore `go test` must be called for those.
if match(expand('%'), '_test.go$') == -1
let makeprg = 'go build -o /dev/null'
else
let makeprg = 'go test -c -o /dev/null'
endif
let errorformat = '%f:%l:%c:%m,%f:%l%m,%-G#%.%#'
" The go compiler needs to either be run with an import path as an
" argument or directly from the package directory. Since figuring out
" the poper import path is fickle, just pushd/popd to the package.
let popd = getcwd()
let pushd = expand('%:p:h')
"
" pushd
exec 'lcd ' . fnameescape(pushd)
let errors = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
" popd
exec 'lcd ' . fnameescape(popd)
return errors
endfunction

View File

@@ -1,6 +1,6 @@
"============================================================================
"File: gofmt.vim
"Description: Check go syntax using gofmt
"Description: Check go syntax using 'gofmt -l'
"Maintainer: Brandon Thomson <bt@brandonthomson.com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
@@ -8,9 +8,12 @@
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
" This syntax checker does not reformat your source code.
" Use a BufWritePre autocommand to that end:
" autocmd FileType go autocmd BufWritePre <buffer> Fmt
"============================================================================
function! SyntaxCheckers_go_GetLocList()
let makeprg = 'gofmt %'
let makeprg = 'gofmt -l % 1>/dev/null'
let errorformat = '%f:%l:%c: %m,%-G%.%#'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'type': 'e'} })
endfunction

View File

@@ -9,34 +9,23 @@
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
if exists("loaded_haskell_syntax_checker")
if exists('g:loaded_haskell_syntax_checker')
finish
endif
let loaded_haskell_syntax_checker = 1
let g:loaded_haskell_syntax_checker = 1
"bail if the user doesnt have ghc-mod installed
if !executable("ghc-mod")
finish
if !exists('g:syntastic_haskell_checker')
if executable('hdevtools')
runtime! syntax_checkers/haskell/hdevtools.vim
elseif executable('ghc-mod')
runtime! syntax_checkers/haskell/ghc-mod.vim
endif
elseif g:syntastic_haskell_checker == 'hdevtools'
if executable('hdevtools')
runtime! syntax_checkers/haskell/hdevtools.vim
endif
elseif g:syntastic_haskell_checker == 'ghc-mod'
if executable('ghc-mod')
runtime! syntax_checkers/haskell/ghc-mod.vim
endif
endif
if !exists('g:syntastic_haskell_checker_args')
let g:syntastic_haskell_checker_args = '--hlintOpt="--language=XmlSyntax"'
endif
function! SyntaxCheckers_haskell_GetLocList()
let ghcmod = 'ghc-mod ' . g:syntastic_haskell_checker_args
let makeprg =
\ "{ ".
\ ghcmod . " check ". shellescape(expand('%')) . "; " .
\ ghcmod . " lint " . shellescape(expand('%')) . ";" .
\ " }"
let errorformat = '%-G\\s%#,%f:%l:%c:%trror: %m,%f:%l:%c:%tarning: %m,'.
\ '%f:%l:%c: %trror: %m,%f:%l:%c: %tarning: %m,%f:%l:%c:%m,'.
\ '%E%f:%l:%c:,%Z%m,'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction
function! SyntaxCheckers_lhaskell_GetLocList()
return SyntaxCheckers_haskell_GetLocList()
endfunction

View File

@@ -0,0 +1,33 @@
"============================================================================
"File: ghc-mod.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Anthony Carapetis <anthony.carapetis at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
if !exists('g:syntastic_haskell_checker_args')
let g:syntastic_haskell_checker_args = '--hlintOpt="--language=XmlSyntax"'
endif
function! SyntaxCheckers_haskell_GetLocList()
let ghcmod = 'ghc-mod ' . g:syntastic_haskell_checker_args
let makeprg =
\ "{ ".
\ ghcmod . " check ". shellescape(expand('%')) . "; " .
\ ghcmod . " lint " . shellescape(expand('%')) . ";" .
\ " }"
let errorformat = '%-G\\s%#,%f:%l:%c:%trror: %m,%f:%l:%c:%tarning: %m,'.
\ '%f:%l:%c: %trror: %m,%f:%l:%c: %tarning: %m,%f:%l:%c:%m,'.
\ '%E%f:%l:%c:,%Z%m,'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction
function! SyntaxCheckers_lhaskell_GetLocList()
return SyntaxCheckers_haskell_GetLocList()
endfunction

View File

@@ -0,0 +1,30 @@
"============================================================================
"File: hdevtools.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Anthony Carapetis <anthony.carapetis at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
function! SyntaxCheckers_haskell_GetLocList()
let makeprg = 'hdevtools check ' . get(g:, 'hdevtools_options', '') .
\ ' ' . shellescape(expand('%'))
let errorformat= '\%-Z\ %#,'.
\ '%W%f:%l:%c:\ Warning:\ %m,'.
\ '%E%f:%l:%c:\ %m,'.
\ '%E%>%f:%l:%c:,'.
\ '%+C\ \ %#%m,'.
\ '%W%>%f:%l:%c:,'.
\ '%+C\ \ %#%tarning:\ %m,'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction
function! SyntaxCheckers_lhaskell_GetLocList()
return SyntaxCheckers_haskell_GetLocList()
endfunction

View File

@@ -0,0 +1,33 @@
"============================================================================
"File: checkstyle.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Dmitry Geurkov <d.geurkov at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
" Tested with checkstyle 5.5
"============================================================================
if !exists("g:syntastic_java_checkstyle_classpath")
let g:syntastic_java_checkstyle_classpath = 'checkstyle-5.5-all.jar'
endif
if !exists("g:syntastic_java_checkstyle_conf_file")
let g:syntastic_java_checkstyle_conf_file = 'sun_checks.xml'
endif
function! SyntaxCheckers_java_GetLocList()
let makeprg = 'java -cp ' . g:syntastic_java_checkstyle_classpath . ' com.puppycrawl.tools.checkstyle.Main -c '
\. g:syntastic_java_checkstyle_conf_file . ' '
\. expand ( '%:p:h' ) . '/' . expand ( '%:t' )
\. ' 2>&1 '
" check style format
let errorformat = '%f:%l:%c:\ %m,%f:%l:\ %m'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction

View File

@@ -0,0 +1,160 @@
"============================================================================
"File: javac.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Jochen Keil <jochen.keil at gmail dot com>
" Dmitry Geurkov <d.geurkov at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
" Global Options
if !exists("g:syntastic_java_javac_executable")
let g:syntastic_java_javac_executable = 'javac'
endif
if !exists("g:syntastic_java_javac_options")
let g:syntastic_java_javac_options = '-Xlint'
endif
if !exists("g:syntastic_java_javac_classpath")
let g:syntastic_java_javac_classpath = ''
endif
if !exists("g:syntastic_java_javac_delete_output")
let g:syntastic_java_javac_delete_output = 1
endif
if !exists("g:syntastic_java_javac_autoload_maven_classpath")
let g:syntastic_java_javac_autoload_maven_classpath = 1
endif
" Internal variables, do not ovveride those
if !exists("g:syntastic_java_javac_maven_pom_cwd")
let g:syntastic_java_javac_maven_pom_cwd = ''
endif
if !exists("g:syntastic_java_javac_maven_pom_ftime")
let g:syntastic_java_javac_maven_pom_ftime = 0
endif
if !exists("g:syntastic_java_javac_maven_pom_classpath")
let g:syntastic_java_javac_maven_pom_classpath = ''
endif
function! s:AddToClasspath(classpath,path)
if a:path == ''
return a:classpath
endif
if a:classpath != '' && a:path != ''
return a:classpath . ":" . a:path
else
return a:path
endif
endfunction
function! s:SaveClasspath()
let path = ''
let lines = getline(1,line('$'))
for l in lines
if l != ''
let path .= l."\n"
endif
endfor
let g:syntastic_java_javac_classpath = path
let &modified = 0
endfunction
function! s:EditClasspath()
let command = 'syntastic javac classpath'
let winnr = bufwinnr('^' . command . '$')
if winnr < 0
let pathlist = split(g:syntastic_java_javac_classpath,"\n")
execute (len(pathlist)+5) . 'sp ' . fnameescape(command)
au BufWriteCmd <buffer> call s:SaveClasspath() | bwipeout
setlocal buftype=acwrite bufhidden=wipe nobuflisted noswapfile nowrap number
for p in pathlist | call append(line('$')-1,p) | endfor
else
execute winnr . 'wincmd w'
endif
endfunction
command! SyntasticJavacEditClasspath call s:EditClasspath()
function! s:GetMavenClasspath()
if filereadable('pom.xml')
if g:syntastic_java_javac_maven_pom_ftime != getftime('pom.xml') || g:syntastic_java_javac_maven_pom_cwd != getcwd()
let mvn_classpath_output = split(system('mvn dependency:build-classpath'),"\n")
let class_path_next = 0
for line in mvn_classpath_output
if class_path_next == 1
let mvn_classpath = line
break
endif
if match(line,'Dependencies classpath:') >= 0
let class_path_next = 1
endif
endfor
let mvn_classpath = s:AddToClasspath(mvn_classpath,'target/classes')
let g:syntastic_java_javac_maven_pom_cwd = getcwd()
let g:syntastic_java_javac_maven_pom_ftime = getftime('pom.xml')
let g:syntastic_java_javac_maven_pom_classpath = mvn_classpath
endif
return g:syntastic_java_javac_maven_pom_classpath
endif
return ''
endfunction
function! SyntaxCheckers_java_GetLocList()
let javac_opts = g:syntastic_java_javac_options
if g:syntastic_java_javac_delete_output
let output_dir = '/tmp/vim-syntastic'
let javac_opts .= ' -d ' .output_dir
endif
let javac_classpath = ''
" add classpathes to javac_classpath
for path in split(g:syntastic_java_javac_classpath,"\n")
if path != ''
let ps = glob(path,0,1)
if type(ps) == type([])
for p in ps
if p != '' | let javac_classpath = s:AddToClasspath(javac_classpath,p) | endif
endfor
else
let javac_classpath = s:AddToClasspath(javac_classpath,ps)
endif
endif
endfor
if g:syntastic_java_javac_autoload_maven_classpath
let maven_classpath = s:GetMavenClasspath()
let javac_classpath = s:AddToClasspath(javac_classpath,maven_classpath)
endif
if javac_classpath != ''
let javac_opts .= ' -cp ' . javac_classpath
endif
let makeprg = g:syntastic_java_javac_executable . ' '. javac_opts . ' '
\. expand ( '%:p:h' ) . '/' . expand ( '%:t' )
\. ' 2>&1 '
" unashamedly stolen from *errorformat-javac* (quickfix.txt) and modified to include error types
let errorformat = '%E%f:%l:\ error:\ %m,%W%f:%l:\ warning:\ %m,%A%f:%l:\ %m,%+Z%p^,%+C%.%#,%-G%.%#'
if g:syntastic_java_javac_delete_output
call system('mkdir -p ' . output_dir)
endif
let r = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
if g:syntastic_java_javac_delete_output
call system('rm -rf ' . output_dir)
endif
return r
endfunction

View File

@@ -0,0 +1,43 @@
"============================================================================
"File: closurecompiler.vim
"Description: Javascript syntax checker - using Google Closure Compiler
"Maintainer: Motohiro Takayama <mootoh at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"============================================================================
"
" To enable this plugin, edit the .vimrc like this:
"
" let g:syntastic_javascript_checker = "closurecompiler"
"
" and set the path to the Google Closure Compiler:
"
" let g:syntastic_javascript_closure_compiler_path = '/path/to/google-closure-compiler.jar'
"
" It takes additional options for Google Closure Compiler with the variable
" g:syntastic_javascript_closure_compiler_options.
"
if !exists("g:syntastic_javascript_closure_compiler_options")
let g:syntastic_javascript_closure_compiler_options = ""
endif
"bail if the user does not specify the path to closure compiler.
if !exists("g:syntastic_javascript_closure_compiler_path")
finish
endif
function! SyntaxCheckers_javascript_GetLocList()
if exists("g:syntastic_javascript_closure_compiler_file_list")
let file_list = join(readfile(g:syntastic_javascript_closure_compiler_file_list), ' ')
else
let file_list = shellescape(expand('%'))
endif
let makeprg = 'java -jar ' . g:syntastic_javascript_closure_compiler_path . ' ' . g:syntastic_javascript_closure_compiler_options . ' --js ' . file_list
let errorformat = '%-GOK,%E%f:%l: ERROR - %m,%Z%p^,%W%f:%l: WARNING - %m,%Z%p^'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction

View File

@@ -12,8 +12,16 @@ if !exists("g:syntastic_javascript_jsl_conf")
let g:syntastic_javascript_jsl_conf = ""
endif
function s:ConfFlag()
if !empty(g:syntastic_javascript_jsl_conf)
return "-conf " . g:syntastic_javascript_jsl_conf
endif
return ""
endfunction
function! SyntaxCheckers_javascript_GetLocList()
let makeprg = "jsl " . g:syntastic_javascript_jsl_conf . " -nologo -nofilelisting -nosummary -nocontext -process ".shellescape(expand('%'))
let makeprg = "jsl " . s:ConfFlag() . " -nologo -nofilelisting -nosummary -nocontext -process ".shellescape(expand('%'))
let errorformat='%W%f(%l): lint warning: %m,%-Z%p^,%W%f(%l): warning: %m,%-Z%p^,%E%f(%l): SyntaxError: %m,%-Z%p^,%-G'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction

View File

@@ -0,0 +1,41 @@
#!/usr/bin/env node
fs = require 'fs'
less = require 'less'
args = process.argv.slice(1)
options = {}
args = args.filter (arg) ->
match = arg.match(/^-I(.+)$/)
if match
options.paths.push(match[1]);
return false
match = arg.match(/^--?([a-z][\-0-9a-z]*)(?:=([^\s]+))?$/i)
if match
arg = match[1]
else
return arg
switch arg
when 'strict-imports' then options.strictImports = true
when 'include-path'
options.paths = match[2].split(if os.type().match(/Windows/) then ';' else ':')
.map (p) ->
if p
return path.resolve(process.cwd(), p)
when 'O0' then options.optimization = 0
when 'O1' then options.optimization = 1
when 'O2' then options.optimization = 2
options.filename = args[1]
parser = new(less.Parser) options
fs.readFile(options.filename, 'utf-8', (err,data) ->
parser.parse(data, (err, tree) ->
if err
less.writeError err
process.exit(1)
)
)

View File

@@ -0,0 +1,57 @@
// Generated by CoffeeScript 1.3.3
(function() {
var args, fs, less, options, parser;
fs = require('fs');
less = require('less');
args = process.argv.slice(1);
options = {};
args = args.filter(function(arg) {
var match;
match = arg.match(/^-I(.+)$/);
if (match) {
options.paths.push(match[1]);
return false;
}
match = arg.match(/^--?([a-z][\-0-9a-z]*)(?:=([^\s]+))?$/i);
if (match) {
arg = match[1];
} else {
return arg;
}
switch (arg) {
case 'strict-imports':
return options.strictImports = true;
case 'include-path':
return options.paths = match[2].split(os.type().match(/Windows/) ? ';' : ':').map(function(p) {
if (p) {
return path.resolve(process.cwd(), p);
}
});
case 'O0':
return options.optimization = 0;
case 'O1':
return options.optimization = 1;
case 'O2':
return options.optimization = 2;
}
});
options.filename = args[1];
parser = new less.Parser(options);
fs.readFile(options.filename, 'utf-8', function(err, data) {
return parser.parse(data, function(err, tree) {
if (err) {
less.writeError(err);
return process.exit(1);
}
});
});
}).call(this);

View File

@@ -43,7 +43,7 @@ end
function! SyntaxCheckers_less_GetLocList()
let makeprg = s:check_file . ' ' . g:syntastic_less_options . ' ' .
\ shellescape(expand('%')) . ' /dev/null'
\ shellescape(expand('%')) . ' ' . syntastic#util#DevNull()
let errorformat = '%m in %f:%l:%c'
return SyntasticMake({ 'makeprg': makeprg,

View File

@@ -0,0 +1,31 @@
"============================================================================
"File: lisp.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Karl Yngve Lervåg <karl.yngve@lervag.net>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
if exists("loaded_lisp_syntax_checker")
finish
endif
let loaded_lisp_syntax_checker = 1
" Bail if the user doesnt have clisp installed
if !executable("clisp")
finish
endif
function! SyntaxCheckers_lisp_GetLocList()
let makeprg = 'clisp -c ' . shellescape(expand('%'))
let makeprg .= ' -o /tmp/clisp-vim-compiled-file'
let efm = '%-G;%.%#,'
let efm .= '%W%>WARNING:%.%#line %l : %m,%C %#%m,'
let efm .= '%E%>The following functions were %m,%Z %m,'
let efm .= '%-G%.%#'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': efm })
endfunction

View File

@@ -0,0 +1,160 @@
"============================================================================
"File: objc.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Gregor Uhlenheuer <kongo2002 at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
" In order to also check header files add this to your .vimrc:
" (this usually creates a .gch file in your source directory)
"
" let g:syntastic_objc_check_header = 1
"
" To disable the search of included header files after special
" libraries like gtk and glib add this line to your .vimrc:
"
" let g:syntastic_objc_no_include_search = 1
"
" To enable header files being re-checked on every file write add the
" following line to your .vimrc. Otherwise the header files are checked only
" one time on initially loading the file.
" In order to force syntastic to refresh the header includes simply
" unlet b:syntastic_objc_includes. Then the header files are being re-checked on
" the next file write.
"
" let g:syntastic_objc_auto_refresh_includes = 1
"
" Alternatively you can set the buffer local variable b:syntastic_objc_cflags.
" If this variable is set for the current buffer no search for additional
" libraries is done. I.e. set the variable like this:
"
" let b:syntastic_objc_cflags = ' -I/usr/include/libsoup-2.4'
"
" In order to add some custom include directories that should be added to the
" gcc command line you can add those to the global variable
" g:syntastic_objc_include_dirs. This list can be used like this:
"
" let g:syntastic_objc_include_dirs = [ 'includes', 'headers' ]
"
" Moreover it is possible to add additional compiler options to the syntax
" checking execution via the variable 'g:syntastic_objc_compiler_options':
"
" let g:syntastic_objc_compiler_options = ' -ansi'
"
" Additionally the setting 'g:syntastic_objc_config_file' allows you to define a
" file that contains additional compiler arguments like include directories or
" CFLAGS. The file is expected to contain one option per line. If none is
" given the filename defaults to '.syntastic_objc_config':
"
" let g:syntastic_objc_config_file = '.config'
"
" Using the global variable 'g:syntastic_objc_remove_include_errors' you can
" specify whether errors of files included via the g:syntastic_objc_include_dirs'
" setting are removed from the result set:
"
" let g:syntastic_objc_remove_include_errors = 1
"
" Use the variable 'g:syntastic_objc_errorformat' to override the default error
" format:
"
" let g:syntastic_objc_errorformat = '%f:%l:%c: %trror: %m'
if exists('loaded_objc_syntax_checker')
finish
endif
let loaded_objc_syntax_checker = 1
if !executable('gcc')
finish
endif
let s:save_cpo = &cpo
set cpo&vim
if !exists('g:syntastic_objc_compiler_options')
let g:syntastic_objc_compiler_options = ''
endif
if !exists('g:syntastic_objc_config_file')
let g:syntastic_objc_config_file = '.syntastic_objc_config'
endif
function! SyntaxCheckers_objc_GetLocList()
let makeprg = 'gcc -fsyntax-only -lobjc'
let errorformat =
\ '%-G%f:%s:,'.
\ '%f:%l:%c: %trror: %m,'.
\ '%f:%l:%c: %tarning: %m,'.
\ '%f:%l:%c: %m,'.
\ '%f:%l: %trror: %m,'.
\ '%f:%l: %tarning: %m,'.
\ '%f:%l: %m'
if exists('g:syntastic_objc_errorformat')
let errorformat = g:syntastic_objc_errorformat
endif
" add optional user-defined compiler options
let makeprg .= g:syntastic_objc_compiler_options
let makeprg .= ' '.shellescape(expand('%')).
\ ' '.syntastic#c#GetIncludeDirs('c')
" determine whether to parse header files as well
if expand('%') =~? '.h$'
if exists('g:syntastic_objc_check_header')
let makeprg = 'gcc -c '.shellescape(expand('%')).
\ ' '.syntastic#c#GetIncludeDirs('c')
else
return []
endif
endif
" check if the user manually set some cflags
if !exists('b:syntastic_objc_cflags')
" check whether to search for include files at all
if !exists('g:syntastic_objc_no_include_search') ||
\ g:syntastic_objc_no_include_search != 1
" refresh the include file search if desired
if exists('g:syntastic_objc_auto_refresh_includes') &&
\ g:syntastic_objc_auto_refresh_includes != 0
let makeprg .= syntastic#c#SearchHeaders()
else
" search for header includes if not cached already
if !exists('b:syntastic_objc_includes')
let b:syntastic_objc_includes = syntastic#c#SearchHeaders()
endif
let makeprg .= b:syntastic_objc_includes
endif
endif
else
" use the user-defined cflags
let makeprg .= b:syntastic_objc_cflags
endif
" add optional config file parameters
let makeprg .= ' '.syntastic#c#ReadConfig(g:syntastic_objc_config_file)
" process makeprg
let errors = SyntasticMake({ 'makeprg': makeprg,
\ 'errorformat': errorformat })
" filter the processed errors if desired
if exists('g:syntastic_objc_remove_include_errors') &&
\ g:syntastic_objc_remove_include_errors != 0
return filter(errors,
\ 'has_key(v:val, "bufnr") && v:val["bufnr"]=='.bufnr(''))
else
return errors
endif
endfunction
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:

View File

@@ -24,10 +24,21 @@ if !exists("g:syntastic_phpcs_conf")
let g:syntastic_phpcs_conf = ""
endif
if !exists("g:syntastic_phpcs_disable")
if !exists("g:syntastic_phpcs_disable") || !executable('phpcs')
let g:syntastic_phpcs_disable = 0
endif
if !exists("g:syntastic_phpmd_disable") || !executable('phpmd')
let g:syntastic_phpmd_disable = 0
endif
"Support passing selected rules to phpmd
if !exists("g:syntastic_phpmd_rules")
let g:syntastic_phpmd_rules = "codesize,design,unusedcode,naming"
endif
function! SyntaxCheckers_php_GetHighlightRegex(item)
let unexpected = matchstr(a:item['text'], "unexpected '[^']\\+'")
if len(unexpected) < 1
@@ -37,17 +48,20 @@ function! SyntaxCheckers_php_GetHighlightRegex(item)
endfunction
function! SyntaxCheckers_php_GetLocList()
let errors = []
let makeprg = "php -l -d error_reporting=E_ALL -d display_errors=1 -d log_errors=0 ".shellescape(expand('%'))
let errorformat='%-GNo syntax errors detected in%.%#,Parse error: %#syntax %trror\ , %m in %f on line %l,Parse %trror: %m in %f on line %l,Fatal %trror: %m in %f on line %l,%-G\s%#,%-GErrors parsing %.%#'
let errors = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
if empty(errors) && !g:syntastic_phpcs_disable && executable("phpcs")
if empty(errors)
if !g:syntastic_phpcs_disable
let errors = errors + s:GetPHPCSErrors()
endif
if !g:syntastic_phpmd_disable
let errors = errors + s:GetPHPMDErrors()
endif
end
return errors
endfunction
@@ -56,3 +70,10 @@ function! s:GetPHPCSErrors()
let errorformat = '%-GFile\,Line\,Column\,Type\,Message\,Source\,Severity,"%f"\,%l\,%c\,%t%*[a-zA-Z]\,"%m"\,%*[a-zA-Z0-9_.-]\,%*[0-9]'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'subtype': 'Style' })
endfunction
"Helper function. This one runs and parses phpmd tool output.
function! s:GetPHPMDErrors()
let makeprg = "phpmd " . shellescape(expand('%')) . " text " . g:syntastic_phpmd_rules
let errorformat = '%E%f:%l%m'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'subtype' : 'Style' })
endfunction

View File

@@ -23,6 +23,6 @@ endfunction
function! SyntaxCheckers_python_GetLocList()
let makeprg = 'flake8 '.g:syntastic_python_checker_args.' '.shellescape(expand('%'))
let errorformat = '%E%f:%l: could not compile,%-Z%p^,%E%f:%l:%c: %m,%E%f:%l: %m,%-G%.%#'
let errorformat = '%E%f:%l: could not compile,%-Z%p^,%E%f:%l:%c: %m,%W%f:%l: %m,%-G%.%#'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction

View File

@@ -25,7 +25,7 @@ endif
function! SyntaxCheckers_rst_GetLocList()
let makeprg = 'rst2pseudoxml.py --report=2 --exit-status=1 ' .
\ shellescape(expand('%')) . ' /dev/null'
\ shellescape(expand('%')) . ' ' . syntastic#util#DevNull()
let errorformat = '%f:%l:\ (%tNFO/1)\ %m,
\%f:%l:\ (%tARNING/2)\ %m,

View File

@@ -19,6 +19,10 @@ if !executable("sass")
finish
endif
"sass caching for large files drastically speeds up the checking, but store it
"in a temp location otherwise sass puts .sass_cache dirs in the users project
let s:sass_cache_location = tempname()
"By default do not check partials as unknown variables are a syntax error
if !exists("g:syntastic_sass_check_partials")
let g:syntastic_sass_check_partials = 0
@@ -34,7 +38,7 @@ function! SyntaxCheckers_sass_GetLocList()
if !g:syntastic_sass_check_partials && expand('%:t')[0] == '_'
return []
end
let makeprg='sass --no-cache '.s:imports.' --check '.shellescape(expand('%'))
let makeprg='sass --cache-location '.s:sass_cache_location.' '.s:imports.' --check '.shellescape(expand('%'))
let errorformat = '%ESyntax %trror:%m,%C on line %l of %f,%Z%.%#'
let errorformat .= ',%Wwarning on line %l:,%Z%m,Syntax %trror on line %l: %m'
let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })

View File

@@ -0,0 +1,40 @@
"============================================================================
"File: slim.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
if exists("loaded_slim_syntax_checker")
finish
endif
let loaded_slim_syntax_checker = 1
"bail if the user doesnt have the slim binary installed
if !executable("slimrb")
finish
endif
function! s:SlimrbVersion()
if !exists('s:slimrb_version')
let output = system("slimrb --version 2>/dev/null")
let output = substitute(output, '\n$', '', '')
let output = substitute(output, '^slim ', '', 'i')
let s:slimrb_version = split(output, '\.')
end
return s:slimrb_version
endfunction
function! SyntaxCheckers_slim_GetLocList()
let makeprg = "slimrb -c " . shellescape(expand("%"))
if SyntasticIsVersionAtLeast(s:SlimrbVersion(), [1,3,1])
let errorformat = '%C\ %#%f\, Line %l\, Column %c,%-G\ %.%#,%ESlim::Parser::SyntaxError: %m,%+C%.%#'
else
let errorformat = '%C\ %#%f\, Line %l,%-G\ %.%#,%ESlim::Parser::SyntaxError: %m,%+C%.%#'
endif
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction

View File

@@ -0,0 +1,20 @@
"============================================================================
"File: typescript.vim
"Description: TypeScript syntax checker. For TypeScript v0.8.0
"Maintainer: Bill Casarin <bill@casarin.ca>
"============================================================================
if exists("loaded_typescript_syntax_checker")
finish
endif
let loaded_typescript_syntax_checker = 1
"bail if the user doesnt have tsc installed
if !executable("tsc")
finish
endif
function! SyntaxCheckers_typescript_GetLocList()
let makeprg = 'tsc ' . shellescape(expand("%")) . ' --out ' . syntastic#util#DevNull()
let errorformat = '%f (%l\,%c): %m'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction

View File

@@ -1,7 +1,7 @@
"============================================================================
"File: 6g.vim
"File: zsh.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Sam Nguyen <samxnguyen@gmail.com>
"Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
@@ -9,9 +9,18 @@
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================
function! SyntaxCheckers_go_GetLocList()
let makeprg = '6g -o /dev/null %'
let errorformat = '%E%f:%l: %m'
if exists("loaded_zsh_syntax_checker")
finish
endif
let loaded_zsh_syntax_checker = 1
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
"bail if the user doesnt have zsh installed
if !executable("zsh")
finish
endif
function! SyntaxCheckers_zsh_GetLocList()
let makeprg = 'zsh -n ' . shellescape(expand('%'))
let errorformat = '%f:%l: %m'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat})
endfunction

View File

@@ -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,11 +1207,14 @@ function! s:BaseTag._getPrefix() abort dict
else
let prefix = ' '
endif
" Visibility is called 'access' in the ctags output
if g:tagbar_show_visibility
if has_key(self.fields, 'access')
let prefix .= get(s:access_symbols, self.fields.access, ' ')
let prefix .= get(s:visibility_symbols, self.fields.access, ' ')
else
let prefix .= ' '
endif
endif
return prefix
endfunction
@@ -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

View File

@@ -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
==============================================================================

View File

@@ -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

View File

@@ -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"

View File

@@ -315,7 +315,8 @@ let s:tlist_php_settings = {
\ 'c': 'class',
\ 'd': 'constant',
\ 'v': 'variable',
\ 'f': 'function'
\ 'f': 'function',
\ 'i': 'interface'
\ }
\ }
@@ -510,12 +511,17 @@ function! taglisttoo#taglist#AutoOpen() " {{{
endif
endfunction " }}}
" Taglist([action]) {{{
" action
" - not supplied (or -1): toggle
" - 1: open
" - 0: close
function! taglisttoo#taglist#Taglist(...)
function! taglisttoo#taglist#Taglist(...) " {{{
" Optional arg:
" options:
" action:
" - not supplied (or -1): toggle
" - 1: open
" - 0: close
" pick:
" - 1: opening the taglist temporarily to simply pick a tag then
" close.
if !exists('g:Tlist_Ctags_Cmd')
call taglisttoo#util#EchoError('Unable to find a version of ctags installed.')
return
@@ -523,17 +529,18 @@ function! taglisttoo#taglist#Taglist(...)
call s:Init()
if bufname('%') == s:taglisttoo_title
call s:CloseTaglist()
return
endif
let action = len(a:000) ? a:000[0] : -1
let options = len(a:000) ? a:000[0] : {}
let action = get(options, 'action', -1)
if action == -1 || action == 0
let winnum = s:GetTagListWinnr()
if winnum != -1
let prevbuf = bufnr('%')
" handle closing from the taglist
if bufwinnr(prevbuf) == winnum
wincmd p
let prevbuf = bufnr('%')
endif
exe winnum . 'wincmd w'
call s:CloseTaglist()
exec bufwinnr(prevbuf) . 'wincmd w'
@@ -542,13 +549,13 @@ function! taglisttoo#taglist#Taglist(...)
endif
if action == -1 || action == 1
call s:ProcessTags(1)
call s:ProcessTags({'force': 1, 'pick': get(options, 'pick', 0)})
endif
endfunction " }}}
" Restore() {{{
" Restore the taglist, typically after loading from a session file.
function! taglisttoo#taglist#Restore()
function! taglisttoo#taglist#Restore() " {{{
" Restore the taglist, typically after loading from a session file.
if exists('t:taglistoo_restoring')
return
endif
@@ -592,11 +599,11 @@ function! s:StartAutocmds() " {{{
autocmd BufEnter <buffer> nested call s:CloseIfLastWindow()
autocmd BufEnter *
\ if s:GetTagListWinnr() != -1 |
\ call s:ProcessTags(0) |
\ call s:ProcessTags() |
\ endif
autocmd BufWritePost *
\ if s:GetTagListWinnr() != -1 |
\ call s:ProcessTags(1) |
\ call s:ProcessTags({'force': 1}) |
\ endif
" bit of a hack to re-process tags if the filetype changes after the tags
" have been processed.
@@ -604,7 +611,7 @@ function! s:StartAutocmds() " {{{
\ if exists('b:ft') |
\ if b:ft != &ft |
\ if s:GetTagListWinnr() != -1 |
\ call s:ProcessTags(1) |
\ call s:ProcessTags({'force': 1}) |
\ endif |
\ let b:ft = &ft |
\ endif |
@@ -638,7 +645,13 @@ function! s:Cleanup() " {{{
" TODO: clear all b:taglisttoo_folds variables?
endfunction " }}}
function! s:ProcessTags(on_open_or_write) " {{{
function! s:ProcessTags(...) " {{{
" Optional arg:
" options:
" force: force the tags to be process (newly opened files + file writes)
" pick: processing tags as part of command to just pick the tag then
" close the tag list.
" on insert completion prevent vim's jumping back and forth from the
" completion preview window from triggering a re-processing of tags
if pumvisible()
@@ -649,9 +662,11 @@ function! s:ProcessTags(on_open_or_write) " {{{
return
endif
" if we are entering a buffer whose taglist list is already loaded, then
" don't do anything.
if !a:on_open_or_write
let options = len(a:000) ? a:000[0] : {}
" if tag processes is not forced and we are entering a buffer whose taglist
" list is already loaded, then don't do anything.
if !get(options, 'force', 0)
let bufnr = s:GetTagListBufnr()
let filebuf = getbufvar(bufnr, 'taglisttoo_file_bufnr')
if filebuf == bufnr('%')
@@ -717,7 +732,8 @@ function! s:ProcessTags(on_open_or_write) " {{{
return
endif
call s:Window(settings, tags)
let temp = get(options, 'pick', 0)
call s:Window(settings, tags, temp)
" if the file buffer is no longer in the same window it was, then find its
" new location. Occurs when taglist first opens.
@@ -728,17 +744,24 @@ function! s:ProcessTags(on_open_or_write) " {{{
if filewin != -1
exec filewin . 'winc w'
endif
call s:ShowCurrentTag()
" after showing the current tag jump back to the tag list if we're
" expecting the user to pick a tag and then close the window.
if temp
let twinnum = s:GetTagListWinnr()
exec twinnum . 'winc w'
endif
else
" if the file isn't supported, then don't open the taglist window if it
" isn't open already.
let winnum = s:GetTagListWinnr()
if winnum != -1
call s:Window({'tags': {}}, [])
call s:Window({'tags': {}}, [], 0)
winc p
endif
endif
call s:ShowCurrentTag()
endfunction " }}}
function! s:FormatDefault(settings, tags) " {{{
@@ -910,7 +933,7 @@ function! s:GetFoldPath(lnum) " {{{
return path
endfunction " }}}
function! s:JumpToTag() " {{{
function! s:JumpToTag(close) " {{{
let tag_info = s:GetTagInfo()
if !len(tag_info) || tag_info.line == -1 || get(tag_info, 'pattern', '') == ''
return
@@ -972,9 +995,13 @@ function! s:JumpToTag() " {{{
call s:ShowCurrentTag()
endif
endif
if a:close
call taglisttoo#taglist#Taglist({'action': 0})
endif
endfunction " }}}
function! s:Window(settings, tags) " {{{
function! s:Window(settings, tags, temp) " {{{
let file_bufnr = bufnr('%')
let folds = exists('b:taglisttoo_folds') ? b:taglisttoo_folds : []
@@ -1010,7 +1037,7 @@ function! s:Window(settings, tags) " {{{
hi TagListVisibilityStatic guifg=#cf9ebe
endif
nnoremap <silent> <buffer> <cr> :call <SID>JumpToTag()<cr>
exec 'nnoremap <silent> <buffer> <cr> :call <SID>JumpToTag(' . a:temp . ')<cr>'
" folding related mappings
nnoremap <silent> <buffer> o :call <SID>FoldToggle()<cr>
@@ -1086,13 +1113,6 @@ function! s:Window(settings, tags) " {{{
silent 1,1delete _
setlocal nomodifiable
" restore any saved folds
for path in folds
call s:FoldPath(path)
endfor
call setpos('.', pos)
" if the entire taglist can fit in the window, then reposition the content
" just in case the previous contents result in the current contents being
" scrolled up a bit.
@@ -1106,6 +1126,13 @@ function! s:Window(settings, tags) " {{{
" must be after definition of buffer vars
setlocal foldexpr=s:FoldLevel(v:lnum) foldtext=getline(v:foldstart)
" restore any saved folds
for path in folds
call s:FoldPath(path)
endfor
call setpos('.', pos)
endfunction " }}}
function! s:ShowCurrentTag() " {{{

View File

@@ -306,9 +306,11 @@ function! taglisttoo#util#SetNestedParents(types, tags, parent_types, parent_pai
endif
let parent_name .= parent.tag.name
endfor
if has_key(a:types, parents[-1].tag.type)
let parent_name = a:types[parents[-1].tag.type] . ':' . parent_name
let tag['parent'] = parent_name
endif
endif
" check if tag is a potential parent
if index(a:parent_types, tag.type) != -1

View File

@@ -85,6 +85,13 @@ are recursive):
zo, zO Open a fold.
zn, zR Open all folds.
If you prefer to not have the taglist always taking up space you can
alternatively create a mapping to open the tag list where it will be closed as
soon as you choose a tag to jump to (<cr>). Here is an example where I map
|<leader>|t to do that:
nnoremap <leader>t :call taglisttoo#taglist#Taglist({'pick': 1})<cr>
-----------------------------------------------------------------------------
Configuration *taglisttoo-configuration*

View File

@@ -0,0 +1,161 @@
" Description: Vim Kick Assembler omnicompletion file
" Language: Assembler, KickAssembler
" Maintainer: Roman 'gryf' Dobosz <gryf_esm@o2.pl>
" LastChange: 2012-08-02
" Version: 0.1
"
" Changelog:
" 0.0 - initial release
if version < 700
finish
endif
let s:mnemonics = split("adc and asl bcc bcs beq bit bmi bne bpl brk bvc bvs clc cld cli clv cmp cpx cpy dec dex dey eor inc inx iny jmp jsr lda ldx ldy lsr nop ora pha php pla plp rol ror rti rts sbc sec sed sei sta stx sty tax tay tsx txa txs tya")
let s:infos = ["ADC Add Memory to Accumulator with Carry\n\n A + M + C -> A, C N Z C I D V\n + + + - - +\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate ADC #oper 69 2 2\n zeropage ADC oper 65 2 3\n zeropage,X ADC oper,X 75 2 4\n absolute ADC oper 6D 3 4\n absolute,X ADC oper,X 7D 3 4*\n absolute,Y ADC oper,Y 79 3 4*\n (indirect,X) ADC (oper,X) 61 2 6\n (indirect),Y ADC (oper),Y 71 2 5*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"AND AND Memory with Accumulator\n\n A AND M -> A N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate AND #oper 29 2 2\n zeropage AND oper 25 2 3\n zeropage,X AND oper,X 35 2 4\n absolute AND oper 2D 3 4\n absolute,X AND oper,X 3D 3 4*\n absolute,Y AND oper,Y 39 3 4*\n (indirect,X) AND (oper,X) 21 2 6\n (indirect),Y AND (oper),Y 31 2 5*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"ASL Shift Left One Bit (Memory or Accumulator)\n\n C <- [76543210] <- 0 N Z C I D V\n + + + - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n accumulator ASL A 0A 1 2\n zeropage ASL oper 06 2 5\n zeropage,X ASL oper,X 16 2 6\n absolute ASL oper 0E 3 6\n absolute,X ASL oper,X 1E 3 7\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"BCC Branch on Carry Clear\n\n branch on C = 0 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BCC oper 90 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n",
\"BCS Branch on Carry Set\n\n branch on C = 1 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BCS oper B0 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n",
\"BEQ Branch on Result Zero\n\n branch on Z = 1 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BEQ oper F0 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n",
\"BIT Test Bits in Memory with Accumulator\n\n bits 7 and 6 of operand are transfered to bit 7 and 6 of SR (N,V);\n the zeroflag is set to the result of operand AND accumulator.\n\n A AND M, M7 -> N, M6 -> V N Z C I D V\n M7 + - - - M6\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n zeropage BIT oper 24 2 3\n absolute BIT oper 2C 3 4\n\n\n Legend to Flags: + .... modified\n - .... not modified\n M6 .... memory bit 6\n M7 .... memory bit 7\n",
\"BMI Branch on Result Minus\n\n branch on N = 1 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BMI oper 30 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n",
\"BNE Branch on Result not Zero\n\n branch on Z = 0 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BNE oper D0 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n",
\"BPL Branch on Result Plus\n\n branch on N = 0 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BPL oper 10 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n",
\"BRK Force Break\n\n interrupt, N Z C I D V\n push PC+2, push SR - - - 1 - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied BRK 00 1 7\n\n\n Legend to Flags: - .... not modified\n 1 .... set\n",
\"BVC Branch on Overflow Clear\n\n branch on V = 0 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BVC oper 50 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n",
\"BVS Branch on Overflow Set\n\n branch on V = 1 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BVC oper 70 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n",
\"CLC Clear Carry Flag\n\n 0 -> C N Z C I D V\n - - 0 - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied CLC 18 1 2\n\n\n Legend to Flags: - .... not modified\n 0 .... cleared\n",
\"CLD Clear Decimal Mode\n\n 0 -> D N Z C I D V\n - - - - 0 -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied CLD D8 1 2\n\n\n Legend to Flags: - .... not modified\n 0 .... cleared\n",
\"CLI Clear Interrupt Disable Bit\n\n 0 -> I N Z C I D V\n - - - 0 - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied CLI 58 1 2\n\n\n Legend to Flags: - .... not modified\n 0 .... cleared\n",
\"CLV Clear Overflow Flag\n\n 0 -> V N Z C I D V\n - - - - - 0\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied CLV B8 1 2\n\n\n Legend to Flags: - .... not modified\n 0 .... cleared\n",
\"CMP Compare Memory with Accumulator\n\n A - M N Z C I D V\n + + + - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate CMP #oper C9 2 2\n zeropage CMP oper C5 2 3\n zeropage,X CMP oper,X D5 2 4\n absolute CMP oper CD 3 4\n absolute,X CMP oper,X DD 3 4*\n absolute,Y CMP oper,Y D9 3 4*\n (indirect,X) CMP (oper,X) C1 2 6\n (indirect),Y CMP (oper),Y D1 2 5*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"CPX Compare Memory and Index X\n\n X - M N Z C I D V\n + + + - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate CPX #oper E0 2 2\n zeropage CPX oper E4 2 3\n absolute CPX oper EC 3 4\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"CPY Compare Memory and Index Y\n\n Y - M N Z C I D V\n + + + - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate CPY #oper C0 2 2\n zeropage CPY oper C4 2 3\n absolute CPY oper CC 3 4\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"DEC Decrement Memory by One\n\n M - 1 -> M N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n zeropage DEC oper C6 2 5\n zeropage,X DEC oper,X D6 2 6\n absolute DEC oper CE 3 3\n absolute,X DEC oper,X DE 3 7\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"DEX Decrement Index X by One\n\n X - 1 -> X N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied DEC CA 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"DEY Decrement Index Y by One\n\n Y - 1 -> Y N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied DEC 88 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"EOR Exclusive-OR Memory with Accumulator\n\n A EOR M -> A N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate EOR #oper 49 2 2\n zeropage EOR oper 45 2 3\n zeropage,X EOR oper,X 55 2 4\n absolute EOR oper 4D 3 4\n absolute,X EOR oper,X 5D 3 4*\n absolute,Y EOR oper,Y 59 3 4*\n (indirect,X) EOR (oper,X) 41 2 6\n (indirect),Y EOR (oper),Y 51 2 5*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"INC Increment Memory by One\n\n M + 1 -> M N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n zeropage INC oper E6 2 5\n zeropage,X INC oper,X F6 2 6\n absolute INC oper EE 3 6\n absolute,X INC oper,X FE 3 7\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"INX Increment Index X by One\n\n X + 1 -> X N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied INX E8 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"INY Increment Index Y by One\n\n Y + 1 -> Y N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied INY C8 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"JMP Jump to New Location\n\n (PC+1) -> PCL N Z C I D V\n (PC+2) -> PCH - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n absolute JMP oper 4C 3 3\n indirect JMP (oper) 6C 3 5\n\n\n Legend to Flags: - .... not modified\n",
\"JSR Jump to New Location Saving Return Address\n\n push (PC+2), N Z C I D V\n (PC+1) -> PCL - - - - - -\n (PC+2) -> PCH\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n absolute JSR oper 20 3 6\n\n\n Legend to Flags: - .... not modified\n",
\"LDA Load Accumulator with Memory\n\n M -> A N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate LDA #oper A9 2 2\n zeropage LDA oper A5 2 3\n zeropage,X LDA oper,X B5 2 4\n absolute LDA oper AD 3 4\n absolute,X LDA oper,X BD 3 4*\n absolute,Y LDA oper,Y B9 3 4*\n (indirect,X) LDA (oper,X) A1 2 6\n (indirect),Y LDA (oper),Y B1 2 5*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"LDX Load Index X with Memory\n\n M -> X N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate LDX #oper A2 2 2\n zeropage LDX oper A6 2 3\n zeropage,Y LDX oper,Y B6 2 4\n absolute LDX oper AE 3 4\n absolute,Y LDX oper,Y BE 3 4*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"LDY Load Index Y with Memory\n\n M -> Y N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate LDY #oper A0 2 2\n zeropage LDY oper A4 2 3\n zeropage,X LDY oper,X B4 2 4\n absolute LDY oper AC 3 4\n absolute,X LDY oper,X BC 3 4*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"LSR Shift One Bit Right (Memory or Accumulator)\n\n 0 -> [76543210] -> C N Z C I D V\n - + + - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n accumulator LSR A 4A 1 2\n zeropage LSR oper 46 2 5\n zeropage,X LSR oper,X 56 2 6\n absolute LSR oper 4E 3 6\n absolute,X LSR oper,X 5E 3 7\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"NOP No Operation\n\n --- N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied NOP EA 1 2\n\n\n Legend to Flags: - .... not modified\n",
\"ORA OR Memory with Accumulator\n\n A OR M -> A N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate ORA #oper 09 2 2\n zeropage ORA oper 05 2 3\n zeropage,X ORA oper,X 15 2 4\n absolute ORA oper 0D 3 4\n absolute,X ORA oper,X 1D 3 4*\n absolute,Y ORA oper,Y 19 3 4*\n (indirect,X) ORA (oper,X) 01 2 6\n (indirect),Y ORA (oper),Y 11 2 5*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"PHA Push Accumulator on Stack\n\n push A N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied PHA 48 1 3\n\n\n Legend to Flags: - .... not modified\n",
\"PHP Push Processor Status on Stack\n\n push SR N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied PHP 08 1 3\n\n\n Legend to Flags: - .... not modified\n",
\"PLA Pull Accumulator from Stack\n\n pull A N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied PLA 68 1 4\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"PLP Pull Processor Status from Stack\n\n pull SR N Z C I D V\n from stack\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied PHP 28 1 4\n\n\n Legend to Flags: + .... modified\n - .... not modified\n 1 .... set\n 0 .... cleared\n M6 .... memory bit 6\n M7 .... memory bit 7\n",
\"ROL Rotate One Bit Left (Memory or Accumulator)\n\n C <- [76543210] <- C N Z C I D V\n + + + - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n accumulator ROL A 2A 1 2\n zeropage ROL oper 26 2 5\n zeropage,X ROL oper,X 36 2 6\n absolute ROL oper 2E 3 6\n absolute,X ROL oper,X 3E 3 7\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"ROR Rotate One Bit Right (Memory or Accumulator)\n\n C -> [76543210] -> C N Z C I D V\n + + + - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n accumulator ROR A 6A 1 2\n zeropage ROR oper 66 2 5\n zeropage,X ROR oper,X 76 2 6\n absolute ROR oper 6E 3 6\n absolute,X ROR oper,X 7E 3 7\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"RTI Return from Interrupt\n\n pull SR, pull PC N Z C I D V\n from stack\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied RTI 40 1 6\n\n\n Legend to Flags: + .... modified\n - .... not modified\n 1 .... set\n 0 .... cleared\n M6 .... memory bit 6\n M7 .... memory bit 7\n",
\"RTS Return from Subroutine\n\n pull PC, PC+1 -> PC N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied RTS 60 1 6\n\n\n Legend to Flags: - .... not modified\n",
\"SBC Subtract Memory from Accumulator with Borrow\n\n A - M - C -> A N Z C I D V\n + + + - - +\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate SBC #oper E9 2 2\n zeropage SBC oper E5 2 3\n zeropage,X SBC oper,X F5 2 4\n absolute SBC oper ED 3 4\n absolute,X SBC oper,X FD 3 4*\n absolute,Y SBC oper,Y F9 3 4*\n (indirect,X) SBC (oper,X) E1 2 6\n (indirect),Y SBC (oper),Y F1 2 5*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"SEC Set Carry Flag\n\n 1 -> C N Z C I D V\n - - 1 - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied SEC 38 1 2\n\n\n Legend to Flags: - .... not modified\n 1 .... set\n",
\"SED Set Decimal Flag\n\n 1 -> D N Z C I D V\n - - - - 1 -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied SED F8 1 2\n\n\n Legend to Flags: - .... not modified\n 1 .... set\n",
\"SEI Set Interrupt Disable Status\n\n 1 -> I N Z C I D V\n - - - 1 - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied SEI 78 1 2\n\n\n Legend to Flags: - .... not modified\n 1 .... set\n",
\"STA Store Accumulator in Memory\n\n A -> M N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n zeropage STA oper 85 2 3\n zeropage,X STA oper,X 95 2 4\n absolute STA oper 8D 3 4\n absolute,X STA oper,X 9D 3 5\n absolute,Y STA oper,Y 99 3 5\n (indirect,X) STA (oper,X) 81 2 6\n (indirect),Y STA (oper),Y 91 2 6\n\n\n Legend to Flags: - .... not modified\n",
\"STX Store Index X in Memory\n\n X -> M N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n zeropage STX oper 86 2 3\n zeropage,Y STX oper,Y 96 2 4\n absolute STX oper 8E 3 4\n\n\n Legend to Flags: - .... not modified\n",
\"STY Sore Index Y in Memory\n\n Y -> M N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n zeropage STY oper 84 2 3\n zeropage,X STY oper,X 94 2 4\n absolute STY oper 8C 3 4\n\n\n Legend to Flags: - .... not modified\n",
\"TAX Transfer Accumulator to Index X\n\n A -> X N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied TAX AA 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"TAY Transfer Accumulator to Index Y\n\n A -> Y N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied TAY A8 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"TSX Transfer Stack Pointer to Index X\n\n SP -> X N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied TSX BA 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"TXA Transfer Index X to Accumulator\n\n X -> A N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied TXA 8A 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\nTXS Transfer Index X to Stack Register\n\n X -> SP N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied TXS 9A 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n",
\"TYA Transfer Index Y to Accumulator\n\n Y -> A N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied TYA 98 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"]
let s:values = [{"word": "adc", "info": "ADC Add Memory to Accumulator with Carry\n\n A + M + C -> A, C N Z C I D V\n + + + - - +\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate ADC #oper 69 2 2\n zeropage ADC oper 65 2 3\n zeropage,X ADC oper,X 75 2 4\n absolute ADC oper 6D 3 4\n absolute,X ADC oper,X 7D 3 4*\n absolute,Y ADC oper,Y 79 3 4*\n (indirect,X) ADC (oper,X) 61 2 6\n (indirect),Y ADC (oper),Y 71 2 5*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "and", "info": "AND AND Memory with Accumulator\n\n A AND M -> A N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate AND #oper 29 2 2\n zeropage AND oper 25 2 3\n zeropage,X AND oper,X 35 2 4\n absolute AND oper 2D 3 4\n absolute,X AND oper,X 3D 3 4*\n absolute,Y AND oper,Y 39 3 4*\n (indirect,X) AND (oper,X) 21 2 6\n (indirect),Y AND (oper),Y 31 2 5*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "asl", "info": "ASL Shift Left One Bit (Memory or Accumulator)\n\n C <- [76543210] <- 0 N Z C I D V\n + + + - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n accumulator ASL A 0A 1 2\n zeropage ASL oper 06 2 5\n zeropage,X ASL oper,X 16 2 6\n absolute ASL oper 0E 3 6\n absolute,X ASL oper,X 1E 3 7\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "bcc", "info": "BCC Branch on Carry Clear\n\n branch on C = 0 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BCC oper 90 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "bcs", "info": "BCS Branch on Carry Set\n\n branch on C = 1 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BCS oper B0 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "beq", "info": "BEQ Branch on Result Zero\n\n branch on Z = 1 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BEQ oper F0 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "bit", "info": "BIT Test Bits in Memory with Accumulator\n\n bits 7 and 6 of operand are transfered to bit 7 and 6 of SR (N,V);\n the zeroflag is set to the result of operand AND accumulator.\n\n A AND M, M7 -> N, M6 -> V N Z C I D V\n M7 + - - - M6\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n zeropage BIT oper 24 2 3\n absolute BIT oper 2C 3 4\n\n\n Legend to Flags: + .... modified\n - .... not modified\n M6 .... memory bit 6\n M7 .... memory bit 7\n"},
\{"word": "bmi", "info": "BMI Branch on Result Minus\n\n branch on N = 1 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BMI oper 30 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "bne", "info": "BNE Branch on Result not Zero\n\n branch on Z = 0 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BNE oper D0 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "bpl", "info": "BPL Branch on Result Plus\n\n branch on N = 0 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BPL oper 10 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "brk", "info": "BRK Force Break\n\n interrupt, N Z C I D V\n push PC+2, push SR - - - 1 - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied BRK 00 1 7\n\n\n Legend to Flags: - .... not modified\n 1 .... set\n"},
\{"word": "bvc", "info": "BVC Branch on Overflow Clear\n\n branch on V = 0 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BVC oper 50 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "bvs", "info": "BVS Branch on Overflow Set\n\n branch on V = 1 N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n relative BVC oper 70 2 2**\n\n ** add 1 to cycles if branch occurs on same page\n add 2 to cycles if branch occurs to different page\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "clc", "info": "CLC Clear Carry Flag\n\n 0 -> C N Z C I D V\n - - 0 - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied CLC 18 1 2\n\n\n Legend to Flags: - .... not modified\n 0 .... cleared\n"},
\{"word": "cld", "info": "CLD Clear Decimal Mode\n\n 0 -> D N Z C I D V\n - - - - 0 -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied CLD D8 1 2\n\n\n Legend to Flags: - .... not modified\n 0 .... cleared\n"},
\{"word": "cli", "info": "CLI Clear Interrupt Disable Bit\n\n 0 -> I N Z C I D V\n - - - 0 - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied CLI 58 1 2\n\n\n Legend to Flags: - .... not modified\n 0 .... cleared\n"},
\{"word": "clv", "info": "CLV Clear Overflow Flag\n\n 0 -> V N Z C I D V\n - - - - - 0\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied CLV B8 1 2\n\n\n Legend to Flags: - .... not modified\n 0 .... cleared\n"},
\{"word": "cmp", "info": "CMP Compare Memory with Accumulator\n\n A - M N Z C I D V\n + + + - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate CMP #oper C9 2 2\n zeropage CMP oper C5 2 3\n zeropage,X CMP oper,X D5 2 4\n absolute CMP oper CD 3 4\n absolute,X CMP oper,X DD 3 4*\n absolute,Y CMP oper,Y D9 3 4*\n (indirect,X) CMP (oper,X) C1 2 6\n (indirect),Y CMP (oper),Y D1 2 5*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "cpx", "info": "CPX Compare Memory and Index X\n\n X - M N Z C I D V\n + + + - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate CPX #oper E0 2 2\n zeropage CPX oper E4 2 3\n absolute CPX oper EC 3 4\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "cpy", "info": "CPY Compare Memory and Index Y\n\n Y - M N Z C I D V\n + + + - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate CPY #oper C0 2 2\n zeropage CPY oper C4 2 3\n absolute CPY oper CC 3 4\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "dec", "info": "DEC Decrement Memory by One\n\n M - 1 -> M N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n zeropage DEC oper C6 2 5\n zeropage,X DEC oper,X D6 2 6\n absolute DEC oper CE 3 3\n absolute,X DEC oper,X DE 3 7\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "dex", "info": "DEX Decrement Index X by One\n\n X - 1 -> X N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied DEC CA 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "dey", "info": "DEY Decrement Index Y by One\n\n Y - 1 -> Y N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied DEC 88 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "eor", "info": "EOR Exclusive-OR Memory with Accumulator\n\n A EOR M -> A N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate EOR #oper 49 2 2\n zeropage EOR oper 45 2 3\n zeropage,X EOR oper,X 55 2 4\n absolute EOR oper 4D 3 4\n absolute,X EOR oper,X 5D 3 4*\n absolute,Y EOR oper,Y 59 3 4*\n (indirect,X) EOR (oper,X) 41 2 6\n (indirect),Y EOR (oper),Y 51 2 5*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "inc", "info": "INC Increment Memory by One\n\n M + 1 -> M N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n zeropage INC oper E6 2 5\n zeropage,X INC oper,X F6 2 6\n absolute INC oper EE 3 6\n absolute,X INC oper,X FE 3 7\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "inx", "info": "INX Increment Index X by One\n\n X + 1 -> X N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied INX E8 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "iny", "info": "INY Increment Index Y by One\n\n Y + 1 -> Y N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied INY C8 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "jmp", "info": "JMP Jump to New Location\n\n (PC+1) -> PCL N Z C I D V\n (PC+2) -> PCH - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n absolute JMP oper 4C 3 3\n indirect JMP (oper) 6C 3 5\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "jsr", "info": "JSR Jump to New Location Saving Return Address\n\n push (PC+2), N Z C I D V\n (PC+1) -> PCL - - - - - -\n (PC+2) -> PCH\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n absolute JSR oper 20 3 6\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "lda", "info": "LDA Load Accumulator with Memory\n\n M -> A N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate LDA #oper A9 2 2\n zeropage LDA oper A5 2 3\n zeropage,X LDA oper,X B5 2 4\n absolute LDA oper AD 3 4\n absolute,X LDA oper,X BD 3 4*\n absolute,Y LDA oper,Y B9 3 4*\n (indirect,X) LDA (oper,X) A1 2 6\n (indirect),Y LDA (oper),Y B1 2 5*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "ldx", "info": "LDX Load Index X with Memory\n\n M -> X N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate LDX #oper A2 2 2\n zeropage LDX oper A6 2 3\n zeropage,Y LDX oper,Y B6 2 4\n absolute LDX oper AE 3 4\n absolute,Y LDX oper,Y BE 3 4*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "ldy", "info": "LDY Load Index Y with Memory\n\n M -> Y N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate LDY #oper A0 2 2\n zeropage LDY oper A4 2 3\n zeropage,X LDY oper,X B4 2 4\n absolute LDY oper AC 3 4\n absolute,X LDY oper,X BC 3 4*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "lsr", "info": "LSR Shift One Bit Right (Memory or Accumulator)\n\n 0 -> [76543210] -> C N Z C I D V\n - + + - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n accumulator LSR A 4A 1 2\n zeropage LSR oper 46 2 5\n zeropage,X LSR oper,X 56 2 6\n absolute LSR oper 4E 3 6\n absolute,X LSR oper,X 5E 3 7\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "nop", "info": "NOP No Operation\n\n --- N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied NOP EA 1 2\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "ora", "info": "ORA OR Memory with Accumulator\n\n A OR M -> A N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate ORA #oper 09 2 2\n zeropage ORA oper 05 2 3\n zeropage,X ORA oper,X 15 2 4\n absolute ORA oper 0D 3 4\n absolute,X ORA oper,X 1D 3 4*\n absolute,Y ORA oper,Y 19 3 4*\n (indirect,X) ORA (oper,X) 01 2 6\n (indirect),Y ORA (oper),Y 11 2 5*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "pha", "info": "PHA Push Accumulator on Stack\n\n push A N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied PHA 48 1 3\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "php", "info": "PHP Push Processor Status on Stack\n\n push SR N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied PHP 08 1 3\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "pla", "info": "PLA Pull Accumulator from Stack\n\n pull A N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied PLA 68 1 4\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "plp", "info": "PLP Pull Processor Status from Stack\n\n pull SR N Z C I D V\n from stack\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied PHP 28 1 4\n\n\n Legend to Flags: + .... modified\n - .... not modified\n 1 .... set\n 0 .... cleared\n M6 .... memory bit 6\n M7 .... memory bit 7\n"},
\{"word": "rol", "info": "ROL Rotate One Bit Left (Memory or Accumulator)\n\n C <- [76543210] <- C N Z C I D V\n + + + - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n accumulator ROL A 2A 1 2\n zeropage ROL oper 26 2 5\n zeropage,X ROL oper,X 36 2 6\n absolute ROL oper 2E 3 6\n absolute,X ROL oper,X 3E 3 7\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "ror", "info": "ROR Rotate One Bit Right (Memory or Accumulator)\n\n C -> [76543210] -> C N Z C I D V\n + + + - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n accumulator ROR A 6A 1 2\n zeropage ROR oper 66 2 5\n zeropage,X ROR oper,X 76 2 6\n absolute ROR oper 6E 3 6\n absolute,X ROR oper,X 7E 3 7\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "rti", "info": "RTI Return from Interrupt\n\n pull SR, pull PC N Z C I D V\n from stack\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied RTI 40 1 6\n\n\n Legend to Flags: + .... modified\n - .... not modified\n 1 .... set\n 0 .... cleared\n M6 .... memory bit 6\n M7 .... memory bit 7\n"},
\{"word": "rts", "info": "RTS Return from Subroutine\n\n pull PC, PC+1 -> PC N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied RTS 60 1 6\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "sbc", "info": "SBC Subtract Memory from Accumulator with Borrow\n\n A - M - C -> A N Z C I D V\n + + + - - +\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n immidiate SBC #oper E9 2 2\n zeropage SBC oper E5 2 3\n zeropage,X SBC oper,X F5 2 4\n absolute SBC oper ED 3 4\n absolute,X SBC oper,X FD 3 4*\n absolute,Y SBC oper,Y F9 3 4*\n (indirect,X) SBC (oper,X) E1 2 6\n (indirect),Y SBC (oper),Y F1 2 5*\n\n * add 1 to cycles if page boundery is crossed\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "sec", "info": "SEC Set Carry Flag\n\n 1 -> C N Z C I D V\n - - 1 - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied SEC 38 1 2\n\n\n Legend to Flags: - .... not modified\n 1 .... set\n"},
\{"word": "sed", "info": "SED Set Decimal Flag\n\n 1 -> D N Z C I D V\n - - - - 1 -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied SED F8 1 2\n\n\n Legend to Flags: - .... not modified\n 1 .... set\n"},
\{"word": "sei", "info": "SEI Set Interrupt Disable Status\n\n 1 -> I N Z C I D V\n - - - 1 - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied SEI 78 1 2\n\n\n Legend to Flags: - .... not modified\n 1 .... set\n"},
\{"word": "sta", "info": "STA Store Accumulator in Memory\n\n A -> M N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n zeropage STA oper 85 2 3\n zeropage,X STA oper,X 95 2 4\n absolute STA oper 8D 3 4\n absolute,X STA oper,X 9D 3 5\n absolute,Y STA oper,Y 99 3 5\n (indirect,X) STA (oper,X) 81 2 6\n (indirect),Y STA (oper),Y 91 2 6\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "stx", "info": "STX Store Index X in Memory\n\n X -> M N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n zeropage STX oper 86 2 3\n zeropage,Y STX oper,Y 96 2 4\n absolute STX oper 8E 3 4\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "sty", "info": "STY Sore Index Y in Memory\n\n Y -> M N Z C I D V\n - - - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n zeropage STY oper 84 2 3\n zeropage,X STY oper,X 94 2 4\n absolute STY oper 8C 3 4\n\n\n Legend to Flags: - .... not modified\n"},
\{"word": "tax", "info": "TAX Transfer Accumulator to Index X\n\n A -> X N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied TAX AA 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "tay", "info": "TAY Transfer Accumulator to Index Y\n\n A -> Y N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied TAY A8 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "tsx", "info": "TSX Transfer Stack Pointer to Index X\n\n SP -> X N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied TSX BA 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "txa", "info": "TXA Transfer Index X to Accumulator\n\n X -> A N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied TXA 8A 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\nTXS Transfer Index X to Stack Register\n\n X -> SP N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied TXS 9A 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "txs", "info": "TSX Transfer Stack Pointer to Index X\n\n SP -> X N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied TSX BA 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"},
\{"word": "tya", "info": "TYA Transfer Index Y to Accumulator\n\n Y -> A N Z C I D V\n + + - - - -\n\n addressing assembler opc bytes cyles\n --------------------------------------------\n implied TYA 98 1 2\n\n\n Legend to Flags: + .... modified\n - .... not modified\n"}]
"let s:values = []
"let s:idx = 0
"while s:idx < len(s:mnemonics)
" let s:tmpdict = {}
" let s:tmpdict["word"] = s:mnemonics[s:idx]
" let s:tmpdict["info"] = s:infos[s:idx]
" call add(s:values, s:tmpdict)
"endwhile
function! kickasscomplete#CompleteKick(findstart, base)
if a:findstart == 1
let line = getline('.')
let start = col('.') - 1
while start > 0 && line[start - 1] =~ '\i\|'''
let start -= 1
endwhile
return start
else
return s:values
" let l:pattern = '^' . a:base . '.*$'
" for l:item in s:values
" if l:item =~? l:pattern
" return l:item
" endif
" endfor
endif
endfunction

View File

@@ -10,8 +10,14 @@
" Dependencies:
" - SearchSpecial.vim autoload script (optional, for improved search messages).
"
" Version: 2.7.1
" Version: 2.7.2
" Changes:
" 15-Oct-2012, Ingo Karkat
" - Issue an error message "No marks defined" instead of moving the cursor by
" one character when there are no marks (e.g. initially or after :MarkClear).
" - Enable custom integrations via new mark#GetNum() and mark#GetPattern()
" functions.
"
" 13-Sep-2012, Ingo Karkat
" - Enable alternative * / # mappings that do not remember the last search type
" by adding optional search function argument to mark#SearchNext().
@@ -626,19 +632,31 @@ function! mark#SearchCurrentMark( isBackward )
endif
endfunction
function! s:ErrorMessage( searchType, searchPattern, isBackward )
if &wrapscan
let v:errmsg = a:searchType . ' not found: ' . a:searchPattern
else
let v:errmsg = printf('%s search hit %s without match for: %s', a:searchType, (a:isBackward ? 'TOP' : 'BOTTOM'), a:searchPattern)
endif
function! s:ErrorMsg( text )
let v:errmsg = a:text
echohl ErrorMsg
echomsg v:errmsg
echohl None
endfunction
function! s:NoMarkErrorMessage()
call s:ErrorMsg('No marks defined')
endfunction
function! s:ErrorMessage( searchType, searchPattern, isBackward )
if &wrapscan
let l:errmsg = a:searchType . ' not found: ' . a:searchPattern
else
let l:errmsg = printf('%s search hit %s without match for: %s', a:searchType, (a:isBackward ? 'TOP' : 'BOTTOM'), a:searchPattern)
endif
call s:ErrorMsg(l:errmsg)
endfunction
" Wrapper around search() with additonal search and error messages and "wrapscan" warning.
function! s:Search( pattern, isBackward, currentMarkPosition, searchType )
if empty(a:pattern)
call s:NoMarkErrorMessage()
return 0
endif
let l:save_view = winsaveview()
" searchpos() obeys the 'smartcase' setting; however, this setting doesn't
@@ -954,6 +972,23 @@ function! mark#GetGroupNum()
endfunction
"- integrations ----------------------------------------------------------------
" Access the number of possible marks.
function! mark#GetNum()
return s:markNum
endfunction
" Access the current / passed index pattern.
function! mark#GetPattern( ... )
if a:0
return s:pattern[a:1]
else
return (s:lastSearch == -1 ? '' : s:pattern[s:lastSearch])
endif
endfunction
"- initializations ------------------------------------------------------------
augroup Mark
autocmd!

View File

@@ -7,6 +7,7 @@ description |mark-description|
usage |mark-usage|
installation |mark-installation|
configuration |mark-configuration|
integration |mark-integration|
limitations |mark-limitations|
known problems |mark-known-problems|
todo |mark-todo|
@@ -336,6 +337,14 @@ behavior: >
vmap <Plug>IgnoreMarkSet <Plug>MarkSet
vmap <Leader>m <Plug>MarkWhitespaceIndifferent
<
==============================================================================
INTEGRATION *mark-integration*
The following functions offer (read-only) access to the number of marks and
individual patterns:
- mark#GetNum()
- mark#GetPattern([{index}])
==============================================================================
LIMITATIONS *mark-limitations*
@@ -359,6 +368,12 @@ http://vim.wikia.com/wiki/Highlight_multiple_words:
==============================================================================
HISTORY *mark-history*
2.7.2 15-Oct-2012
- Issue an error message "No marks defined" instead of moving the cursor by
one character when there are no marks (e.g. initially or after :MarkClear).
- Enable custom integrations via new mark#GetNum() and mark#GetPattern()
functions.
2.7.1 14-Sep-2012
- Enable alternative * / # mappings that do not remember the last search type
through new <Plug>MarkSearchOrCurNext, <Plug>MarkSearchOrCurPrev,