1 2" These variables should be tagged 3let g:var_global_scope = 1 4let s:var_script_scope = 1 5let var_script_default_scope = 1 6let forms#FT_TEXTFIELD = 'textfield' 7let forms#form = { 8 \ 'title': 'Address Entry Form', 9 \ 'fields': [], 10 \ 'defaultbutton': 'ok', 11 \ 'fieldMap': {}, 12 \ 'hotkeyMap': {}, 13 \ } 14let $env_var = 'something' 15 16 17" These lets should be ignored 18let &errorformat = "%A%.%#rror reported by parser: %m" 19let @a = 'set register a' 20let [a, b; rest] = ["aval", "bval", 3, 4] 21 22let 23 24" These lets should be ignored Vim variables are readonly 25let v:version = 'something' 26 27" autogroups 28augroup uncompress 29 au! 30 au BufEnter *.gz %!gunzip 31augroup END 32 33" This deletes the autogroup and should be ignored 34augroup! uncompress 35 36" Ensure line is ignored 37augroup 38 39" commands 40command! -nargs=+ SelectCmd :call s:DB_execSql("select " . <q-args>) 41command! -nargs=* -complete=customlist,<SID>DB_settingsComplete DBSetOption :call s:DB_setMultipleOptions(<q-args>) 42comma -bang 43 \NoSpaceBeforeContinue edit<bang> <args> 44com -nargs=1 -bang -complete=customlist,EditFileComplete 45 \ SpaceBeforeContinue edit<bang> <args> 46com -nargs=1 -bang 47 \-complete=customlist,EditFileComplete 48 \ -complete=file 49 \ ExtraLines edit<bang> <args> 50 51" functions 52fu Bar(arg) 53 let var_inside_func = [] 54endf 55 56fu invalidFuncLowerCaseInitialLetter(arg) 57endf 58 59function! Foo(arg) 60endfunction 61 62 fu IndentedFunction(arg) 63 endf 64 65function! <SID>Foo_SID(arg) 66endfu 67 68function! s:Foo_scolon(arg) 69endfunction 70 71function! s:validFuncLowerCaseInitialLetter(arg) 72endfunction 73 74" New to Vim7 75let mydict = {'data': [0, 1, 2, 3]} 76function mydict.len() dict 77 let var_in_func = 2 78 let s:script_var_in_func = 2 79 return len(self.data) 80endfunction 81echo mydict.len() 82 83function autoloadFunc#subdirname#Funcname() 84 echo "Done!" 85endfunction 86 87" Dict function with g:prefix. 88let g:plugin#foo = {} 89function! g:plugin#foo() abort dict 90endfunction 91 92function! forms#form.addTextField(fname, flabel, fvalue, hotkey) 93 let field = s:field.new(self, g:forms#FT_TEXTFIELD, a:fname, a:flabel, 94 \ a:fvalue, a:hotkey) 95 return field 96endfunction 97 98" Invalid function, must start with an UPPER case letter 99function e 100endfunction 101 102" Shortest possible function name 103function E 104endfunction 105 106" Ensure it ingores the invalid function declaration 107function s: 108endfunction 109 110" Tags should be created for 111" <F8> 112" <Leader>scdt 113" ,,, 114" ( 115nnoremap <silent> <F8> :Tlist<CR> 116map! <unique> <Leader>scdt <Plug>GetColumnDataType 117inoremap ,,, <esc>diwi<<esc>pa><cr></<esc>pa><esc>kA 118inoremap <buffer> ( <C-R>=PreviewFunctionSignature()<LF> 119 120