diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 0aad840f7a90029e22cd0ae6726194f04ba2c17d..35dd9265a93402e97526210da58686f95df9fd9d 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1139,7 +1139,7 @@ characters. If the String ends in a <NL>, it is regarded as a linewise register. {not in Vi} 7. Selection and drop registers "*, "+ and "~ -Use these register for storing and retrieving the selected text for the GUI. +Use these registers for storing and retrieving the selected text for the GUI. See |quotestar| and |quoteplus|. When the clipboard is not available or not working, the unnamed register is used instead. For Unix systems the clipboard is only available when the |+xterm_clipboard| feature is present. {not in Vi} diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index b189f9b35a0efa1e31cc5d5698d86e5d6751d521..667c5da97e1120706e0591ee4dd5eed591727cf6 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1767,6 +1767,7 @@ getpos( {expr}) List position of cursor, mark, etc. getqflist() List list of quickfix items getreg( [{regname} [, 1]]) String contents of register getregtype( [{regname}]) String type of register +gettabvar( {nr}, {varname}) any variable {varname} in tab {nr} gettabwinvar( {tabnr}, {winnr}, {name}) any {name} in {winnr} in tab page {tabnr} getwinposx() Number X coord in pixels of GUI Vim window @@ -1886,6 +1887,7 @@ setmatches( {list}) Number restore a list of matches setpos( {expr}, {list}) Number set the {expr} position to {list} setqflist( {list}[, {action}]) Number modify quickfix list using {list} setreg( {n}, {v}[, {opt}]) Number set register to value and type +settabvar( {nr}, {varname}, {val}) set {varname} in tab page {nr} to {val} settabwinvar( {tabnr}, {winnr}, {varname}, {val}) set {varname} in window {winnr} in tab page {tabnr} to {val} setwinvar( {nr}, {varname}, {val}) set {varname} in window {nr} to {val} @@ -3354,6 +3356,12 @@ getregtype([{regname}]) *getregtype()* <CTRL-V> is one character with value 0x16. If {regname} is not specified, |v:register| is used. +gettabvar({tabnr}, {varname}) *gettabvar()* + Get the value of a tab-local variable {varname} in tab page + {tabnr}. |t:var| + Tabs are numbered starting with one. + Note that the name without "t:" must be used. + gettabwinvar({tabnr}, {winnr}, {varname}) *gettabwinvar()* Get the value of window-local variable {varname} in window {winnr} in tab page {tabnr}. @@ -5103,6 +5111,15 @@ setreg({regname}, {value} [,{options}]) nothing: > :call setreg('a', '', 'al') +settabvar({tabnr}, {varname}, {val}) *settabvar()* + Set tab-local variable {varname} to {val} in tab page {tabnr}. + |t:var| + Note that the variable name without "t:" must be used. + Tabs are numbered starting with one. + Vim briefly goes to the tab page {tabnr}, this may trigger + TabLeave and TabEnter autocommands. + This function is not available in the |sandbox|. + settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()* Set option or local variable {varname} in window {winnr} to {val}. diff --git a/runtime/doc/ft_sql.txt b/runtime/doc/ft_sql.txt index fe3ceba713326f8129bc97bb47c1ff2fb5968e71..e58c0afac47be9c15a2cd096ad4935789a8e705b 100644 --- a/runtime/doc/ft_sql.txt +++ b/runtime/doc/ft_sql.txt @@ -536,7 +536,7 @@ Example of using column completion: completion window is active. If the completion popup window is not active, a normal <Right> or <Left> will be executed. -Lets look how we can build a SQL statement dynamically. A select statement +Let's look at how we can build a SQL statement dynamically. A select statement requires a list of columns. There are two ways to build a column list using the SQL completion plugin. > One column at a time: @@ -738,8 +738,8 @@ platform you can also use <C-Space> or ALT keys. Many times SQL can be used with different filetypes. For example Perl, Java, PHP, Javascript can all interact with a database. Often you need both the SQL -completion as well as the completion capabilities for the current language you -are editing. +completion and the completion capabilities for the current language you are +editing. This can be enabled easily with the following steps (assuming a Perl file): > 1. :e test.pl diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index 73663e093b1dc157aac7d62a0ea499f7fc26c0f5..925a491b1c78aa988973d00b6d55b645e940a03b 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -678,7 +678,7 @@ and Photon GUI. It should turn up in other GUIs in due course. The default toolbar is setup in menu.vim. The display of the toolbar is controlled by the 'guioptions' letter 'T'. You can thus have menu & toolbar together, or either on its own, or neither. -The appearance is controlled by the 'toolbar' option. You can chose between +The appearance is controlled by the 'toolbar' option. You can choose between an image, text or both. *toolbar-icon* diff --git a/runtime/doc/gui_x11.txt b/runtime/doc/gui_x11.txt index ca1184cece6a7adc1e00b6412e6858142839a468..596e1f096b2c0fa3cbb97c91be9edc2b8dbb93b8 100644 --- a/runtime/doc/gui_x11.txt +++ b/runtime/doc/gui_x11.txt @@ -453,8 +453,8 @@ searched for. If all three fail, the GUI will be disabled. For GTK+, Vim's configuration process requires that GTK+ be properly installed. That is, the shell script 'gtk-config' must be in your PATH, and you can already successful compile, build, and execute a GTK+ program. The -reason for this is because the compiler flags (CFLAGS) and link flags -(LDFLAGS) are obtained through the 'gtk-config' shell script. +reason for this is that the compiler flags (CFLAGS) and link flags (LDFLAGS) +are obtained through the 'gtk-config' shell script. If you want to build with GTK+ 2 support pass the --enable-gtk2-check argument to ./configure. Optionally, support for GNOME 2 will be compiled if the diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index 563c41126e4aaa11db1896d4489bf8d609e20d85..f221fbc9a3d92c7aee1607af2911118713167423 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1358,7 +1358,7 @@ Script completes: - function names with additional info: - in case of built-in functions list of possible arguments and after | type data returned by function - - in case of user function arguments and name of file were function was + - in case of user function arguments and name of file where function was defined (if it is not current file) - constants names @@ -1446,8 +1446,8 @@ a look at the PHP filetype to see how this works. If you edit a file called, index.php, run the following command: > :syntax list -First thing you will notice is there are many different syntax groups. The -PHP language can include elements from different languages like HTML, +The first thing you will notice is that there are many different syntax groups. +The PHP language can include elements from different languages like HTML, JavaScript and many more. The syntax plugin will only include syntax groups that begin with the filetype, "php", in this case. For example these syntax groups are included by default with the PHP: phpEnvVar, phpIntVar, diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt index 416cbbd78d0a1df90615d4c8957460f4ff61a773..13dfc5973b0aded504c9f2d186ae181909b3bbb9 100644 --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -753,7 +753,7 @@ Then add a command to your |gvimrc| file to set 'guifont': > X INPUT METHOD (XIM) BACKGROUND *XIM* *xim* *x-input-method* -XIM is an international input module for X. There are two kind of structures, +XIM is an international input module for X. There are two kinds of structures, Xlib unit type and |IM-server| (Input-Method server) type. |IM-server| type is suitable for complex input, such as CJK. @@ -826,7 +826,7 @@ Use the RPM or port for your system. of Preedit Area and Status Area: |OnTheSpot|, |OffTheSpot|, |OverTheSpot| and |Root|. - Currently, GUI Vim support three style, |OverTheSpot|, |OffTheSpot| and + Currently, GUI Vim supports three styles, |OverTheSpot|, |OffTheSpot| and |Root|. *. on-the-spot *OnTheSpot* diff --git a/runtime/doc/netbeans.txt b/runtime/doc/netbeans.txt index 3d5a97062e92ba6977e01f8006f3b7dd3f0c4d7f..4d44965586fc77043976afabf56d52510734365d 100644 --- a/runtime/doc/netbeans.txt +++ b/runtime/doc/netbeans.txt @@ -101,7 +101,8 @@ use the |clientserver| interface. ============================================================================== 3. Configuring Vim for NetBeans *netbeans-configure* -For more help installing Vim, please read |usr_90.txt| in the Vim User Manual. +For more help about installing Vim, please read |usr_90.txt| in the Vim User +Manual. On Unix: diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 3493a14bbc495dc5665141e6eb047a26a7d032ca..a2d2a4a71242ffc79aa16438422089d231689738 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -5292,7 +5292,7 @@ A jump table for the options with a short description can be found at |Q_op|. local to window {not in Vi} Show the line number relative to the line with the cursor in front of - each line. Relative line numbers help you using the |count| you can + each line. Relative line numbers help you use the |count| you can precede some vertical motion commands (e.g. j k + -) with, without having to calculate it yourself. Especially useful in combination with other commands (e.g. y d c < > gq gw =). diff --git a/runtime/doc/os_390.txt b/runtime/doc/os_390.txt index f0c9c44baa9fbb0096418b9a77b5fbafafddf504..a0a715549f5b7bcb85da48fd04f5a9bef23e0ad0 100644 --- a/runtime/doc/os_390.txt +++ b/runtime/doc/os_390.txt @@ -190,7 +190,7 @@ to only work for the opening of menus (like <Alt-F> to open the file menu). They still do not work for the menu items themselves (like <Alt-F>O to open the file browser). -There is no solution for this as of yet. +There is no solution for this yet. ============================================================================== 7. Bugs *OS390-bugs* *zOS-Bugs* diff --git a/runtime/doc/os_os2.txt b/runtime/doc/os_os2.txt index 13fe7931240ef19e751c794f55593857fe35ecee..b262d6d1028b29446f014affc15cc0f2feba67d2 100644 --- a/runtime/doc/os_os2.txt +++ b/runtime/doc/os_os2.txt @@ -201,7 +201,7 @@ vim-manner and call: > which will write your selection right into OS/2's clipboard. -For ease of use you might want to add some maps for this commands. E.g. to +For ease of use you might want to add some maps for these commands. E.g. to use F11 to paste the clipboard into Vim and F12 to copy selected text to the clipboard you would use: > diff --git a/runtime/doc/os_vms.txt b/runtime/doc/os_vms.txt index a31ac154163832f74f0cd9f4e7b3c1a04ac61d90..08482bbd2131f72963cbd9019e8844a97d426367 100644 --- a/runtime/doc/os_vms.txt +++ b/runtime/doc/os_vms.txt @@ -99,7 +99,7 @@ specific source might contain CTAGS source files as described above. You can find more information about CTAGS on VMS at http://www.polarhome.com/ctags/ -Advanced users may try some acrobatics in FEATURE.H file also. +Advanced users may try some acrobatics in FEATURE.H file as well. It is possible to compile with +xfontset +xim options too, but then you have to set up GUI fonts etc. correctly. See :help xim from Vim command prompt. diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index 41c6bd68595a4688c2805cda54b7746568ba7042..b57585be22fa503223acd9030b3bab9081ca9032 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -456,7 +456,7 @@ browsed remote directories, for example. On the other hand, thanks go to Jan M. for pointing out the many vulnerabilities that netrw (and vim itself) had had in handling "crafted" filenames. The |shellescape()| and |fnameescape()| functions were written in -response by Bram Moolenaar to handle these sort of problems, and netrw has +response by Bram Moolenaar to handle this sort of problems, and netrw has been modified to use them. Still, my advice is, if the "filename" looks like a vim command that you aren't comfortable with having executed, don't open it. diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 6a9be16ab05a82d35ddb0b9e9bfbca359bdeb1ea..db7a82df5d1c153217271f56ae683632d7a93a7d 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1260,7 +1260,7 @@ prints information about entering a directory in the form "Making all in dir". This can be solved by printing absolute directories in the "enter directory" message or by printing "leave directory" messages.. -To avoid this problems, ensure to print absolute directory names and "leave +To avoid this problem, ensure to print absolute directory names and "leave directory" messages. Examples for Makefiles: diff --git a/runtime/doc/quotes.txt b/runtime/doc/quotes.txt index 8d8814fa5c0f828b1691146cddd1aa2572496b3d..67ea2b042b9cebfb8f3ca5afe24926d6f3bb1bc8 100644 --- a/runtime/doc/quotes.txt +++ b/runtime/doc/quotes.txt @@ -211,7 +211,7 @@ I cannot believe how great it is to use VIM. I think the guys at work are getting tired of hearing me bragging about it. Others eyes are lighting up. (Rick Croote) -Emacs takes way to much time to start up and run, it is to big and bulky for +Emacs takes way too much time to start up and run, it is to big and bulky for effective use and the interface is more confusing than it is of any help. VIM however is short, it is fast, it is powerful, it has a good interface and it is all purpose. (Paal Ditlefsen Ekran) diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index b4e9e79077d9bdc892d3b4023db1104d0ca88305..921f12028f601b50f649ba2ef43953f17171db6b 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -217,7 +217,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. Don't use "ucs-2" or "ucs-4", scripts cannot be in these encodings (they would contain NUL bytes). When a sourced script starts with a BOM (Byte Order - Mark) in utf-8 format Vim will recognized it, no need + Mark) in utf-8 format Vim will recognize it, no need to use ":scriptencoding utf-8" then. When compiled without the |+multi_byte| feature this diff --git a/runtime/doc/scroll.txt b/runtime/doc/scroll.txt index f6c0f69d811a9735ed2445958836a34e5d15430d..f3a6aae93f3a4d8161ba6933752af8c563227f9d 100644 --- a/runtime/doc/scroll.txt +++ b/runtime/doc/scroll.txt @@ -132,7 +132,7 @@ z. Redraw, line [count] at center of window (default *zz* zz Like "z.", but leave the cursor in the same column. - Careful: If caps-lock is on, this commands becomes + Careful: If caps-lock is on, this command becomes "ZZ": write buffer and exit! {not in Vi} *z-* @@ -193,7 +193,7 @@ ze Scroll the text horizontally to position the cursor 5. Scrolling synchronously *scroll-binding* Occasionally, it is desirable to bind two or more windows together such that -when one window is scrolled, the other windows are scrolled also. In Vim, +when one window is scrolled, the other windows are also scrolled. In Vim, windows can be given this behavior by setting the (window-specific) 'scrollbind' option. When a window that has 'scrollbind' set is scrolled, all other 'scrollbind' windows are scrolled the same amount, if possible. The diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 5cf202df13efb8c532b098c8d023d29168d2cb5d..229fdd602bc3b4b2877edba9be4e2ea56b6a6921 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -712,7 +712,7 @@ If you see '{' and '}' highlighted as an error where they are OK, reset the highlighting for cErrInParen and cErrInBracket. If you want to use folding in your C files, you can add these lines in a file -an the "after" directory in 'runtimepath'. For Unix this would be +in the "after" directory in 'runtimepath'. For Unix this would be ~/.vim/after/syntax/c.vim. > syn sync fromstart set foldmethod=syntax @@ -905,7 +905,7 @@ global or buffer-local variable load_doxygen_syntax. This is done by adding the following to your .vimrc. > :let g:load_doxygen_syntax=1 -There are a couple of variables that have an affect on syntax highlighting, and +There are a couple of variables that have an effect on syntax highlighting, and are to do with non-standard highlighting options. Variable Default Effect ~ diff --git a/runtime/doc/tags b/runtime/doc/tags index 6b448e13b06b00f187e34896b855dd89bf732eee..1b051ff4146cee4942ef9a0a2bc17d73e42f59b4 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -5805,6 +5805,7 @@ getscript-data pi_getscript.txt /*getscript-data* getscript-history pi_getscript.txt /*getscript-history* getscript-plugins pi_getscript.txt /*getscript-plugins* getscript-start pi_getscript.txt /*getscript-start* +gettabvar() eval.txt /*gettabvar()* gettabwinvar() eval.txt /*gettabwinvar()* getwinposx() eval.txt /*getwinposx()* getwinposy() eval.txt /*getwinposy()* @@ -7238,6 +7239,7 @@ setmatches() eval.txt /*setmatches()* setpos() eval.txt /*setpos()* setqflist() eval.txt /*setqflist()* setreg() eval.txt /*setreg()* +settabvar() eval.txt /*settabvar()* settabwinvar() eval.txt /*settabwinvar()* setting-guifont gui.txt /*setting-guifont* setting-guitablabel tabpage.txt /*setting-guitablabel* diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index 2e426810750f1de63b7d58fd02069eabf0834cfb..f5e1c58e3e236a8cece75127cef2d7c4bcf44334 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -594,7 +594,7 @@ This section is about using the mouse on a terminal or a terminal window. How to use the mouse in a GUI window is explained in |gui-mouse|. For scrolling with a mouse wheel see |scroll-mouse-wheel|. -Don't forget to enable the mouse with this commands: > +Don't forget to enable the mouse with this command: > :set mouse=a Otherwise Vim won't recognize the mouse in all modes (See 'mouse'). diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index b24749a7f899d90dab319396f078d24bc122ac6f..cb88657e7ef4151547e75dd5707f482738e25c71 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1082,12 +1082,8 @@ restored. (Luc St-Louis) Vim 7.3: Patches to include: -- gettabvar() and settabvar() functions. (Yegappan Lakshmanan, 2010 May 14) - Patch to support netbeans in Unix console Vim. (Xavier de Gaye, 2009 Apr 26) Now with Mercurial repository (2010 Jan 2) -- More float functions. (Bill McCarthy) - ~/tmp/eval.diff - http://groups.google.com/group/vim_dev/browse_thread/thread/de192817983abb54 - Include conceal patch? http://vince.negri.googlepages.com/ http://vim.wikia.com/wiki/Patch_to_conceal_parts_of_lines @@ -1157,16 +1153,34 @@ Needs some work: - Easier/standard way to disable default plugins. 8 Persistent undo: store undo in a file. Patch by Jordan Lewis, 2009 Feb 20. Repost 2009 Nov 16. + Get tar file from: http://repo.or.cz/w/vim_extended.git/tree/feat/persistent-undo -> disable by default and add remark that it's new and may fail. Testing remarks by Christian Brabandt, 2010 May 1: - doesn't work well with symlinks (Jordan will look into it) - old undo files tend to pile up - :rundo should output a message (Jordan will fix this) + Bugs / fixes: + - Undo file should be stored with the original file by default, the undo + directory doesn't handle remote files or directory renames. + Use same mechanism as for swap files? But only with one file name. + - Read coladd depending on FEAT_VIRTUALEDIT, should always read/write it + - invoke u_wundo() inside buf_write() + - invoke u_rundo() inside readfile() + - Document that ":wundo" and ":rundo" should only be used in autocommands. + - unserialize_pos() does not need a return value + - function comments go before the function, not inside + - u_get_undofile() changes its argument ffname + - make magic four bytes. + - errors need numbers "E000:" + - also put 'enc' in undo file. + - don't use timestamp, "touch file" or dir copy may change it and undo + still works. Older ideas: - Use timestamps, so that a version a certain time ago can be found and info - before some time/date can be flushed. 'undopersist' gives maximum time to - keep undo: "3h", "1d", "2w", "1y", etc. For the file use dot and - extension: ".filename.un~" (like swapfile but "un~" instead of "swp"). + - Use timestamps, so that a version a certain time ago can be found and + info before some time/date can be flushed. 'undopersist' gives maximum + time to keep undo: "3h", "1d", "2w", "1y", etc. For the file use dot + and extension: ".filename.un~" (like swapfile but "un~" instead of + "swp"). - ":{range}source": source the lines from the current file. You can already yank lines and use :@" to execute them. Most of do_source() would not be used, need a new function. @@ -1693,7 +1707,7 @@ MSDOS, OS/2 and Win32: Windows 95: -8 Editing a file by it's short file name and writing it, makes the long file +8 Editing a file by its short file name and writing it, makes the long file name disappear. Setting 'backupcopy' helps. Use FindFirstFile()->cAlternateFileName in fname_case() (George Reilly). 8 Doing wildcard expansion, will match the short filename, but result in the @@ -3134,7 +3148,7 @@ Win32 GUI: gettext and menus work. 8 Could keep console open to run multiple commands, to avoid the need to hit return in every console. - Also: Look at how Emacs does runs external commands: + Also: Look at how Emacs does run external commands: http://www.cs.washington.edu/homes/voelker/ntemacs.html. 8 Need a separate PopUp menu for modeless selection. Need two new commands: Copy selection to clipboard, Paste selection (as typed text). @@ -4675,7 +4689,7 @@ Various improvements: - Amiga: When 'r' protection bit is not set, file can still be opened but gives read errors. Check protection before opening. - When writing check for file exists but no permission, "Permission denied". -- If file does not exists, check if directory exists. +- If file does not exist, check if directory exists. - MSDOS: although t_cv and t_ci are not set, do invert char under cursor. - Settings edit mode: make file with ":set opt=xx", edit it, parse it as ex commands. diff --git a/runtime/doc/usr_04.txt b/runtime/doc/usr_04.txt index b3ba894b52495cbb127a4299abce1781fdee3f68..68467283d4b20b2450463907edf1e918a09a6cff 100644 --- a/runtime/doc/usr_04.txt +++ b/runtime/doc/usr_04.txt @@ -498,7 +498,7 @@ else: ~ change case of the character under the cursor, and move the cursor to the next character. This is not an operator (unless 'tildeop' is set), thus you can't use it with a motion - command. It does works in Visual mode and changes case for + command. It does work in Visual mode and changes case for all the selected text then. I Start Insert mode after moving the cursor to the first diff --git a/runtime/doc/usr_22.txt b/runtime/doc/usr_22.txt index 56271ccefe69e90b084fe1a0bf0afb4e0b5296bd..72119c1ea9099ea8d46b5bd72b646460ce701d63 100644 --- a/runtime/doc/usr_22.txt +++ b/runtime/doc/usr_22.txt @@ -98,7 +98,7 @@ browser. This is what you get: > < (etc) The <F1> key thus brings you to a netrw directory browsing contents help page. -Its a regular help page; use the usual |CTRL-]| to jump to tagged help items +It's a regular help page; use the usual |CTRL-]| to jump to tagged help items and |CTRL-O| to jump back. To select files for display and editing: (with the cursor is atop a filename) @@ -358,7 +358,7 @@ use the name, or part of it, instead: > :buffer help -Vim will find a best match for the name you type. If there is only one +Vim will find the best match for the name you type. If there is only one buffer that matches the name, it will be used. In this case "help.txt". To open a buffer in a new window: > diff --git a/runtime/doc/usr_27.txt b/runtime/doc/usr_27.txt index aa24a265b6bf4d2011b57213d7d4325471876930..1098f44b910c12969e9f94f4370d41c0a6e9e9d4 100644 --- a/runtime/doc/usr_27.txt +++ b/runtime/doc/usr_27.txt @@ -77,7 +77,7 @@ matter if 'ignorecase' or 'smartcase' was changed. Note: The use of "\" items in search patterns depends on the 'magic' option. - In this chapters we will assume 'magic' is on, because that is the + In this chapter we will assume 'magic' is on, because that is the standard and recommended setting. If you would change 'magic', many search patterns would suddenly become invalid. diff --git a/runtime/doc/usr_30.txt b/runtime/doc/usr_30.txt index c15cb20800ac80ed76f5ac87925633d64c297403..34210c6f3ed3a0d18be3a75097c18f4c02b12d61 100644 --- a/runtime/doc/usr_30.txt +++ b/runtime/doc/usr_30.txt @@ -362,7 +362,7 @@ this: echo "-------" ~ fi ~ -Start off by setting these option: > +Start off by setting these options: > :set autoindent shiftwidth=3 diff --git a/runtime/doc/usr_40.txt b/runtime/doc/usr_40.txt index 1aea1ac599a88a7620d0fc0199f99c79e2537042..542a418c4547cdf9821e178c1768f1bfa4257b41 100644 --- a/runtime/doc/usr_40.txt +++ b/runtime/doc/usr_40.txt @@ -24,8 +24,8 @@ A simple mapping was explained in section |05.3|. The principle is that one sequence of key strokes is translated into another sequence of key strokes. This is a simple, yet powerful mechanism. The simplest form is that one key is mapped to a sequence of keys. Since -the function keys, except <F1>, have no predefined meaning in Vim, these are a -good choice to map. Example: > +the function keys, except <F1>, have no predefined meaning in Vim, these are +good choices to map. Example: > :map <F2> GoDate: <Esc>:read !date<CR>kJ diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index c14722460a40d2f7ee8440d3f35f107d89686d19..4344fc11f527fdf0006c03f083c4d8e19c790ce7 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -670,8 +670,10 @@ Variables: getbufvar() get a variable value from a specific buffer setbufvar() set a variable in a specific buffer getwinvar() get a variable from specific window + gettabvar() get a variable from specific tab page gettabwinvar() get a variable from specific window & tab page setwinvar() set a variable in a specific window + settabvar() set a variable in a specific tab page settabwinvar() set a variable in a specific window & tab page garbagecollect() possibly free memory @@ -2152,7 +2154,7 @@ FUNCTIONS When defining a function, this only needs to be done once. But the filetype plugin will be sourced every time a file with this filetype will be opened. -This construct make sure the function is only defined once: > +This construct makes sure the function is only defined once: > :if !exists("*s:Func") : function s:Func(arg) diff --git a/runtime/doc/version5.txt b/runtime/doc/version5.txt index 772c3ccac18923e78825ccf7f8947481cb01c2f2..74e1bfc91c0f536367b70d7332ff3ac3d8223dc3 100644 --- a/runtime/doc/version5.txt +++ b/runtime/doc/version5.txt @@ -7149,7 +7149,7 @@ Files: src/gui.c, src/gui.h, src/gui_w32.c Patch 5.6.060 Problem: Some bold characters spill over to the cell on the left, that spill-over can remain sometimes. -Solution: Redraw a characters when the next character was bold and needs +Solution: Redraw a character when the next character was bold and needs redrawing. (Robert Webb) Files: src/screen.c diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt index 4ba7aeea7303bf10ebe25bac2b6b815858775acf..609c5e81ebb33f192447a28ae37225f75256376c 100644 --- a/runtime/doc/version7.txt +++ b/runtime/doc/version7.txt @@ -1243,7 +1243,7 @@ the cursor position. Likewise for "1gD" and "gD". 'scrolljump' can be set to a negative number to scroll a percentage of the window height. -The |v:scrollstart| variable has been added to help finding the location in +The |v:scrollstart| variable has been added to help find the location in your script that causes the hit-enter prompt. To make it possible to handle the situation that a file is being edited that @@ -7166,17 +7166,21 @@ don't save what you see. This could result in work being lost. Now the text after recovery is compared to the original file contents. When they differ the buffer is marked as modified. -Use BASEMODLIBS instead of MODLIBS for Python configuration. (Michael Bienia) - Added *added-7.3* ----- New syntax files: +TODO + +New filetype plugins: +TODO New spell files: +TODO Breton. (Dominique Pelle) + Added the 'relativenumber' option. (Markus Heidelberg) Support for Blowfish encryption. Added the 'cryptmethod' option. @@ -7187,6 +7191,8 @@ Support GDK_SUPER_MASK for GTK on Mac. (Stephan Schulz) More floating point functions: acos(), asin(), atan2(), cosh(), exp(), fmod(), log(), sinh(), tan(), tanh(). (Bill McCarthy) +gettabvar() and settabvar() functions. (Yegappan Lakshmanan) + Fixed *fixed-7.3* ----- @@ -7201,5 +7207,8 @@ using GTK floating point numbers stop working. Use gtk_disable_setlocale(). "g8" didn't produce the right value on a NUL. (Dominique Pelle) +Use BASEMODLIBS instead of MODLIBS for Python configuration to pick up the +right compiler flags. (Michael Bienia) + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/indent/lifelines.vim b/runtime/indent/lifelines.vim new file mode 100755 index 0000000000000000000000000000000000000000..0d9b2b46e4dcd73f9985644ec2f1a23c1f4a5dba --- /dev/null +++ b/runtime/indent/lifelines.vim @@ -0,0 +1,24 @@ +" Vim indent file +" Language: LifeLines +" Maintainer: Patrick Texier <p.texier@orsennes.com> +" Location: <http://patrick.texier.free.fr/vim/indent/lifelines.vim> +" Last Change: 2010 May 7 + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +" LifeLines uses cindent without ; line terminator, C functions +" declarations, C keywords, C++ formating +setlocal cindent +setlocal cinwords="" +setlocal cinoptions+=+0 +setlocal cinoptions+=p0 +setlocal cinoptions+=i0 +setlocal cinoptions+=t0 +setlocal cinoptions+=*500 + +let b:undo_indent = "setl cin< cino< cinw<" +" vim: ts=8 sw=4 diff --git a/runtime/syntax/lifelines.vim b/runtime/syntax/lifelines.vim index d825a178ae092aaa3567645c3b063e0bccf55065..f8bea015bd20d3f5352eee3a0137d329036a600f 100644 --- a/runtime/syntax/lifelines.vim +++ b/runtime/syntax/lifelines.vim @@ -1,15 +1,12 @@ " Vim syntax file -" Language: LifeLines (v 3.0.50) http://lifelines.sourceforge.net -" Maintainer: Patrick Texier <p.texier@genindre.org> -" Location: http://www.genindre.org/ftp/lifelines/lifelines.vim -" Last Change: 2005 Dec 22. +" Language: LifeLines (v 3.0.62) <http://lifelines.sourceforge.net> +" Maintainer: Patrick Texier <p.texier@orsennes.com> +" Location: <http://patrick.texier.free.fr/vim/syntax/lifelines.vim> +" Last Change: 2010 May 7 " option to highlight error obsolete statements -" add the following line to your .vimrc file or here : -" (level2 is for baptism) - -" let lifelines_deprecated=1 -" let lifelines_deprecated_level2=1 +" add the following line to your .vimrc file : +" let lifelines_deprecated = 1 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -20,94 +17,102 @@ elseif exists("b:current_syntax") finish endif -" A bunch of useful lifelines keywords 3.0.50 +" A bunch of useful LifeLines keywords 3.0.62 -syn keyword lifelinesStatement set -syn keyword lifelinesUser getindi geindiset getfam getint getstr choosechild -syn keyword lifelinesUser chooseindi choosespouse choosesubset menuchoose -syn keyword lifelinesUser choosefam -syn keyword lifelinesProc proc func return call -syn keyword lifelinesInclude include -syn keyword lifelinesDef global +syn keyword lifelinesDecl char_encoding require option include +syn keyword lifelinesStatement set +syn keyword lifelinesUser getindi geindiset getfam getint getstr choosechild +syn keyword lifelinesUser chooseindi choosespouse choosesubset menuchoose +syn keyword lifelinesUser choosefam +syn keyword lifelinesProc proc func return call +syn keyword lifelinesInclude include +syn keyword lifelinesDef global syn keyword lifelinesConditional if else elsif switch -syn keyword lifelinesRepeat continue break while -syn keyword lifelinesLogical and or not eq ne lt gt le ge strcmp eqstr nestr -syn keyword lifelinesArithm add sub mul div mod exp neg incr decr -syn keyword lifelinesArithm cos sin tan arccos arcsin arctan -syn keyword lifelinesArithm deg2dms dms2deg spdist -syn keyword lifelinesIndi name fullname surname givens trimname birth -syn keyword lifelinesIndi death burial -syn keyword lifelinesIndi father mother nextsib prevsib sex male female -syn keyword lifelinesIndi pn nspouses nfamilies parents title key -syn keyword lifelinesIndi soundex inode root indi firstindi nextindi -syn keyword lifelinesIndi previndi spouses families forindi indiset -syn keyword lifelinesIndi addtoset deletefromset union intersect -syn keyword lifelinesIndi difference parentset childset spouseset siblingset -syn keyword lifelinesIndi ancestorset descendentset descendantset uniqueset -syn keyword lifelinesIndi namesort keysort valuesort genindiset getindiset -syn keyword lifelinesIndi forindiset lastindi writeindi -syn keyword lifelinesIndi inset -syn keyword lifelinesFam marriage husband wife nchildren firstchild -syn keyword lifelinesFam lastchild fnode fam firstfam nextfam lastfam -syn keyword lifelinesFam prevfam children forfam writefam -syn keyword lifelinesFam fathers mothers Parents -syn keyword lifelinesList list empty length enqueue dequeue requeue -syn keyword lifelinesList push pop setel getel forlist inlist dup clear -syn keyword lifelinesTable table insert lookup -syn keyword lifelinesGedcom xref tag value parent child sibling savenode -syn keyword lifelinesGedcom fornodes traverse createnode addnode -syn keyword lifelinesGedcom detachnode foreven fornotes forothr forsour -syn keyword lifelinesGedcom reference dereference getrecord -syn keyword lifelinesFunct date place year long short gettoday dayformat -syn keyword lifelinesFunct monthformat dateformat extractdate eraformat -syn keyword lifelinesFunct complexdate complexformat complexpic datepic -syn keyword lifelinesFunct extractnames extractplaces extracttokens lower -syn keyword lifelinesFunct yearformat -syn keyword lifelinesFunct upper capitalize trim rjustify -syn keyword lifelinesFunct concat strconcat strlen substring index -syn keyword lifelinesFunct titlecase gettext -syn keyword lifelinesFunct d card ord alpha roman strsoundex strtoint -syn keyword lifelinesFunct atoi linemode pagemod col row pos pageout nl -syn keyword lifelinesFunct sp qt newfile outfile copyfile print lock unlock test -syn keyword lifelinesFunct database version system stddate program -syn keyword lifelinesFunct pvalue pagemode level extractdatestr debug -syn keyword lifelinesFunct f float int free getcol getproperty heapused -syn keyword lifelinesFunct sort rsort -syn keyword lifelinesFunct deleteel -syn keyword lifelinesFunct bytecode convertcode setlocale - -" option to highlight error obsolete statements -" please read ll-reportmanual +syn keyword lifelinesRepeat continue break while +syn keyword lifelinesLogical and or not eq ne lt gt le ge strcmp eqstr nestr +syn keyword lifelinesArithm add sub mul div mod exp neg incr decr +syn keyword lifelinesArithm cos sin tan arccos arcsin arctan +syn keyword lifelinesArithm deg2dms dms2deg spdist +syn keyword lifelinesIndi name fullname surname givens trimname birth +syn keyword lifelinesIndi death burial baptism +syn keyword lifelinesIndi father mother nextsib prevsib sex male female +syn keyword lifelinesIndi pn nspouses nfamilies parents title key +syn keyword lifelinesIndi soundex inode root indi firstindi nextindi +syn keyword lifelinesIndi previndi spouses families forindi indiset +syn keyword lifelinesIndi addtoset deletefromset union intersect +syn keyword lifelinesIndi difference parentset childset spouseset siblingset +syn keyword lifelinesIndi ancestorset descendentset descendantset uniqueset +syn keyword lifelinesIndi namesort keysort valuesort genindiset getindiset +syn keyword lifelinesIndi forindiset lastindi writeindi +syn keyword lifelinesIndi inset +syn keyword lifelinesFam marriage husband wife nchildren firstchild +syn keyword lifelinesFam lastchild fnode fam firstfam nextfam lastfam +syn keyword lifelinesFam prevfam children forfam writefam +syn keyword lifelinesFam fathers mothers Parents +syn keyword lifelinesList list empty length enqueue dequeue requeue +syn keyword lifelinesList push pop setel getel forlist inlist dup clear +syn keyword lifelinesTable table insert lookup +syn keyword lifelinesGedcom xref tag value parent child sibling savenode +syn keyword lifelinesGedcom fornodes traverse createnode addnode +syn keyword lifelinesGedcom detachnode foreven fornotes forothr forsour +syn keyword lifelinesGedcom reference dereference getrecord +syn keyword lifelinesGedcom gengedcomstrong +syn keyword lifelinesFunct date place year long short gettoday dayformat +syn keyword lifelinesFunct monthformat dateformat extractdate eraformat +syn keyword lifelinesFunct complexdate complexformat complexpic datepic +syn keyword lifelinesFunct extractnames extractplaces extracttokens lower +syn keyword lifelinesFunct yearformat +syn keyword lifelinesFunct upper capitalize trim rjustify +syn keyword lifelinesFunct concat strconcat strlen substring index +syn keyword lifelinesFunct titlecase gettext +syn keyword lifelinesFunct d card ord alpha roman strsoundex strtoint +syn keyword lifelinesFunct atoi linemode pagemod col row pos pageout nl +syn keyword lifelinesFunct sp qt newfile outfile copyfile print lock unlock test +syn keyword lifelinesFunct database version system stddate program +syn keyword lifelinesFunct pvalue pagemode level extractdatestr debug +syn keyword lifelinesFunct f float int free getcol getproperty heapused +syn keyword lifelinesFunct sort rsort +syn keyword lifelinesFunct deleteel +syn keyword lifelinesFunct bytecode convertcode setlocale +" New dates functions (since 3.0.51) +syn keyword lifelinesFunct jd2date date2jd dayofweek setdate + +" options to highlight as error obsolete statements +" please read ll-reportmanual. if exists("lifelines_deprecated") - syn keyword lifelinesError getintmsg getindimsg getstrmsg - syn keyword lifelinesError gengedcom gengedcomstrong gengedcomweak deletenode - syn keyword lifelinesError save strsave - syn keyword lifelinesError lengthset + syn keyword lifelinesError getintmsg getindimsg getstrmsg + syn keyword lifelinesError gengedcom gengedcomweak deletenode + syn keyword lifelinesError save strsave + syn keyword lifelinesError lengthset + if version >= 700 + let g:omni_syntax_group_exclude_lifelines = 'lifelinesError' + endif else - syn keyword lifelinesUser getintmsg getindimsg getstrmsg - syn keyword lifelinesGedcom gengedcom gengedcomstrong gengedcomweak deletenode - syn keyword lifelinesFunct save strsave - syn keyword lifelinesIndi lengthset -endif -if exists("lifelines_deprecated_level2") - syn keyword lifelinesError baptism -else - syn keyword lifelinesIndi baptism + syn keyword lifelinesUser getintmsg getindimsg getstrmsg + syn keyword lifelinesGedcom gengedcom gengedcomweak deletenode + syn keyword lifelinesFunct save strsave + syn keyword lifelinesIndi lengthset endif -syn region lifelinesString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=lifelinesSpecial +syn region lifelinesString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=lifelinesSpecial -syn match lifelinesSpecial "\\\(\\\|\(n\|t\)\)" contained +syn match lifelinesSpecial "\\\(\\\|\(n\|t\)\)" contained -syn region lifelinesComment start="/\*" end="\*/" +syn keyword lifelinesTodo contained TODO FIXME XXX +syn region lifelinesComment start="/\*" end="\*/" contains=lifelinesTodo " integers -syn match lifelinesNumber "-\=\<\d\+\>" +syn match lifelinesNumber "-\=\<\d\+\>" "floats, with dot -syn match lifelinesNumber "-\=\<\d\+\.\d*\>" +syn match lifelinesNumber "-\=\<\d\+\.\d*\>" "floats, starting with a dot -syn match lifelinesNumber "-\=\.\d\+\>" +syn match lifelinesNumber "-\=\.\d\+\>" + +" folding using {} +if version >= 600 + syn region lifelinesFoldBlock start="{" end="}" transparent fold +endif "catch errors caused by wrong parenthesis "adapted from original c.vim written by Bram Moolenaar @@ -130,31 +135,33 @@ if version >= 508 || !exists("did_lifelines_syn_inits") endif HiLink lifelinesConditional Conditional - HiLink lifelinesArithm Operator - HiLink lifelinesLogical Conditional - HiLink lifelinesInclude Include - HiLink lifelinesComment Comment - HiLink lifelinesStatement Statement - HiLink lifelinesUser Statement - HiLink lifelinesFunct Statement - HiLink lifelinesTable Statement - HiLink lifelinesGedcom Statement - HiLink lifelinesList Statement - HiLink lifelinesRepeat Repeat - HiLink lifelinesFam Statement - HiLink lifelinesIndi Statement - HiLink lifelinesProc Statement - HiLink lifelinesDef Statement - HiLink lifelinesString String - HiLink lifelinesSpecial Special - HiLink lifelinesNumber Number + HiLink lifelinesArithm Operator + HiLink lifelinesLogical Conditional + HiLink lifelinesInclude Include + HiLink lifelinesComment Comment + HiLink lifelinesStatement Statement + HiLink lifelinesUser Statement + HiLink lifelinesFunct Statement + HiLink lifelinesTable Statement + HiLink lifelinesGedcom Statement + HiLink lifelinesList Statement + HiLink lifelinesRepeat Repeat + HiLink lifelinesFam Statement + HiLink lifelinesIndi Statement + HiLink lifelinesProc Statement + HiLink lifelinesDef Statement + HiLink lifelinesString String + HiLink lifelinesSpecial Special + HiLink lifelinesNumber Number HiLink lifelinesParenError Error HiLink lifelinesErrInParen Error - HiLink lifelinesError Error + HiLink lifelinesError Error + HiLink lifelinesTodo Todo + HiLink lifelinesDecl PreProc delcommand HiLink endif let b:current_syntax = "lifelines" -" vim: ts=8 +" vim: ts=8 sw=4 diff --git a/src/eval.c b/src/eval.c index 1803e0e55dc523b0adc34a5fc41a90bba8040814..df116ad0f9651342faa5c912e96229b49304c360 100644 --- a/src/eval.c +++ b/src/eval.c @@ -573,6 +573,7 @@ static void f_getpos __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getqflist __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getreg __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getregtype __ARGS((typval_T *argvars, typval_T *rettv)); +static void f_gettabvar __ARGS((typval_T *argvars, typval_T *rettv)); static void f_gettabwinvar __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getwinposx __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getwinposy __ARGS((typval_T *argvars, typval_T *rettv)); @@ -677,6 +678,7 @@ static void f_setmatches __ARGS((typval_T *argvars, typval_T *rettv)); static void f_setpos __ARGS((typval_T *argvars, typval_T *rettv)); static void f_setqflist __ARGS((typval_T *argvars, typval_T *rettv)); static void f_setreg __ARGS((typval_T *argvars, typval_T *rettv)); +static void f_settabvar __ARGS((typval_T *argvars, typval_T *rettv)); static void f_settabwinvar __ARGS((typval_T *argvars, typval_T *rettv)); static void f_setwinvar __ARGS((typval_T *argvars, typval_T *rettv)); static void f_shellescape __ARGS((typval_T *argvars, typval_T *rettv)); @@ -7663,6 +7665,7 @@ static struct fst {"getqflist", 0, 0, f_getqflist}, {"getreg", 0, 2, f_getreg}, {"getregtype", 0, 1, f_getregtype}, + {"gettabvar", 2, 2, f_gettabvar}, {"gettabwinvar", 3, 3, f_gettabwinvar}, {"getwinposx", 0, 0, f_getwinposx}, {"getwinposy", 0, 0, f_getwinposy}, @@ -7769,6 +7772,7 @@ static struct fst {"setpos", 2, 2, f_setpos}, {"setqflist", 1, 2, f_setqflist}, {"setreg", 2, 3, f_setreg}, + {"settabvar", 3, 3, f_settabvar}, {"settabwinvar", 4, 4, f_settabwinvar}, {"setwinvar", 3, 3, f_setwinvar}, {"shellescape", 1, 2, f_shellescape}, @@ -11327,6 +11331,32 @@ f_getregtype(argvars, rettv) rettv->vval.v_string = vim_strsave(buf); } +/* + * "gettabvar()" function + */ + static void +f_gettabvar(argvars, rettv) + typval_T *argvars; + typval_T *rettv; +{ + tabpage_T *tp; + dictitem_T *v; + char_u *varname; + + rettv->v_type = VAR_STRING; + rettv->vval.v_string = NULL; + + varname = get_tv_string_chk(&argvars[1]); + tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL)); + if (tp != NULL && varname != NULL) + { + /* look up the variable */ + v = find_var_in_ht(&tp->tp_vars.dv_hashtab, varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); + } +} + /* * "gettabwinvar()" function */ @@ -15823,6 +15853,48 @@ f_setreg(argvars, rettv) rettv->vval.v_number = 0; } +/* + * "settabvar()" function + */ + static void +f_settabvar(argvars, rettv) + typval_T *argvars; + typval_T *rettv; +{ + tabpage_T *save_curtab; + char_u *varname, *tabvarname; + typval_T *varp; + tabpage_T *tp; + + rettv->vval.v_number = 0; + + if (check_restricted() || check_secure()) + return; + + tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL)); + varname = get_tv_string_chk(&argvars[1]); + varp = &argvars[2]; + + if (tp != NULL && varname != NULL && varp != NULL) + { + save_curtab = curtab; + goto_tabpage_tp(tp); + + tabvarname = alloc((unsigned)STRLEN(varname) + 3); + if (tabvarname != NULL) + { + STRCPY(tabvarname, "t:"); + STRCPY(tabvarname + 2, varname); + set_var(tabvarname, varp, TRUE); + vim_free(tabvarname); + } + + /* Restore current tabpage */ + if (valid_tabpage(save_curtab)) + goto_tabpage_tp(save_curtab); + } +} + /* * "settabwinvar()" function */