Mercurial > vim
changeset 1126:c5c164b4c95c
updated for version 7.1a
author | vimboss |
---|---|
date | Sat, 05 May 2007 18:27:07 +0000 |
parents | 96cd8222a819 |
children | 8a081c312178 |
files | runtime/autoload/phpcomplete.vim runtime/autoload/sqlcomplete.vim runtime/doc/getscript.txt runtime/doc/xxd.man runtime/keymap/tamil_tscii.vim runtime/plugin/getscript.vim runtime/plugin/tarPlugin.vim runtime/syntax/mysql.vim src/po/it.po src/proto/tag.pro |
diffstat | 10 files changed, 346 insertions(+), 944 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/autoload/phpcomplete.vim +++ b/runtime/autoload/phpcomplete.vim @@ -1,7 +1,7 @@ " Vim completion script " Language: PHP " Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) -" Last Change: 2006 Apr 30 +" Last Change: 2006 May 9 " " TODO: " - Class aware completion: @@ -74,7 +74,7 @@ function! phpcomplete#CompletePHP(findst let file = getline(1, '$') call filter(file, \ 'v:val =~ "class\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("') - let fnames = join(map(tagfiles(), 'escape(v:val, " \\")')) + let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) let jfile = join(file, ' ') let int_values = split(jfile, 'class\s\+') let int_classes = {} @@ -85,33 +85,43 @@ function! phpcomplete#CompletePHP(findst endif endfor - " Prepare list of functions from tags file + " Prepare list of classes from tags file let ext_classes = {} - let fnames = join(map(tagfiles(), 'escape(v:val, " \\")')) + let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) if fnames != '' exe 'silent! vimgrep /^'.a:base.'.*\tc\(\t\|$\)/j '.fnames let qflist = getqflist() - for field in qflist - " [:space:] thing: we don't have to be so strict when - " dealing with tags files - entries there were already - " checked by ctags. - let item = matchstr(field['text'], '^[^[:space:]]\+') - let ext_classes[item] = '' + if len(qflist) > 0 + for field in qflist + " [:space:] thing: we don't have to be so strict when + " dealing with tags files - entries there were already + " checked by ctags. + let item = matchstr(field['text'], '^[^[:space:]]\+') + let ext_classes[item] = '' + endfor + endif + endif + + " Prepare list of built in classes from g:php_builtin_functions + if !exists("g:php_omni_bi_classes") + let g:php_omni_bi_classes = {} + for i in keys(g:php_builtin_object_functions) + let g:php_omni_bi_classes[substitute(i, '::.*$', '', '')] = '' endfor endif - call extend(int_classes, ext_classes) + let classes = sort(keys(int_classes)) + let classes += sort(keys(ext_classes)) + let classes += sort(keys(g:php_omni_bi_classes)) - for m in sort(keys(int_classes)) + for m in classes if m =~ '^'.a:base call add(res, m) endif endfor - let int_list = res - let final_menu = [] - for i in int_list + for i in res let final_menu += [{'word':i, 'kind':'c'}] endfor @@ -138,6 +148,19 @@ function! phpcomplete#CompletePHP(findst let classlocation = '' endif + if classlocation == 'VIMPHP_BUILTINOBJECT' + + for object in keys(g:php_builtin_object_functions) + if object =~ '^'.classname + let res += [{'word':substitute(object, '.*::', '', ''), + \ 'info': g:php_builtin_object_functions[object]}] + endif + endfor + + return res + + endif + if filereadable(classlocation) let classfile = readfile(classlocation) let classcontent = '' @@ -154,7 +177,7 @@ function! phpcomplete#CompletePHP(findst " Functions declared with public keyword or without any " keyword are public let functions = filter(deepcopy(sccontent), - \ 'v:val =~ "^\\s*\\(public\\s\\*\\)\\?function"') + \ 'v:val =~ "^\\s*\\(static\\s\\+\\|public\\s\\+\\)*function"') let jfuncs = join(functions, ' ') let sfuncs = split(jfuncs, 'function\s\+') let c_functions = {} @@ -185,7 +208,6 @@ function! phpcomplete#CompletePHP(findst let all_values = {} call extend(all_values, c_functions) call extend(all_values, c_variables) - call extend(all_values, g:php_builtin_object_functions) for m in sort(keys(all_values)) if m =~ '^'.a:base && m !~ '::' @@ -244,23 +266,25 @@ function! phpcomplete#CompletePHP(findst " ctags has good support for PHP, use tags file for external " variables - let fnames = join(map(tagfiles(), 'escape(v:val, " \\")')) + let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) let ext_vars = {} if fnames != '' let sbase = substitute(a:base, '^\$', '', '') exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames let qflist = getqflist() - for field in qflist - let item = matchstr(field['text'], '^[^[:space:]]\+') - " Add -> if it is possible object declaration - let classname = '' - if field['text'] =~ item.'\s*=\s*new\s\+' - let item = item.'->' - let classname = matchstr(field['text'], - \ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze') - endif - let ext_vars[adddollar.item] = classname - endfor + if len(qflist) > 0 + for field in qflist + let item = matchstr(field['text'], '^[^[:space:]]\+') + " Add -> if it is possible object declaration + let classname = '' + if field['text'] =~ item.'\s*=\s*new\s\+' + let item = item.'->' + let classname = matchstr(field['text'], + \ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze') + endif + let ext_vars[adddollar.item] = classname + endfor + endif endif " Now we have all variables in int_vars dictionary @@ -270,7 +294,7 @@ function! phpcomplete#CompletePHP(findst let file = getline(1, '$') call filter(file, \ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("') - let fnames = join(map(tagfiles(), 'escape(v:val, " \\")')) + let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) let jfile = join(file, ' ') let int_values = split(jfile, 'function\s\+') let int_functions = {} @@ -287,14 +311,16 @@ function! phpcomplete#CompletePHP(findst if fnames != '' exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames let qflist = getqflist() - for field in qflist - " File name - let item = matchstr(field['text'], '^[^[:space:]]\+') - let fname = matchstr(field['text'], '\t\zs\f\+\ze') - let prototype = matchstr(field['text'], - \ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?') - let ext_functions[item.'('] = prototype.') - '.fname - endfor + if len(qflist) > 0 + for field in qflist + " File name + let item = matchstr(field['text'], '^[^[:space:]]\+') + let fname = matchstr(field['text'], '\t\zs\f\+\ze') + let prototype = matchstr(field['text'], + \ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?') + let ext_functions[item.'('] = prototype.') - '.fname + endfor + endif endif let all_values = {} @@ -375,23 +401,25 @@ function! phpcomplete#CompletePHP(findst call extend(int_vars,g:php_builtin_vars) " ctags has support for PHP, use tags file for external variables - let fnames = join(map(tagfiles(), 'escape(v:val, " \\")')) + let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) let ext_vars = {} if fnames != '' let sbase = substitute(a:base, '^\$', '', '') exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames let qflist = getqflist() - for field in qflist - let item = '$'.matchstr(field['text'], '^[^[:space:]]\+') - let m_menu = '' - " Add -> if it is possible object declaration - if field['text'] =~ item.'\s*=\s*new\s\+' - let item = item.'->' - let m_menu = matchstr(field['text'], - \ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze') - endif - let ext_vars[item] = m_menu - endfor + if len(qflist) > 0 + for field in qflist + let item = '$'.matchstr(field['text'], '^[^[:space:]]\+') + let m_menu = '' + " Add -> if it is possible object declaration + if field['text'] =~ item.'\s*=\s*new\s\+' + let item = item.'->' + let m_menu = matchstr(field['text'], + \ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze') + endif + let ext_vars[item] = m_menu + endfor + endif endif call extend(int_vars, ext_vars) @@ -433,7 +461,7 @@ function! phpcomplete#CompletePHP(findst let file = getline(1, '$') call filter(file, \ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("') - let fnames = join(map(tagfiles(), 'escape(v:val, " \\")')) + let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) let jfile = join(file, ' ') let int_values = split(jfile, 'function\s\+') let int_functions = {} @@ -450,14 +478,16 @@ function! phpcomplete#CompletePHP(findst if fnames != '' exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames let qflist = getqflist() - for field in qflist - " File name - let item = matchstr(field['text'], '^[^[:space:]]\+') - let fname = matchstr(field['text'], '\t\zs\f\+\ze') - let prototype = matchstr(field['text'], - \ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?') - let ext_functions[item.'('] = prototype.') - '.fname - endfor + if len(qflist) > 0 + for field in qflist + " File name + let item = matchstr(field['text'], '^[^[:space:]]\+') + let fname = matchstr(field['text'], '\t\zs\f\+\ze') + let prototype = matchstr(field['text'], + \ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?') + let ext_functions[item.'('] = prototype.') - '.fname + endfor + endif endif " All functions @@ -480,15 +510,17 @@ function! phpcomplete#CompletePHP(findst endfor " Prepare list of constants from tags file - let fnames = join(map(tagfiles(), 'escape(v:val, " \\")')) + let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) let ext_constants = {} if fnames != '' exe 'silent! vimgrep /^'.a:base.'.*\td\(\t\|$\)/j '.fnames let qflist = getqflist() - for field in qflist - let item = matchstr(field['text'], '^[^[:space:]]\+') - let ext_constants[item] = '' - endfor + if len(qflist) > 0 + for field in qflist + let item = matchstr(field['text'], '^[^[:space:]]\+') + let ext_constants[item] = '' + endfor + endif endif " All constants @@ -558,7 +590,7 @@ function! phpcomplete#GetClassName(scont endwhile " OK, first way failed, now check tags file(s) - let fnames = join(map(tagfiles(), 'escape(v:val, " \\")')) + let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) exe 'silent! vimgrep /^'.object.'.*\$'.object.'.*=\s*new\s\+.*\tv\(\t\|$\)/j '.fnames let qflist = getqflist() if len(qflist) == 0 @@ -573,6 +605,17 @@ function! phpcomplete#GetClassName(scont endfunction " }}} function! phpcomplete#GetClassLocation(classname) " {{{ + " Check classname may be name of built in object + if !exists("g:php_omni_bi_classes") + let g:php_omni_bi_classes = {} + for i in keys(g:php_builtin_object_functions) + let g:php_omni_bi_classes[substitute(i, '::.*$', '', '')] = '' + endfor + endif + if has_key(g:php_omni_bi_classes, a:classname) + return 'VIMPHP_BUILTINOBJECT' + endif + " Get class location for fname in tagfiles() let fhead = fnamemodify(fname, ":h") @@ -583,8 +626,12 @@ function! phpcomplete#GetClassLocation(c let fname = escape(fname, " \\") exe 'silent! vimgrep /^'.a:classname.'.*\tc\(\t\|$\)/j '.fname let qflist = getqflist() - " As in GetClassName we can manage only one element - let classlocation = matchstr(qflist[0]['text'], '\t\zs\f\+\ze\t') + " As in GetClassName we can manage only one element if it exists + if len(qflist) > 0 + let classlocation = matchstr(qflist[0]['text'], '\t\zs\f\+\ze\t') + else + return '' + endif " And only one class location if classlocation != '' let classlocation = fhead.classlocation @@ -614,6 +661,7 @@ function! phpcomplete#GetClassContents(f else let extends_class = '' endif + call search('{') normal! % let classc = getline(cfline, ".") let classcontent = join(classc, "\n")
--- a/runtime/autoload/sqlcomplete.vim +++ b/runtime/autoload/sqlcomplete.vim @@ -1,8 +1,8 @@ " Vim OMNI completion script for SQL " Language: SQL " Maintainer: David Fishburn <fishburn@ianywhere.com> -" Version: 4.0 -" Last Change: Wed Apr 26 2006 3:00:06 PM +" Version: 5.0 +" Last Change: Mon Jun 05 2006 3:30:04 PM " Usage: For detailed help " ":help sql.txt" " or ":help ft-sql-omni" @@ -22,7 +22,7 @@ endif if exists('g:loaded_sql_completion') finish endif -let g:loaded_sql_completion = 40 +let g:loaded_sql_completion = 50 " Maintains filename of dictionary let s:sql_file_table = "" @@ -113,7 +113,7 @@ function! sqlcomplete#Complete(findstart " If lastword has already been set for column completion " break from the loop, since we do not also want to pickup " a table name if it was also supplied. - if lastword != -1 && compl_type == 'column' + if lastword != -1 && compl_type == 'column' break endif " If column completion was specified stop at the "." if @@ -176,11 +176,19 @@ function! sqlcomplete#Complete(findstart return [] endif + " Allow the user to override the dbext plugin to specify whether + " the owner/creator should be included in the list + let saved_dbext_show_owner = 1 + if exists('g:dbext_default_dict_show_owner') + let saved_dbext_show_owner = g:dbext_default_dict_show_owner + endif + let g:dbext_default_dict_show_owner = g:omni_sql_include_owner + + let compl_type_uc = substitute(compl_type, '\w\+', '\u&', '') if s:sql_file_{compl_type} == "" - let compl_type = substitute(compl_type, '\w\+', '\u&', '') - let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type) + let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc) endif - let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type) + let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc) if s:sql_file_{compl_type} != "" if filereadable(s:sql_file_{compl_type}) let compl_list = readfile(s:sql_file_{compl_type}) @@ -194,7 +202,9 @@ function! sqlcomplete#Complete(findstart " endif endif endif - elseif compl_type == 'column' + + let g:dbext_default_dict_show_owner = saved_dbext_show_owner + elseif compl_type =~? 'column' " This type of completion relies upon the dbext.vim plugin if s:SQLCCheck4dbext() == -1 @@ -209,33 +219,88 @@ function! sqlcomplete#Complete(findstart let base = s:save_prev_table endif - if base != "" - let compl_list = s:SQLCGetColumns(base, '') - let s:save_prev_table = base - let base = '' - endif - elseif compl_type == 'column_csv' + let owner = '' + let column = '' + + if base =~ '\.' + " Check if the owner/creator has been specified + let owner = matchstr( base, '^\zs.*\ze\..*\..*' ) + let table = matchstr( base, '^\(.*\.\)\?\zs.*\ze\..*' ) + let column = matchstr( base, '.*\.\zs.*' ) - " This type of completion relies upon the dbext.vim plugin - if s:SQLCCheck4dbext() == -1 - return [] + " It is pretty well impossible to determine if the user + " has entered: + " owner.table + " table.column_prefix + " So there are a couple of things we can do to mitigate + " this issue. + " 1. Check if the dbext plugin has the option turned + " on to even allow owners + " 2. Based on 1, if the user is showing a table list + " and the DrillIntoTable (using <C-Right>) then + " this will be owner.table. In this case, we can + " check to see the table.column exists in the + " cached table list. If it does, then we have + " determined the user has actually chosen + " owner.table, not table.column_prefix. + let found = -1 + if g:omni_sql_include_owner == 1 && owner == '' + if filereadable(s:sql_file_table) + let tbl_list = readfile(s:sql_file_table) + let found = index( tbl_list, ((table != '')?(table.'.'):'').column) + endif + endif + " If the table.column was found in the table list, we can safely assume + " the owner was not provided and shift the items appropriately. + " OR + " If the user has indicated not to use table owners at all and + " the base ends in a '.' we know they are not providing a column + " name, so we can shift the items appropriately. + if found != -1 || (g:omni_sql_include_owner == 0 && base !~ '\.$') + let owner = table + let table = column + let column = '' + endif + else + let table = base endif - if base == "" - " The last time we displayed a column list we stored - " the table name. If the user selects a column list - " without a table name of alias present, assume they want - " the previous column list displayed. - let base = s:save_prev_table - endif + " Get anything after the . and consider this the table name + " If an owner has been specified, then we must consider the + " base to be a partial column name + " let base = matchstr( base, '^\(.*\.\)\?\zs.*' ) + + if table != "" + let s:save_prev_table = base + let list_type = '' + + if compl_type == 'column_csv' + " Return one array element, with a comma separated + " list of values instead of multiple array entries + " for each column in the table. + let list_type = 'csv' + endif - if base != "" - let compl_list = s:SQLCGetColumns(base, 'csv') - let s:save_prev_table = base - " Join the column array into 1 single element array - " but make the columns column separated - let compl_list = [join(compl_list, ', ')] - let base = '' + let compl_list = s:SQLCGetColumns(table, list_type) + if column != '' + " If no column prefix has been provided and the table + " name was provided, append it to each of the items + " returned. + let compl_list = map(compl_list, "table.'.'.v:val") + if owner != '' + " If an owner has been provided append it to each of the + " items returned. + let compl_list = map(compl_list, "owner.'.'.v:val") + endif + else + let base = '' + endif + + if compl_type == 'column_csv' + " Join the column array into 1 single element array + " but make the columns column separated + let compl_list = [join(compl_list, ', ')] + endif endif elseif compl_type == 'resetCache' " Reset all cached items @@ -256,7 +321,7 @@ function! sqlcomplete#Complete(findstart if base != '' " Filter the list based on the first few characters the user " entered - let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "^'.base.'"' + let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\([^.]*\\)\\?'.base.'\\)"' let compl_list = filter(deepcopy(compl_list), expr) endif @@ -274,6 +339,8 @@ function! sqlcomplete#PreCacheSyntax(... else let syn_group_arr = g:omni_sql_precache_syntax_groups endif + " For each group specified in the list, precache all + " the sytnax items. if !empty(syn_group_arr) for group_name in syn_group_arr call s:SQLCGetSyntaxList(group_name) @@ -444,9 +511,23 @@ function! s:SQLCAddAlias(table_name, tab return cols endfunction +function! s:SQLCGetObjectOwner(object) + " The owner regex matches a word at the start of the string which is + " followed by a dot, but doesn't include the dot in the result. + " ^ - from beginning of line + " "\? - ignore any quotes + " \zs - start the match now + " \w\+ - get owner name + " \ze - end the match + " "\? - ignore any quotes + " \. - must by followed by a . + let owner = matchstr( a:object, '^"\?\zs\w\+\ze"\?\.' ) + return owner +endfunction + function! s:SQLCGetColumns(table_name, list_type) - let table_name = matchstr(a:table_name, '^\w\+') - let table_name = matchstr(a:table_name, '^[a-zA-Z0-9_.]\+') + " Check if the table name was provided as part of the column name + let table_name = matchstr(a:table_name, '^[a-zA-Z0-9_]\+\ze\.\?') let table_cols = [] let table_alias = '' let move_to_top = 1
deleted file mode 100644 --- a/runtime/doc/getscript.txt +++ /dev/null @@ -1,303 +0,0 @@ -*getscript.txt* For Vim version 7.0. Last change: 2006 Apr 30 - - Get the Latest VimScripts - -Authors: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamilyA.Mbiz> - (remove NOSPAM from the email address) - *GetLatestVimScripts-copyright* -Copyright: (c) 2004-2005 by Charles E. Campbell, Jr. - The VIM LICENSE applies to GetLatestVimScripts.vim and - GetLatestVimScripts.txt (see |copyright|) except use - "GetLatestVimScripts" instead of "Vim". - No warranty, express or implied. Use At-Your-Own-Risk. - - -============================================================================== -1. Contents *glvs-contents* - - 1. Contents.......................................: |glvs-contents| - 2. GetLatestVimScripts Usage......................: |glvs| - 3. GetLatestVimScripts Data File..................: |glvs-data| - 4. GetLatestVimScripts Plugins....................: |glvs-plugins| - 5. GetLatestVimScripts AutoInstall................: |glvs-autoinstall| - 6. GetLatestVimScripts Algorithm..................: |glvs-alg| - 7. GetLatestVimScripts History....................: |glvs-hist| - - -============================================================================== -2. GetLatestVimScripts Usage *getlatestvimscripts* *getscript* *glvs* - - While in vim, type -> - :GetLatestVimScripts -< - Unless its been defined elsewhere, -> - :GLVS -< - will also work. - - The script will attempt to update and, if so directed, automatically - install scripts from http://vim.sourceforge.net/. To do so it will - peruse a file, [.vim|vimfiles]/GetLatest/GetLatestVimScripts.dat - (see |glvs-data|), and examine plugins in your [.vim|vimfiles]/plugin - directory (see |glvs-plugins|). - - Scripts which have been downloaded will appear in the .../GetLatest - subdirectory. - - The <GetLatestVimScripts.dat> file will be automatically be updated to - reflect the latest version of script(s) so downloaded. - - -============================================================================== -3. GetLatestVimScripts Data File *getlatestvimscripts-data* *glvs-data* - - The Data file has a header which should appear as: -> - ScriptID SourceID Filename - -------------------------- -< - Below that are three columns; the first two are numeric followed by a - text column. - - The first number on each line gives the script's ScriptID. When - you're about to use a web browser to look at scripts on - http://vim.sf.net/, just before you click on the script's link, you'll - see a line resembling - - http://vim.sourceforge.net/scripts/script.php?script_id=40 - - The "40" happens to be a ScriptID that GetLatestVimScripts needs to - download the associated page. - - The second number on each line gives the script's SourceID. The - SourceID records the count of uploaded scripts as determined by - vim.sf.net; hence it serves to indicate "when" a script was uploaded. - Setting the SourceID to 1 insures that GetLatestVimScripts will assume - that the script it has is out-of-date. - - The SourceID is extracted by GetLatestVimScripts from the script's - page on vim.sf.net; whenever its greater than the one stored in the - GetLatestVimScripts.dat file, the script will be downloaded. - - If your script's author has included a special comment line in his/her - plugin, the plugin itself will be used by GetLatestVimScripts to build - your <GetLatestVimScripts.dat> file, including any dependencies on - other scripts it may have. - - If your comment field begins with :AutoInstall:, GetLatestVimScripts - will attempt to automatically install the script. Thus, - GetLatestVimScripts thus provides a comprehensive ability to keep your - plugins up-to-date! - -============================================================================== -4. GetLatestVimScripts Plugins *getlatestvimscripts-plugins* *glvs-plugins* - - - If a plugin author includes the following comment anywhere in their - plugin, GetLatestVimScripts will find it and use it to build user's - GetLatestVimScripts.dat files: -> - src_id - v - " GetLatestVimScripts: ### ### yourscriptname - ^ - scriptid -< - As an author, you should include such a line in to refer to your own - script plus any additional lines describing any plugin dependencies it - may have. Same format, of course! - - If your command is auto-installable (see |glvs-autoinstall|), and most - scripts are, then you may include :AutoInstall: at the start of - "yourscriptname". - - GetLatestVimScript commands for those scripts are then appended, if - not already present, to the user's GetLatest/GetLatestVimScripts.dat - file. Its a relatively painless way to automate the acquisition of - any scripts your plugins depend upon. - - Now, as an author, you probably don't want GetLatestVimScripts to - download your own scripts for you yourself, thereby overwriting your - not-yet-released hard work. GetLatestVimScripts provides a solution - for this: put -> - 0 0 yourscriptname -< - into your <GetLatestVimScripts.dat> file and GetLatestVimScripts will - skip examining the "yourscriptname" scripts for those - GetLatestVimScript comment lines. As a result, those lines won't be - inadvertently installed into your <GetLatestVimScripts.dat> file and - subsequently used to download your own scripts. This is especially - important to do if you've included the :AutoInstall: option. - - Be certain to use the same "yourscriptname" in the "0 0 - yourscriptname" line as you've used in your GetLatestVimScript - comment! - - -============================================================================== -5. GetLatestVimScripts AutoInstall *getlatestvimscripts-autoinstall* - *glvs-autoinstall* - - GetLatestVimScripts now supports "AutoInstall". Not all scripts are - supportive of auto-install, as they may have special things you need - to do to install them (please refer to the script's "install" - directions). On the other hand, most scripts will be - auto-installable. - - To let GetLatestVimScripts do an autoinstall, the data file's comment - field should begin with (surrounding blanks are ignored): - - :AutoInstall: - - Both colons are needed, and it should begin the comment - (yourscriptname) field. - - One may prevent any autoinstalling by putting the following line - in your <.vimrc>: -> - let g:GetLatestVimScripts_allowautoinstall= 0 -< - - With :AutoInstall: enabled, as it is by default, files which end with - - ---.tar.bz2 : decompressed and untarred in [.vim|vimfiles] directory - ---.tar.gz : decompressed and untarred in [.vim|vimfiles] directory - ---.vim.bz2 : decompressed and moved to the .vim/plugin directory - ---.vim.gz : decompressed and moved to the .vim/plugin directory - ---.zip : unzipped in [.vim|vimfiles] directory - ---.vim : moved to [.vim|vimfiles]/plugin directory - - and which merely need to have their components placed by the - untar/gunzip or move-to-plugin-directory process should be - auto-installable. - - When is a script not auto-installable? Let me give an example: -> - [.vim|vimfiles]/after/syntax/blockhl.vim -< - The <blockhl.vim> script provides block highlighting for C/C++ - programs; it is available at: -> - http://vim.sourceforge.net/scripts/script.php?script_id=104 -< - Currently, vim's after/syntax only supports by-filetype scripts (in - blockhl.vim's case, that's after/syntax/c.vim). Hence, auto-install - would possibly overwrite the current user's after/syntax/c.vim file. - - In my own case, I use <aftersyntax.vim> (renamed to - after/syntax/c.vim) to allow a after/syntax/c/ directory: -> - http://vim.sourceforge.net/scripts/script.php?script_id=1023 -< - The script allows multiple syntax files to exist separately in the - after/syntax/c subdirectory. I can't bundle aftersyntax.vim in and - build an appropriate tarball for auto-install because of the potential - for the after/syntax/c.vim contained in it to overwrite a user's - c.vim. - - -============================================================================== -6. GetLatestVimScripts Algorithm *getlatestvimscripts-algorithm* - *glvs-alg* - - The Vim sourceforge page dynamically creates a page by keying off of - the so-called script-id. Within the webpage of - - http://vim.sourceforge.net/scripts/script.php?script_id=40 - - is a line specifying the latest source-id (src_id). The source - identifier numbers are always increasing, hence if the src_id is - greater than the one recorded for the script in GetLatestVimScripts - then its time to download a newer copy of that script. - - GetLatestVimScripts will then download the script and update its - internal database of script ids, source ids, and scriptnames. - - The AutoInstall process will: - - Move the file from GetLatest/ to the following directory - Unix : $HOME/.vim - Windows: $HOME\vimfiles - - if the downloaded file ends with ".bz2" - bunzip2 it - else if the downloaded file ends with ".gz" - gunzip it - if the resulting file ends with ".zip" - unzip it - else if the resulting file ends with ".tar" - tar -oxvf it - else if the resulting file ends with ".vim" - move it to the plugin subdirectory - - -============================================================================== -7. GetLatestVimScripts History *getlatestvimscripts-history* *glvs-hist* - - v20 Dec 23, 2005 : * Eric Haarbauer found&fixed a bug with unzip use; - unzip needs the -o flag to overwrite. - v19 Nov 28, 2005 : * v18's GetLatestVimScript line accessed the wrong - script! Fixed. - v18 Mar 21, 2005 : * bugfix to automatic database construction - * bugfix - nowrapscan caused an error - (tnx to David Green for the fix) - Apr 01, 2005 * if shell is bash, "mv" instead of "ren" used in - :AutoInstall:s, even though its o/s is windows - Apr 01, 2005 * when downloading errors occurred, GLVS was - terminating early. It now just goes on to trying - the next script (after trying three times to - download a script description page) - Apr 20, 2005 * bugfix - when a failure to download occurred, - GetLatestVimScripts would stop early and claim that - everything was current. Fixed. - v17 Aug 25, 2004 : * g:GetLatestVimScripts_allowautoinstall, which - defaults to 1, can be used to prevent all - :AutoInstall: - v16 Aug 25, 2004 : * made execution of bunzip2/gunzip/tar/zip silent - * fixed bug with :AutoInstall: use of helptags - v15 Aug 24, 2004 : * bugfix: the "0 0 comment" download prevention wasn't - always preventing downloads (just usually). Fixed. - v14 Aug 24, 2004 : * bugfix -- helptags was using dotvim, rather than - s:dotvim. Fixed. - v13 Aug 23, 2004 : * will skip downloading a file if its scriptid or srcid - is zero. Useful for script authors; that way their - own GetLatestVimScripts activity won't overwrite - their scripts. - v12 Aug 23, 2004 : * bugfix - a "return" got left in the distribution that - was intended only for testing. Removed, now works. - * :AutoInstall: implemented - v11 Aug 20, 2004 : * GetLatestVimScripts is now a plugin: - * :GetLatestVimScripts command - * (runtimepath)/GetLatest/GetLatestVimScripts.dat - now holds scripts that need updating - v10 Apr 19, 2004 : * moved history from script to doc - v9 Jan 23, 2004 : windows (win32/win16/win95) will use - double quotes ("") whereas other systems will use - single quotes ('') around the urls in calls via wget - v8 Dec 01, 2003 : makes three tries at downloading - v7 Sep 02, 2003 : added error messages if "Click on..." or "src_id=" - not found in downloaded webpage - Uses t_ti, t_te, and rs to make progress visible - v6 Aug 06, 2003 : final status messages now display summary of work - ( "Downloaded someqty scripts" or - "Everything was current") - Now GetLatestVimScripts is careful about downloading - GetLatestVimScripts.vim itself! - (goes to <NEW_GetLatestVimScripts.vim>) - v5 Aug 04, 2003 : missing an endif near bottom - v4 Jun 17, 2003 : redraw! just before each "considering" message - v3 May 27, 2003 : Protects downloaded files from errant shell - expansions with single quotes: '...' - v2 May 14, 2003 : extracts name of item to be obtained from the - script file. Uses it instead of comment field - for output filename; comment is used in the - "considering..." line and is now just a comment! - * Fixed a bug: a string-of-numbers is not the - same as a number, so I added zero to them - and they became numbers. Fixes comparison. - -============================================================================== -vim:tw=78:ts=8:ft=help
--- a/runtime/doc/xxd.man +++ b/runtime/doc/xxd.man @@ -86,13 +86,12 @@ OPTIONS found in hexdump. -s [+][-]seek - start at <seek> bytes abs. (or rel.) infile offset. + fRindi- - cates that the seek is relative to the current stdin file posi- - tion (meaningless when not reading from stdin). - indicates - that the seek should be that many characters from the end of the - input (or if combined with +: before the current stdin file - position). Without -s option, xxd starts at the current file - position. + start at <seek> bytes abs. (or rel.) infile offset. + indicates + that the seek is relative to the current stdin file position + (meaningless when not reading from stdin). - indicates that the + seek should be that many characters from the end of the input + (or if combined with +: before the current stdin file position). + Without -s option, xxd starts at the current file position. -u use upper case hex letters. Default is lower case. @@ -101,20 +100,20 @@ OPTIONS CAVEATS xxd -r has some builtin magic while evaluating line number information. - If the output file is seekable, then the linenumbers at the start of - each hexdump line may be out of order, lines may be missing, or over- - lapping. In these cases xxd will lseek(2) to the next position. If the - output file is not seekable, only gaps are allowed, which will be + If the output file is seekable, then the linenumbers at the start of + each hexdump line may be out of order, lines may be missing, or over- + lapping. In these cases xxd will lseek(2) to the next position. If the + output file is not seekable, only gaps are allowed, which will be filled by null-bytes. xxd -r never generates parse errors. Garbage is silently skipped. - When editing hexdumps, please note that xxd -r skips everything on the + When editing hexdumps, please note that xxd -r skips everything on the input line after reading enough columns of hexadecimal data (see option - -c). This also means, that changes to the printable ascii (or ebcdic) - columns are always ignored. Reverting a plain (or postscript) style - hexdump with xxd -r -p does not depend on the correct number of col- - umns. Here anything that looks like a pair of hex-digits is inter- + -c). This also means, that changes to the printable ascii (or ebcdic) + columns are always ignored. Reverting a plain (or postscript) style + hexdump with xxd -r -p does not depend on the correct number of col- + umns. Here anything that looks like a pair of hex-digits is inter- preted. Note the difference between @@ -122,28 +121,28 @@ CAVEATS and % xxd -i < file - xxd -s +seek may be different from xxd -s seek, as lseek(2) is used to + xxd -s +seek may be different from xxd -s seek, as lseek(2) is used to "rewind" input. A '+' makes a difference if the input source is stdin, - and if stdin's file position is not at the start of the file by the - time xxd is started and given its input. The following examples may + and if stdin's file position is not at the start of the file by the + time xxd is started and given its input. The following examples may help to clarify (or further confuse!)... - Rewind stdin before reading; needed because the `cat' has already read + Rewind stdin before reading; needed because the `cat' has already read to the end of stdin. % sh -c "cat > plain_copy; xxd -s 0 > hex_copy" < file - Hexdump from file position 0x480 (=1024+128) onwards. The `+' sign + Hexdump from file position 0x480 (=1024+128) onwards. The `+' sign means "relative to the current position", thus the `128' adds to the 1k where dd left off. - % sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet" + % sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet" < file Hexdump from file position 0x100 ( = 1024-768) on. % sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +-768 > hex_snippet" < file - However, this is a rare situation and the use of `+' is rarely needed. - The author prefers to monitor the effect of xxd with strace(1) or + However, this is a rare situation and the use of `+' is rarely needed. + The author prefers to monitor the effect of xxd with strace(1) or truss(1), whenever -s is used. EXAMPLES @@ -153,7 +152,7 @@ EXAMPLES Print 3 lines (hex 0x30 bytes) from the end of file. % xxd -s -0x30 file - Print 120 bytes as continuous hexdump with 40 octets per line. + Print 120 bytes as continuous hexdump with 20 octets per line. % xxd -l 120 -ps -c 20 xxd.1 2e54482058584420312022417567757374203139 39362220224d616e75616c207061676520666f72 @@ -187,7 +186,7 @@ EXAMPLES % xxd -s 0x36 -l 13 -c 13 xxd.1 0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996 - Create a 65537 byte file with all bytes 0x00, except for the last one + Create a 65537 byte file with all bytes 0x00, except for the last one which is 'A' (hex 0x41). % echo "010000: 41" | xxd -r > file @@ -197,7 +196,7 @@ EXAMPLES * 000fffc: 0000 0000 40 ....A - Create a 1 byte file containing a single 'A' character. The number + Create a 1 byte file containing a single 'A' character. The number after '-r -s' adds to the linenumbers found in the file; in effect, the leading bytes are suppressed. % echo "010000: 41" | xxd -r -s -0x10000 > file @@ -239,7 +238,7 @@ SEE ALSO uuencode(1), uudecode(1), patch(1) WARNINGS - The tools weirdness matches its creators brain. Use entirely at your + The tools weirdness matches its creators brain. Use entirely at your own risk. Copy files. Trace it. Become a wizard. VERSION
--- a/runtime/keymap/tamil_tscii.vim +++ b/runtime/keymap/tamil_tscii.vim @@ -1,7 +1,7 @@ " Keymap file for the editing Tamil language files in TSCII encoding. " " Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com) -" Last updated: August 4, 2005 +" Last updated: 2006 June 17 " " You will need a fixed width TSCII font to use this encoding. The " Avarangal TSCII fixed width font (TSC_AvarangalFxd) is used to test @@ -118,7 +118,7 @@ sA <char-186><char-161> si <char-186><char-162> sii <char-186><char-163> sI <char-186><char-163> -su <char-204> +su <char-205> suu <char-221> sU <char-221> se <char-166><char-186>
deleted file mode 100644 --- a/runtime/plugin/getscript.vim +++ /dev/null @@ -1,470 +0,0 @@ -" --------------------------------------------------------------------- -" GetLatestVimScripts.vim -" Author: Charles E. Campbell, Jr. -" Date: Feb 15, 2006 -" Version: 20 -" Installing: :help glvs-install -" Usage: :help glvs -" -" GetLatestVimScripts: 642 1 :AutoInstall: GetLatestVimScripts.vim -" --------------------------------------------------------------------- -" Initialization: {{{1 -" if you're sourcing this file, surely you can't be -" expecting vim to be in its vi-compatible mode -if &cp - if &verbose - echo "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)" - endif - finish -endif -let s:keepfo = &fo -let s:keepcpo = &cpo -set cpo&vim - -if exists("loaded_GetLatestVimScripts") - finish -endif -let g:loaded_GetLatestVimScripts= "v20" - -" --------------------------------------------------------------------- -" Global Variables: {{{1 -" allow user to change the command for obtaining scripts (does fetch work?) -if !exists("g:GetLatestVimScripts_wget") - let g:GetLatestVimScripts_wget= "wget" -endif -if !exists("g:GetLatestVimScripts_options") - let g:GetLatestVimScripts_options= "-q -O" -endif -if !exists("g:GetLatestVimScripts_allowautoinstall") - let g:GetLatestVimScripts_allowautoinstall= 1 -endif - -"" For debugging: -"let g:GetLatestVimScripts_wget = "echo" -"let g:GetLatestVimScripts_options = "options" - -" check if s:autoinstall is possible -let s:autoinstall= "" -if g:GetLatestVimScripts_allowautoinstall - - if (has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")) && &shell != "bash" - " windows (but not cygwin/bash) - let s:dotvim= "vimfiles" - if !exists("g:GetLatestVimScripts_mv") - let g:GetLatestVimScripts_mv= "ren" - endif - - else - " unix - let s:dotvim= ".vim" - if !exists("g:GetLatestVimScripts_mv") - let g:GetLatestVimScripts_mv= "mv" - endif - endif - - if exists('$HOME') && isdirectory(expand("$HOME")."/".s:dotvim) - let s:autoinstall= $HOME."/".s:dotvim - endif -" call Decho("s:autoinstall<".s:autoinstall.">") -else -" call Decho("g:GetLatestVimScripts_allowautoinstall=".g:GetLatestVimScripts_allowautoinstall.": :AutoInstall: disabled") -endif - -" --------------------------------------------------------------------- -" Public Interface: {{{1 -com! -nargs=0 GetLatestVimScripts call <SID>GetLatestVimScripts() -silent! com -nargs=0 GLVS call <SID>GetLatestVimScripts() - -" --------------------------------------------------------------------- -" GetOneScript: (Get Latest Vim Script) this function operates {{{1 -" on the current line, interpreting two numbers and text as -" ScriptID, SourceID, and Filename. -" It downloads any scripts that have newer versions from vim.sf.net. -fun! <SID>GetOneScript(...) -" call Dfunc("GetOneScript()") - - " set options to allow progress to be shown on screen - let t_ti= &t_ti - let t_te= &t_te - let rs = &rs - set t_ti= t_te= nors - - " put current line on top-of-screen and interpret it into - " a script identifer : used to obtain webpage - " source identifier : used to identify current version - " and an associated comment: used to report on what's being considered - if a:0 >= 3 - let scriptid = a:1 - let srcid = a:2 - let cmmnt = a:3 -" call Decho("scriptid<".scriptid.">") -" call Decho("srcid <".srcid.">") -" call Decho("cmmnt <".cmmnt.">") - else - let curline = getline(".") - let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)$' - try - let scriptid = substitute(curline,parsepat,'\1','e') - catch /^Vim\%((\a\+)\)\=:E486/ - let scriptid= 0 - endtry - try - let srcid = substitute(curline,parsepat,'\2','e') - catch /^Vim\%((\a\+)\)\=:E486/ - let srcid= 0 - endtry - try - let cmmnt = substitute(curline,parsepat,'\3','e') - catch /^Vim\%((\a\+)\)\=:E486/ - let cmmnt= "" - endtry -" call Decho("curline <".curline.">") -" call Decho("parsepat<".parsepat.">") -" call Decho("scriptid<".scriptid.">") -" call Decho("srcid <".srcid.">") -" call Decho("cmmnt <".cmmnt.">") - endif - - if scriptid == 0 || srcid == 0 - " When looking for :AutoInstall: lines, skip scripts that - " have 0 0 scriptname -" call Dret("GetOneScript : skipping a scriptid==srcid==0 line") - return - endif - - let doautoinstall= 0 - if cmmnt =~ ":AutoInstall:" -" call Decho("cmmnt<".cmmnt."> has :AutoInstall:...") - let aicmmnt= substitute(cmmnt,'\s\+:AutoInstall:\s\+',' ','') -" call Decho("aicmmnt<".aicmmnt."> s:autoinstall=".s:autoinstall) - if s:autoinstall != "" - let doautoinstall = g:GetLatestVimScripts_allowautoinstall - endif - else - let aicmmnt= cmmnt - endif -" call Decho("aicmmnt<".aicmmnt.">: doautoinstall=".doautoinstall) - - exe "norm z\<CR>" - redraw! -" call Decho('considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid) - echomsg 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid - - " grab a copy of the plugin's vim.sf.net webpage - let scriptaddr = 'http://vim.sf.net/script.php?script_id='.scriptid - let tmpfile = tempname() - let v:errmsg = "" - - " make three tries at downloading the description - let itry= 1 - while itry <= 3 -" call Decho("try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr) - if has("win32") || has("win16") || has("win95") -" call Decho("silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile.' "'.scriptaddr.'"') - exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile.' "'.scriptaddr.'"' - else -" call Decho("silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile." '".scriptaddr."'") - exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile." '".scriptaddr."'" - endif - if itry == 1 - exe "silent vsplit ".tmpfile - else - silent! e % - endif - - " find the latest source-id in the plugin's webpage - silent! 1 - let findpkg= search('Click on the package to download','W') - if findpkg > 0 - break - endif - let itry= itry + 1 - endwhile -" call Decho(" --- end downloading tries while loop --- itry=".itry) - - " testing: did finding /Click on the package.../ fail? - if findpkg == 0 || itry >= 4 - silent q! - call delete(tmpfile) - " restore options - let &t_ti = t_ti - let &t_te = t_te - let &rs = rs - let s:downerrors = s:downerrors + 1 -" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">") - echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">" -" call Dret("GetOneScript : srch for /Click on the package/ failed") - return - endif -" call Decho('found "Click on the package to download"') - - let findsrcid= search('src_id=','W') - if findsrcid == 0 - silent q! - call delete(tmpfile) - " restore options - let &t_ti = t_ti - let &t_te = t_te - let &rs = rs - let s:downerrors = s:downerrors + 1 -" call Decho("***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">") - echomsg "***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">" -" call Dret("GetOneScript : srch for /src_id/ failed") - return - endif -" call Decho('found "src_id=" in description page') - - let srcidpat = '^\s*<td class.*src_id=\(\d\+\)">\([^<]\+\)<.*$' - let latestsrcid= substitute(getline("."),srcidpat,'\1','') - let fname = substitute(getline("."),srcidpat,'\2','') -" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> fname<".fname.">") - silent q! - call delete(tmpfile) - - " convert the strings-of-numbers into numbers - let srcid = srcid + 0 - let latestsrcid = latestsrcid + 0 -" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." fname<".fname.">") - - " has the plugin's most-recent srcid increased, which indicates - " that it has been updated - if latestsrcid > srcid - let s:downloads= s:downloads + 1 - if fname == bufname("%") - " GetLatestVimScript has to be careful about downloading itself - let fname= "NEW_".fname - endif - - " the plugin has been updated since we last obtained it, so download a new copy -" call Decho("...downloading new <".fname.">") - echomsg "...downloading new <".fname.">" - if has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95") -" call Decho("windows: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"') - exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"' - else -" call Decho("unix: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'") - exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'" - endif - - " AutoInstall: only if doautoinstall is so indicating - if doautoinstall -" call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".fname.")=".filereadable(fname)) - if filereadable(fname) -" call Decho("move <".fname."> to ".s:autoinstall) -" call Decho("DISABLED for testing") - exe "silent !"g:GetLatestVimScripts_mv." ".fname." ".s:autoinstall - let curdir= escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #") - exe "cd ".s:autoinstall - if fname =~ '\.bz2$' -" call Decho("attempt to bunzip2 ".fname) - exe "silent !bunzip2 ".fname - let fname= substitute(fname,'\.bz2$','','') - elseif fname =~ '\.gz$' -" call Decho("attempt to gunzip ".fname) - exe "silent !gunzip ".fname - let fname= substitute(fname,'\.gz$','','') - endif - if fname =~ '\.zip$' -" call Decho("attempt to unzip ".fname) - exe "silent !unzip -o".fname - elseif fname =~ '\.tar$' -" call Decho("attempt to untar ".fname) - exe "silent !tar -oxvf ".fname - endif - if fname =~ '.vim$' -" call Decho("attempt to simply move ".fname." to plugin") - exe "silent !".g:GetLatestVimScripts_mv." ".fname." plugin" - endif - exe "helptags ../".s:dotvim."/doc" - exe "cd ".curdir - endif - endif - - " update the data in the <GetLatestVimScripts.dat> file - let modline=scriptid." ".latestsrcid." ".cmmnt - call setline(line("."),modline) -" call Decho("modline<".modline."> (updated GetLatestVimScripts.dat file)") - endif - - " restore options - let &t_ti= t_ti - let &t_te= t_te - let &rs = rs - -" call Dret("GetOneScript") -endfun - -" --------------------------------------------------------------------- -" GetLatestVimScripts: this function gets the latest versions of {{{1 -" scripts based on the list in -" -" (first dir in runtimepath)/GetLatest/GetLatestVimScripts.dat -fun! <SID>GetLatestVimScripts() -" call Dfunc("GetLatestVimScripts() autoinstall<".s:autoinstall.">") - -" insure that wget is executable - if executable(g:GetLatestVimScripts_wget) != 1 - echoerr "GetLatestVimScripts needs ".g:GetLatestVimScripts_wget." which apparently is not available on your system" -" call Dret("GetLatestVimScripts : wget not executable/availble") - return - endif - - " Find the .../GetLatest sudirectory under the runtimepath - let rtplist= &rtp - while rtplist != "" - let datadir= substitute(rtplist,',.*$','','e')."/GetLatest" - if isdirectory(datadir) -" call Decho("found directory<".datadir.">") - break - endif - unlet datadir - if rtplist =~ ',' - let rtplist= substitute(rtplist,'^.\{-},','','e') - else - let rtplist= "" - endif - endwhile - - " Sanity checks: readability and writability - if !exists("datadir") - echoerr "Unable to find a GetLatest subdirectory on your runtimepath" -" call Dret("GetLatestVimScripts : unable to find a GetLatest subdirectory") - return - endif - if filewritable(datadir) != 2 - echoerr "Your ".datadir." isn't writable" -" call Dret("GetLatestVimScripts : non-writable directory<".datadir.">") - return - endif - let datafile= datadir."/GetLatestVimScripts.dat" - if !filereadable(datafile) - echoerr "Your data file<".datafile."> isn't readable" -" call Dret("GetLatestVimScripts : non-readable datafile<".datafile.">") - return - endif - if !filewritable(datafile) - echoerr "Your data file<".datafile."> isn't writable" -" call Dret("GetLatestVimScripts : non-writable datafile<".datafile.">") - return - endif -" call Decho("datadir <".datadir.">") -" call Decho("datafile <".datafile.">") - - " don't let any events interfere (like winmanager's, taglist's, etc) - let eikeep= &ei - set ei=all - - " record current directory, change to datadir, open split window with - " datafile - let origdir= getcwd() - exe "cd ".escape(substitute(datadir,'\','/','ge'),"|[]*'\" #") - split - exe "e ".escape(substitute(datafile,'\','/','ge'),"|[]*'\" #") - res 1000 - let s:downloads = 0 - let s:downerrors= 0 - - " Check on dependencies mentioned in plugins -" call Decho(" ") -" call Decho("searching plugins for GetLatestVimScripts dependencies") - let lastline = line("$") - let plugins = globpath(&rtp,"plugin/*.vim") - let foundscript = 0 - -" call Decho("plugins<".plugins."> lastline#".lastline) - while plugins != "" - let plugin = substitute(plugins,'\n.*$','','e') - let plugins= (plugins =~ '\n')? substitute(plugins,'^.\{-}\n\(.*\)$','\1','e') : "" - $ -" call Decho(".dependency checking<".plugin."> line$=".line("$")) - exe "silent r ".plugin - while search('^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+','W') != 0 - let newscript= substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e') - let llp1 = lastline+1 - - if newscript !~ '^"' - " found a "GetLatestVimScripts: # #" line in the script; check if its already in the datafile - let curline = line(".") - let noai_script = substitute(newscript,'\s*:AutoInstall:\s*','','e') - exe llp1 - let srchline = search('\<'.noai_script.'\>','bW') -" call Decho("..newscript<".newscript."> noai_script<".noai_script."> srch=".srchline." lastline=".lastline) - - if srchline == 0 - " found a new script to permanently include in the datafile - let keep_rega = @a - let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','') - exe lastline."put a" - echomsg "Appending <".@a."> to ".datafile." for ".newscript -" call Decho("..APPEND (".noai_script.")<".@a."> to GetLatestVimScripts.dat") - let @a = keep_rega - let lastline = llp1 - let curline = curline + 1 - let foundscript = foundscript + 1 -" else " Decho -" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")") - endif - - let curline = curline + 1 - exe curline - endif - - endwhile - let llp1= lastline + 1 -" call Decho(".deleting lines: ".llp1.",$d") - exe "silent! ".llp1.",$d" - endwhile - - if foundscript == 0 - set nomod - endif - - " Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat - set lz -" call Decho(" --- end of dependency checking loop --- ") -" call Decho("call GetOneScript on lines at end of datafile<".datafile.">") - 1 - /^-----/,$g/^\s*\d/call <SID>GetOneScript() - - " Final report (an echomsg) - try - silent! ?^-------? - catch /^Vim\%((\a\+)\)\=:E114/ -" call Dret("GetLatestVimScripts : nothing done!") - return - endtry - exe "norm! kz\<CR>" - let s:msg = "" - if s:downloads == 1 - let s:msg = "Downloaded one updated script to <".datadir.">" - elseif s:downloads == 2 - let s:msg= "Downloaded two updated scripts to <".datadir.">" - elseif s:downloads > 1 - let s:msg= "Downloaded ".s:downloads." updated scripts to <".datadir.">" - else - let s:msg= "Everything was already current" - endif - if s:downerrors > 0 - let s:msg= s:msg." (".s:downerrors." downloading errors)" - endif - echomsg s:msg - " save the file - if &mod - wq - else - q - endif - - " restore events and current directory - exe "cd ".escape(substitute(origdir,'\','/','ge'),"|[]*'\" #") - let &ei= eikeep - set nolz -" call Dret("GetLatestVimScripts : did ".s:downloads." downloads") -endfun -" --------------------------------------------------------------------- - -" Restore Options: {{{1 -let &fo = s:keepfo -let &cpo= s:keepcpo - -" vim: ts=8 sts=2 fdm=marker nowrap
--- a/runtime/plugin/tarPlugin.vim +++ b/runtime/plugin/tarPlugin.vim @@ -1,5 +1,6 @@ " tarPlugin.vim -- a Vim plugin for browsing tarfiles -" Copyright (c) 2002, Michael C. Toren <mct@toren.net> +" Original was copyright (c) 2002, Michael C. Toren <mct@toren.net> +" Modified by Charles E. Campbell, Jr. " Distributed under the GNU General Public License. " " Updates are available from <http://michael.toren.net/code/>. If you @@ -8,7 +9,17 @@ " Also look there for further comments and documentation. " " This part only sets the autocommands. The functions are in autoload/tar.vim. +" --------------------------------------------------------------------- +" Load Once: {{{1 +if &cp || exists("g:loaded_tarPlugin") + finish +endif +let g:loaded_tarPlugin = 1 +let s:keepcpo = &cpo +set cpo&vim +" --------------------------------------------------------------------- +" Public Interface: {{{1 augroup tar au! au BufReadCmd tarfile:* call tar#Read(expand("<amatch>"), 1) @@ -30,4 +41,8 @@ augroup tar au BufReadCmd *.tgz call tar#Browse(expand("<amatch>")) augroup END -" vim: ts=8 +" --------------------------------------------------------------------- +" Restoration And Modelines: {{{1 +" vim: fdm=marker +let &cpo= s:keepcpo +unlet s:keepcpo
--- a/runtime/syntax/mysql.vim +++ b/runtime/syntax/mysql.vim @@ -249,6 +249,7 @@ syn region mysqlFunction start="strcmp( syn region mysqlFunction start="subdate(" end=")" contains=ALL syn region mysqlFunction start="substring(" end=")" contains=ALL syn region mysqlFunction start="substring_index(" end=")" contains=ALL +syn region mysqlFunction start="subtime(" end=")" contains=ALL syn region mysqlFunction start="sum(" end=")" contains=ALL syn region mysqlFunction start="sysdate(" end=")" contains=ALL syn region mysqlFunction start="system_user(" end=")" contains=ALL
--- a/src/po/it.po +++ b/src/po/it.po @@ -12,12 +12,13 @@ msgid "" msgstr "" "Project-Id-Version: vim 7.0\n" -"POT-Creation-Date: 2006-04-25 12:03+0200\n" -"PO-Revision-Date: 2006-05-03 00:02+0200\n" +"POT-Creation-Date: 2007-04-29 13:02+0200\n" +"PO-Revision-Date: 2007-04-29 18:02+0200\n" "Last-Translator: Vlad Sandrini <vlad.gently@gmail.com>\n" "Language-Team: Italian" " Antonio Colombo <azc100@gmail.com>" -" Vlad Sandrini <vlad.gently@gmail.com>\n" +" Vlad Sandrini <vlad.gently@gmail.com>" +" Luciano Montanaro <mikelima@cirulla.net>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO_8859-1\n" "Content-Transfer-Encoding: 8-bit\n" @@ -196,6 +197,9 @@ msgstr "E98: Non riesco a leggere output msgid "E99: Current buffer is not in diff mode" msgstr "E99: Buffer corrente non in modalità 'diff'" +msgid "E793: No other buffer in diff mode is modifiable" +msgstr "E793: Nessun altro buffer è modificabile in modalità 'diff'" + msgid "E100: No other buffer in diff mode" msgstr "E100: Non c'è nessun altro buffer in modalità 'diff'" @@ -621,6 +625,10 @@ msgid "E706: Variable type mismatch for: msgstr "E706: Tipo di variabile non corrispondente per: %s" #, c-format +msgid "E795: Cannot delete variable %s" +msgstr "E795: Non posso cancellare la variabile %s" + +#, c-format msgid "E741: Value is locked: %s" msgstr "E741: Valore di %s non modificabile" @@ -754,6 +762,7 @@ msgstr " mark" msgid " FAILED" msgstr " FALLITO" +#. avoid a wait_return for this message, it's annoying #, c-format msgid "E137: Viminfo file is not writable: %s" msgstr "E137: File viminfo \"%s\" inaccessibile in scrittura" @@ -1299,7 +1308,7 @@ msgstr "" #, no-c-format msgid "E499: Empty file name for '%' or '#', only works with \":p:h\"" -msgstr "E499: Un nome di file nullo per '%' or '#', va bene solo con \":p:h\"" +msgstr "E499: Un nome di file nullo per '%' o '#', va bene solo con \":p:h\"" msgid "E500: Evaluates to an empty string" msgstr "E500: Il valore è una stringa nulla" @@ -1464,6 +1473,9 @@ msgstr "è una directory" msgid "is not a file" msgstr "non è un file" +msgid "is a device (disabled with 'opendevice' option" +msgstr "è una periferica (disabilitata con l'opzione 'opendevice'" + msgid "[New File]" msgstr "[File nuovo]" @@ -1546,7 +1558,7 @@ msgid "E676: No matching autocommands fo msgstr "E676: Nessun autocomando corrispondente per buffer acwrite" msgid "E203: Autocommands deleted or unloaded buffer to be written" -msgstr "E203: Buffer in scrittuta cancellato o scaricato dagli autocomandi" +msgstr "E203: Buffer in scrittura cancellato o scaricato dagli autocomandi" msgid "E204: Autocommand changed number of lines in unexpected way" msgstr "E204: L'autocomando ha modificato numero linee in maniera imprevista" @@ -1560,6 +1572,9 @@ msgstr "Scrittura parziale disabilitata msgid "is not a file or writable device" msgstr "non è un file o un dispositivo su cui si possa scrivere" +msgid "writing to device disabled with 'opendevice' option" +msgstr "scrittura su periferica disabilitata con l'opzione 'opendevice'" + msgid "is read-only (add ! to override)" msgstr "è in sola letture (aggiungi ! per eseguire comunque)" @@ -2195,7 +2210,7 @@ msgid "Printed: %s" msgstr "Stampato: %s" msgid "Printing aborted" -msgstr "Stampa non completata'" +msgstr "Stampa non completata" msgid "E455: Error writing to PostScript output file" msgstr "E455: Errore in scrittura a file PostScript di output" @@ -2458,19 +2473,6 @@ msgstr "numero linea non nell'intervallo msgid "not allowed in the Vim sandbox" msgstr "non ammesso in ambiente protetto" -#, c-format -msgid "E370: Could not load library %s" -msgstr "E370: Non posso caricare la libreria %s" - -msgid "Sorry, this command is disabled: the Perl library could not be loaded." -msgstr "" -"Spiacente, comando non disponibile, non riesco a caricare libreria programmi " -"Perl." - -msgid "E299: Perl evaluation forbidden in sandbox without the Safe module" -msgstr "" -"E299: Valorizzazione Perl vietata in ambiente protetto senza il modulo Safe" - msgid "" "E263: Sorry, this command is disabled, the Python library could not be " "loaded." @@ -2488,7 +2490,7 @@ msgid "softspace must be an integer" msgstr "softspace deve essere un numero intero" msgid "invalid attribute" -msgstr "atrributo non valido" +msgstr "attributo non valido" msgid "writelines() requires list of strings" msgstr "writelines() richiede una lista di stringhe" @@ -2645,7 +2647,7 @@ msgid "E275: Unknown SNiFF+ request: %s" msgstr "E275: Richiesta SNiFF+ sconosciuta: %s" msgid "E276: Error connecting to SNiFF+" -msgstr "E276: Errore connettendosi a SNiFF+" +msgstr "E276: Errore di connessione a SNiFF+" msgid "E278: SNiFF+ not connected" msgstr "E278: SNiFF+ non connesso" @@ -2994,17 +2996,17 @@ msgid "--remote <files>\tEdit <files> in msgstr "--remote <file>\tApri <file> in un server Vim se possibile" msgid "--remote-silent <files> Same, don't complain if there is no server" -msgstr "--remote-silent <files> Stessa cosa, ignora se non esiste un server" +msgstr "--remote-silent <file> Stessa cosa, ignora se non esiste un server" msgid "" "--remote-wait <files> As --remote but wait for files to have been edited" msgstr "" -"--remote-wait <file> Come --remote ma aspetta che file siano elaborati" +"--remote-wait <file> Come --remote ma aspetta che i file siano elaborati" msgid "" "--remote-wait-silent <files> Same, don't complain if there is no server" msgstr "" -"--remote-wait-silent <files> Stessa cosa, ignora se non esiste un server" +"--remote-wait-silent <file> Stessa cosa, ignora se non esiste un server" msgid "--remote-tab <files> As --remote but open tab page for each file" msgstr "--remote-tab <file> Come --remote ma apre una linguetta per ogni file" @@ -3207,7 +3209,7 @@ msgid "" "# History of marks within files (newest to oldest):\n" msgstr "" "\n" -"# Storia dei mark all'interno dei files (dai più recenti ai meno recenti):\n" +"# Storia dei mark all'interno dei file (dai più recenti ai meno recenti):\n" msgid "Missing '>'" msgstr "Manca '>'" @@ -3329,6 +3331,10 @@ msgstr "" ",\n" "o il file è stato danneggiato." +msgid " has been damaged (page size is smaller than minimum value).\n" +msgstr "" +" è stato danneggiato (la dimensione della pagina è inferiore al minimo).\n" + #, c-format msgid "Using swap file \"%s\"" msgstr "Uso swap file \"%s\"" @@ -3671,6 +3677,10 @@ msgstr "E328: I Menu esistono solo in un'altra modalità" msgid "E329: No menu \"%s\"" msgstr "E329: Nessun Menu \"%s\"" +#. Only a mnemonic or accelerator is not valid. +msgid "E792: Empty menu name" +msgstr "E792: Nome menu non valido" + msgid "E330: Menu path must not lead to a sub-menu" msgstr "E330: Il percorso del Menu non deve condurre a un sotto-Menu" @@ -4558,7 +4568,7 @@ msgid "E66: \\z( not allowed here" msgstr "E66: \\z( non consentito qui" msgid "E67: \\z1 et al. not allowed here" -msgstr "E67: \\z1 et al. non consentiti qui" +msgstr "E67: \\z1 ecc. non consentiti qui" msgid "E68: Invalid character after \\z" msgstr "E68: Carattere non ammesso dopo \\z" @@ -5025,6 +5035,7 @@ msgstr "Spiacente, nessun suggerimento" msgid "Sorry, only %ld suggestions" msgstr "Spiacente, solo %ld suggerimenti" +#. for when 'cmdheight' > 1 #. avoid more prompt #, c-format msgid "Change \"%.*s\" to:" @@ -5450,6 +5461,13 @@ msgstr "" msgid "" "\n" +"MS-Windows 64 bit GUI version" +msgstr "" +"\n" +"Versione MS-Windows 64 bit GUI" + +msgid "" +"\n" "MS-Windows 32 bit GUI version" msgstr "" "\n" @@ -5765,6 +5783,19 @@ msgstr "E446: Nessun nome file sotto il msgid "E447: Can't find file \"%s\" in path" msgstr "E447: Non riesco a trovare il file \"%s\" nel percorso" +#, c-format +msgid "E370: Could not load library %s" +msgstr "E370: Non posso caricare la libreria %s" + +msgid "Sorry, this command is disabled: the Perl library could not be loaded." +msgstr "" +"Spiacente, comando non disponibile, non riesco a caricare libreria programmi " +"Perl." + +msgid "E299: Perl evaluation forbidden in sandbox without the Safe module" +msgstr "" +"E299: Valorizzazione Perl vietata in ambiente protetto senza il modulo Safe" + msgid "Edit with &multiple Vims" msgstr "Apri con &molti Vim" @@ -6033,9 +6064,9 @@ msgid "E46: Cannot change read-only vari msgstr "E46: Non posso cambiare la variabile read-only \"%s\"" #, c-format -msgid "E46: Cannot set variable in the sandbox: \"%s\"" +msgid "E794: Cannot set variable in the sandbox: \"%s\"" msgstr "" -"E46: Non posso impostare la variabile read-only in ambiente protetto: \"%s\"" +"E794: Non posso impostare la variabile read-only in ambiente protetto: \"%s\"" msgid "E47: Error while reading errorfile" msgstr "E47: Errore leggendo il file errori"
--- a/src/proto/tag.pro +++ b/src/proto/tag.pro @@ -1,12 +1,12 @@ /* tag.c */ -extern int do_tag __ARGS((char_u *tag, int type, int count, int forceit, int verbose)); -extern void tag_freematch __ARGS((void)); -extern void do_tags __ARGS((exarg_T *eap)); -extern int find_tags __ARGS((char_u *pat, int *num_matches, char_u ***matchesp, int flags, int mincount, char_u *buf_ffname)); -extern void free_tag_stuff __ARGS((void)); -extern int get_tagfname __ARGS((tagname_T *tnp, int first, char_u *buf)); -extern void tagname_free __ARGS((tagname_T *tnp)); -extern void simplify_filename __ARGS((char_u *filename)); -extern int expand_tags __ARGS((int tagnames, char_u *pat, int *num_file, char_u ***file)); -extern int get_tags __ARGS((list_T *list, char_u *pat)); +int do_tag __ARGS((char_u *tag, int type, int count, int forceit, int verbose)); +void tag_freematch __ARGS((void)); +void do_tags __ARGS((exarg_T *eap)); +int find_tags __ARGS((char_u *pat, int *num_matches, char_u ***matchesp, int flags, int mincount, char_u *buf_ffname)); +void free_tag_stuff __ARGS((void)); +int get_tagfname __ARGS((tagname_T *tnp, int first, char_u *buf)); +void tagname_free __ARGS((tagname_T *tnp)); +void simplify_filename __ARGS((char_u *filename)); +int expand_tags __ARGS((int tagnames, char_u *pat, int *num_file, char_u ***file)); +int get_tags __ARGS((list_T *list, char_u *pat)); /* vim: set ft=c : */