diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-01-31 19:19:04 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-01-31 19:19:04 +0000 |
commit | 2ce06f6eb9a10bbbf1b3a0abf9f8c1bb71311e54 (patch) | |
tree | 6dc3e7795458f6ab29244cf926d32ece9b1f696d /runtime | |
parent | b23c33872aa46de39bdc2cd2cbded697afa6ad08 (diff) |
updated for version 7.0046
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 80 | ||||
-rw-r--r-- | runtime/doc/options.txt | 6 | ||||
-rw-r--r-- | runtime/doc/repeat.txt | 6 | ||||
-rw-r--r-- | runtime/doc/tags | 11 | ||||
-rw-r--r-- | runtime/filetype.vim | 13 | ||||
-rw-r--r-- | runtime/lang/menu_zh_tw.big5.vim | 2 | ||||
-rw-r--r-- | runtime/lang/menu_zh_tw.utf-8.vim | 11 | ||||
-rw-r--r-- | runtime/menu.vim | 7 |
8 files changed, 115 insertions, 21 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index cbd233a398..dc58f1cd71 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.0aa. Last change: 2005 Jan 27 +*eval.txt* For Vim version 7.0aa. Last change: 2005 Jan 31 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1458,6 +1458,7 @@ inputsave() Number save and clear typeahead inputsecret( {prompt} [, {text}]) String like input() but hiding the text insert( {list}, {item} [, {idx}]) List insert {item} in {list} [before {idx}] isdirectory( {directory}) Number TRUE if {directory} is a directory +islocked( {expr}) Number TRUE if {expr} is locked items( {dict}) List List of key-value pairs in {dict} join( {list} [, {sep}]) String join {list} items into one String keys( {dict}) List List of keys in {dict} @@ -2783,6 +2784,19 @@ isdirectory({directory}) *isdirectory()* exist, or isn't a directory, the result is FALSE. {directory} is any expression, which is used as a String. +islocked({expr}) *islocked()* + The result is a Number, which is non-zero when {expr} is the + name of a locked variable. + {expr} must be the name of a variable, List item or Dictionary + entry, not the variable itself! Example: > + :let alist = [0, ['a', 'b'], 2, 3] + :lockvar 1 alist + :echo islocked('alist') " 1 + :echo islocked('alist[1]') " 0 + +< When {expr} is a variable that does not exist you get an error + message. Use |exists()| to check for existance. + items({dict}) *items()* Return a List with all the key-value pairs of {dict}. Each List item is a list with two items: the key of a {dict} entry @@ -4161,7 +4175,14 @@ Up to 20 arguments can be given, separated by commas. After the named arguments an argument "..." can be specified, which means that more arguments may optionally be following. In the function the extra arguments can be used as "a:1", "a:2", etc. "a:0" is set to the number of extra arguments (which -can be 0). "a:000" is set to a List that contains these arguments. +can be 0). "a:000" is set to a List that contains these arguments. Note that +"a:1" is the same as "a:000[0]". + *E742* +The a: scope and the variables in it cannot be changed, they are fixed. +However, if a List or Dictionary is used, you can changes their contents. +Thus you can pass a List to a function and have the function add an item to +it. If you want to make sure the function cannot change a List or Dictionary +use |:lockvar|. When not using "...", the number of arguments in a function call must be equal to the number of named arguments. When using "...", the number of arguments @@ -4457,10 +4478,11 @@ This would call the function "my_func_whizz(parameter)". # Number * Funcref - *:unlet* *:unl* *E108* -:unl[et][!] {var-name} ... - Remove the internal variable {var-name}. Several - variable names can be given, they are all removed. + +:unl[et][!] {name} ... *:unlet* *:unl* *E108* + Remove the internal variable {name}. Several variable + names can be given, they are all removed. The name + may also be a List or Dictionary item. With [!] no error message is given for non-existing variables. One or more items from a List can be removed: > @@ -4470,6 +4492,52 @@ This would call the function "my_func_whizz(parameter)". :unlet dict['two'] :unlet dict.two +:lockv[ar][!] [depth] {name} ... *:lockvar* *:lockv* + Lock the internal variable {name}. Locking means that + it can no longer be changed (until it is unlocked). + A locked variable can be deleted: > + :lockvar v + :let v = 'asdf' " fails! + :unlet v +< *E741* + If you try to change a locked variable you get an + error message: "E741: Value of {name} is locked" + + [depth] is relevant when locking a List or Dictionary. + It specifies how deep the locking goes: + 1 Lock the List or Dictionary itself, + cannot add or remove items, but can + still change their values. + 2 Also lock the values, cannot change + the items. If an item is a List or + Dictionary, cannot add or remove + items, but can still change the + values. + 3 Like 2 but for the List/Dictionary in + the List/Dictionary, one level deeper. + The default [depth] is 2, thus when {name} is a List + or Dictionary the values cannot be changed. + *E743* + For unlimited depth use [!] and omit [depth]. + However, there is a maximum depth of 100 to catch + loops. + + Note that when two variables refer to the same List + and you lock one of them, the List will also be locked + when used through the other variable. Example: > + :let l = [0, 1, 2, 3] + :let cl = l + :lockvar l + :let cl[1] = 99 " won't work! +< You may want to make a copy of a list to avoid this. + See |deepcopy()|. + + +:unlo[ckvar][!] [depth] {name} ... *:unlockvar* *:unlo* + Unlock the internal variable {name}. Does the + opposite of |:lockvar|. + + :if {expr1} *:if* *:endif* *:en* *E171* *E579* *E580* :en[dif] Execute the commands until the next matching ":else" or ":endif" if {expr1} evaluates to non-zero. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 0adbb8d3b8..d79aab72e2 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.0aa. Last change: 2005 Jan 26 +*options.txt* For Vim version 7.0aa. Last change: 2005 Jan 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -4402,6 +4402,10 @@ A jump table for the options with a short description can be found at |Q_op|. knows about pasting and will mostly do the right thing without 'paste' being set. The same is true for a terminal where Vim handles the mouse clicks itself. + This option is reset when starting the GUI. Thus if you set it in + your .vimrc it will work in a terminal, but not in the GUI. Setting + 'paste' in the GUI has side effects: e.g., the Paste toolbar button + will no longer work in Insert mode, because it uses a mapping. When the 'paste' option is switched on (also when it was already on): - mapping in Insert mode and Command-line mode is disabled - abbreviations are disabled diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 7ef1cf9508..ef8442b25a 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -1,4 +1,4 @@ -*repeat.txt* For Vim version 7.0aa. Last change: 2004 Jul 30 +*repeat.txt* For Vim version 7.0aa. Last change: 2005 Jan 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -497,6 +497,10 @@ The match for functions is done against the name as it's shown in the output of ":function". For local functions this means that something like "<SNR>99_" is prepended. +Note that functions are first loaded and later executed. When they are loaded +the "file" breakpoints are checked, when they are executed the "func" +breakpoints. + DELETING BREAKPOINTS *:breakd* *:breakdel* *E161* diff --git a/runtime/doc/tags b/runtime/doc/tags index e86052cbf1..227d1f307c 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -2059,6 +2059,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :loadview starting.txt /*:loadview* :loc motion.txt /*:loc* :lockmarks motion.txt /*:lockmarks* +:lockv eval.txt /*:lockv* +:lockvar eval.txt /*:lockvar* :ls windows.txt /*:ls* :lu map.txt /*:lu* :lunmap map.txt /*:lunmap* @@ -2118,6 +2120,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :mzfile if_mzsch.txt /*:mzfile* :mzscheme if_mzsch.txt /*:mzscheme* :n editing.txt /*:n* +:nbkey netbeans.txt /*:nbkey* :ne editing.txt /*:ne* :new windows.txt /*:new* :next editing.txt /*:next* @@ -2505,6 +2508,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :unhide windows.txt /*:unhide* :unl eval.txt /*:unl* :unlet eval.txt /*:unlet* +:unlo eval.txt /*:unlo* +:unlockvar eval.txt /*:unlockvar* :unm map.txt /*:unm* :unm! map.txt /*:unm!* :unmap map.txt /*:unmap* @@ -3641,6 +3646,10 @@ E738 eval.txt /*E738* E739 starting.txt /*E739* E74 message.txt /*E74* E740 eval.txt /*E740* +E741 eval.txt /*E741* +E742 eval.txt /*E742* +E743 eval.txt /*E743* +E744 netbeans.txt /*E744* E75 vi_diff.txt /*E75* E76 pattern.txt /*E76* E77 message.txt /*E77* @@ -5292,6 +5301,7 @@ ip motion.txt /*ip* iquote motion.txt /*iquote* is motion.txt /*is* isdirectory() eval.txt /*isdirectory()* +islocked() eval.txt /*islocked()* items() eval.txt /*items()* iw motion.txt /*iw* i{ motion.txt /*i{* @@ -5553,6 +5563,7 @@ nb-terms netbeans.txt /*nb-terms* ncf-syntax syntax.txt /*ncf-syntax* ncf.vim syntax.txt /*ncf.vim* netbeans netbeans.txt /*netbeans* +netbeans-commands netbeans.txt /*netbeans-commands* netbeans-configure netbeans.txt /*netbeans-configure* netbeans-download netbeans.txt /*netbeans-download* netbeans-intro netbeans.txt /*netbeans-intro* diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 40f68b307e..fa1908cf70 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2005 Jan 24 +" Last Change: 2005 Jan 27 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -541,7 +541,7 @@ au BufNewFile,BufRead *.mas,*.master setf master au BufNewFile,BufRead *.fs,*.ft setf forth " Fortran -au BufNewFile,BufRead *.f,*.F,*.for,*.fpp,*.ftn,*.f77,*.F77,*.f90,*.F90,*.f95,*.F95 setf fortran +au BufNewFile,BufRead *.f,*.F,*.for,*.fpp,*.FPP*.ftn,*.f77,*.F77,*.f90,*.F90,*.f95,*.F95 setf fortran " FStab au BufNewFile,BufRead fstab setf fstab @@ -647,15 +647,18 @@ au BufNewFile,BufRead *.odl,*.mof setf msidl " Icewm menu au BufNewFile,BufRead */.icewm/menu setf icemenu -" Inform -au BufNewFile,BufRead .indent.pro setf indent - " IDL (Interactive Data Language) au BufNewFile,BufRead *.pro setf idlang " Inform +au BufNewFile,BufRead .indent.pro setf indent + +" Inform au BufNewFile,BufRead *.inf,*.INF setf inform +" Ipfilter +au BufNewFile,BufRead ipf.conf,ipf.rules setf ipfilter + " Informix 4GL (source - canonical, include file, I4GL+M4 preproc.) au BufNewFile,BufRead *.4gl,*.4gh,*.m4gl setf fgl diff --git a/runtime/lang/menu_zh_tw.big5.vim b/runtime/lang/menu_zh_tw.big5.vim index 0810159180..f437ce7c23 100644 --- a/runtime/lang/menu_zh_tw.big5.vim +++ b/runtime/lang/menu_zh_tw.big5.vim @@ -1 +1,3 @@ +" Menu Translations: Traditional Chinese + source <sfile>:p:h/menu_chinese_taiwan.950.vim diff --git a/runtime/lang/menu_zh_tw.utf-8.vim b/runtime/lang/menu_zh_tw.utf-8.vim index 871cece9e7..97c56a3973 100644 --- a/runtime/lang/menu_zh_tw.utf-8.vim +++ b/runtime/lang/menu_zh_tw.utf-8.vim @@ -1,6 +1,6 @@ -" Menu Translations: Traditional Chinese (for UTF-8) -" Translated By: Hung-Teh, Lin <piaip@csie.ntu.edu.tw> -" Last Change: Thu Apr 24 17:35:17 CST 2003 +" Menu Translations: Traditional Chinese +" Translated By: Hung-Te Lin <piaip@csie.ntu.edu.tw> +" Last Change: 2005/01/28 02:51:38 " {{{ Quit when menu translations have already been done. if exists("did_menu_trans") @@ -19,7 +19,8 @@ menutrans &User\ Manual 使用者手冊(&U) menutrans &How-to\ links 如何作\.\.\.(&H) menutrans &GUI 圖型界面(&G) menutrans &Credits 感謝(&C) -menutrans Co&pying 版權宣告(&P) +menutrans Co&pying 版權(&P) +menutrans &Sponsor/Register 贊助/註冊(&S) menutrans O&rphans 拯救孤兒(&R) " ------------------------------------------------------------------------ menutrans &Version 程式版本資訊(&V) @@ -59,7 +60,7 @@ menutrans &Paste<Tab>"+gP 貼上(&P)<Tab>"+gP menutrans Put\ &Before<Tab>[p 貼到游標前(&B)<Tab>[p menutrans Put\ &After<Tab>]p 貼到游標後(&A)<Tab>]p menutrans &Delete<Tab>x 刪除(&D)<Tab>x -menutrans &Select\ all<Tab>ggVG 全選(&S)<Tab>ggvG +menutrans &Select\ All<Tab>ggVG 全選(&S)<Tab>ggvG " ------------------------------------------------------------------------ menutrans &Find\.\.\. 尋找(&F)\.\.\. menutrans Find\ and\ Rep&lace\.\.\. 尋找並取代(&L)\.\.\. diff --git a/runtime/menu.vim b/runtime/menu.vim index df9c65b6e6..e89291b16f 100644 --- a/runtime/menu.vim +++ b/runtime/menu.vim @@ -2,7 +2,7 @@ " You can also use this as a start for your own set of menus. " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2004 Dec 04 +" Last Change: 2005 Jan 30 " Note that ":an" (short for ":anoremenu") is often used to make a menu work " in all modes and avoid side effects from mappings defined by the user. @@ -54,12 +54,13 @@ if exists("v:lang") || &langmenu != "" " There is no exact match, try matching with a wildcard added " (e.g. find menu_de_de.iso_8859-1.vim if s:lang == de_DE). let s:lang = substitute(s:lang, '\.[^.]*', "", "") - exe "runtime! lang/menu_" . s:lang . "*.vim" + exe "runtime! lang/menu_" . s:lang . "[^a-z]*.vim" if !exists("did_menu_trans") && strlen($LANG) > 1 " On windows locale names are complicated, try using $LANG, it might " have been set by set_init_1(). - exe "runtime! lang/menu_" . tolower($LANG) . "*.vim" + " But don't match "slovak" when $LANG is "sl". + exe "runtime! lang/menu_" . tolower($LANG) . "[^a-z]*vim" endif endif endif |