summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-12-06 20:04:44 +0000
committerBram Moolenaar <Bram@vim.org>2005-12-06 20:04:44 +0000
commit241a8aaa48404921a3e84fc2cdfb5c752edeab69 (patch)
tree08b4766d30eb26d55c7772ae4763835ee6d9bbb9 /runtime
parent9372a11ca67d6bdec9c16407a941cb8094eec3b6 (diff)
updated for version 7.0163v7.0163
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/todo.txt46
-rw-r--r--runtime/doc/version7.txt16
-rw-r--r--runtime/kde-tips9314
-rw-r--r--runtime/kvim32x32.pngbin2471 -> 0 bytes
-rw-r--r--runtime/kvim48x48.pngbin4565 -> 0 bytes
-rw-r--r--runtime/kvim64x64.pngbin7046 -> 0 bytes
-rw-r--r--runtime/syntax/2html.vim4
7 files changed, 29 insertions, 9351 deletions
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 3a3689e9fc..c2f616e6d7 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.0aa. Last change: 2005 Dec 01
+*todo.txt* For Vim version 7.0aa. Last change: 2005 Dec 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,27 +30,27 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
-Go over all changes between 6.3 and 6.4 and make sure they are included in 7.
-
-Using ":read" in an empty buffer in Ex mode, then undo leaves a line behind.
-(Servatius Brandt).
-
-'statusline' is drawn over the Omni menu.
-
Cygwin and Mac OS/X may preserve case for file names but ignore case
differences. Use Amiga code?
-"make unixall": remove split in floppy-size archives.
-
":helpgrep" sometimes results in wrong text in the error list:
"^[.?!]\_[\])'" ]\+"
Using string that was freed or buffer that is overwritten?
+When editing a file "a" that is a symbolic link to "b", while another Vim is
+editing "b", there is no warning. Follow symlink to make swap file name?
+Patch from Stefano Zacchiroli. Updated by James Vega, Dec 2.
+
Using pipes for filter commands: provide some way to type a password, keep
stderr in/out open for this? (Konstanti Rozinov)
New problem: password is echoed. Put terminal in cooked mode and don't read
from terminal?
+Allow the user to handle the situation that a swap file already exists.
+Option to define a function to be called? Function would return the character
+that the dialog provides. Would make it possible to bring the other Vim to
+the foreground and abort the edit. Or hard-code this?
+
To support mapping <F4> to be used as <F4>{motion}: Add operator that
executes a user defined function. '[ and '] marks are at start and end of
text. ":map <F4> :set opfunc=MyOp<CR>gy".
@@ -61,7 +61,7 @@ errors and illegal bytes. Make default to replace bad bytes/characters with
:e ++enc=xxx ++bad=keep foo.txt
:e ++enc=xxx ++bad=drop foo.txt
:e ++enc=xxx ++bad=? foo.txt
-(patch 29 November)
+(patch 6 December)
ml_get error with specific vimrc and lots of plugins. (Tomi Mickelsson)
@@ -69,6 +69,8 @@ Win32: preserve the hidden attribute of the viminfo file.
Add ":startgreplace" to do "gR", like ":startreplace" does "R".
+Alt-mousekey is currently ignored. Use it for Visual/select block?
+
When 'delcombine' is set in Select mode before a character with a combining
char the combining char is deleted when it shouldn't. (Tony Mechelynck, Nov
27)
@@ -104,10 +106,6 @@ spelling:
- Have "zg" and "zw" report the file that was modified. (Marvin Renich)
- Add a command like "zg" that selects one of the files 'spellfile'.
-When editing a file "a" that is a symbolic link to "b", while another Vim is
-editing "b", there is no warning. Follow symlink to make swap file name?
-Patch from Stefano Zacchiroli.
-
Support saving and restoring session for X windows? It should work to do
":mksession" and use "-S fname" for the restart command. The
gui_x11_wm_protocol_handler() already takes care of the rest.
@@ -132,9 +130,6 @@ Mac unicode patch (Da Woon Jung):
- With 'nopaste' pasting is wrong, with 'paste' Command-V doesn't work.
(Alan Schmitt)
-Mac: drop support for OS 9. Most people are now using OS/X and Vim 6.4 can be
-used for others. Will make maintaining the code simpler.
-
Patch to add a few flags to search(). (Benji Fisher, Nov 29, doc update Dec 1)
Also add search???() function that returns list with lnum and col.
@@ -145,6 +140,9 @@ Try out using the free MS compiler and debugger, using Make_mvc.mak.
Win32: Check that installer puts menu items in "all users" dir when possible,
not administrator dir.
+CTRL-X CTRL-L only completes from loaded buffers. Make it work for unloaded
+buffers too?
+
Autoload:
- Add a Vim script in $VIMRUNTIME/tools that takes a file with a list of
script names and a help file and produces a script that can be sourced to
@@ -259,6 +257,8 @@ PLANNED FOR VERSION 7.0:
Only difficult thing: When going back in time, how to find the previous
text state in the tree?
Show the list of changes in a window to be able to select a version?
+ Also: See ":e" as a change operation, find the changes and add them to the
+ undo info. Needed for when an external tool changes the file.
- PERSISTENT UNDO: store undo in a file.
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
@@ -397,7 +397,7 @@ Win32: In the generated batch files, use $VIMRUNTIME if it's set. Examples by
Mathias Michaelis (2004 Sep 6)
Also place vimtutor.bat in %windir%?
-Add gui_mch_browsedir() for Motif, KDE and Mac OS/X.
+Add gui_mch_browsedir() for Motif, Mac OS/X.
Add extra list of file locations. A bit like the quickfix list, but there is
one per window. Can be used with:
@@ -612,14 +612,6 @@ GTK+ GUI known bugs:
when it is longer than 4000 characters. Works OK from gvim to gvim and
vim to vim. Pasting through xterm (using the shift key) also works.
It starts working after GTK gvim loses the selection and gains it again.
-7 DND doesn't work with KDE (also with GTK 1).
-
-KDE GUI known bugs:
-- There is no active maintenance and "yzis" is supposed to replace it.
-- With the default 'guifont' value bold text differs in size from normal
- text, causing the display to be messed up.
-- Error messages when starting up. The "tip of the day" box is empty.
-- Encoding of menu items needs to be converted. (Yasuhiro Matsumoto)
Win32 GUI known bugs:
8 On Windows 98 the unicows library is needed to support functions with UCS2
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index af59203c12..80ff683f71 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt* For Vim version 7.0aa. Last change: 2005 Dec 01
+*version7.txt* For Vim version 7.0aa. Last change: 2005 Dec 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -21,7 +21,6 @@ NEW FEATURES |new-7|
Vim script enhancements |new-vim-script|
Spell checking |new-spell|
Omni completion |new-omni-completion|
-KDE support |new-KDE|
MzScheme interface |new-MzScheme|
Printing multi-byte text |new-print-multi-byte|
Translated manual pages |new-manpage-trans|
@@ -67,6 +66,8 @@ results in "a'b".
When overwriting a file with ":w! fname" there was no warning for when "fname"
was being edited by another Vim. Vim now gives an error message |E768|.
+The support for Mac OS 9 has been removed.
+
Minor incompatibilities:
@@ -202,13 +203,6 @@ When the 'completeopt' option contains "menu" then matches for Insert mode
completion are displayed in a popup menu.
-KDE support *new-KDE*
------------
-
-Kvim is the KDE version of Vim. It uses the Qt toolkit. See |KVim|.
-(Thomas Capricelli, Philippe Fremy, Mickael Marchand, Mark Westcott, et al.)
-
-
MzScheme interface *new-MzScheme*
------------------
@@ -503,6 +497,7 @@ New autocommand events: ~
|ColorScheme| after loading a color scheme
|QuickFixCmdPre| before :make, :grep et al. (Ciaran McCreesh)
|QuickFixCmdPost| after :make, :grep et al. (Ciaran McCreesh)
+|SessionLoadPost| after loading a session file. (Yegappan Lakshmanan)
New items in search patterns: ~
@@ -849,6 +844,9 @@ in the FileChangedRO autocommand when checking out the file fails.
Unix: When open() returns EFBIG give an appropriate message.
+":mksession" sets the SessionLoad variable to notify plugins. A modeline is
+added to the session file to set 'filetype' to "vim".
+
==============================================================================
COMPILE TIME CHANGES *compile-changes-7*
diff --git a/runtime/kde-tips b/runtime/kde-tips
deleted file mode 100644
index 67b350d865..0000000000
--- a/runtime/kde-tips
+++ /dev/null
@@ -1,9314 +0,0 @@
-*vimtips.txt* This file comes from the Vim Online tip database. These tips
-were downloaded on Tue, 24 Sep 2002 15:27:26 -0700 More tips can be found at <A
-HREF="http://vim.sf.net/tip_index.php">http://vim.sf.net/tip_index.php</A><BR>
-A new tip file can be downloaded from <A
-HREF="http://vim.sf.net/tip_download.php">http://vim.sf.net/tip_download.php</A><BR>
-
-Thanks for using vim online.
-
-<Tip category="KVim"> <html><center>the super star</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=1">http://vim.sf.net/tip_view.php?tip_id=1</A><BR>
-
-When a discussion started about learning vim on the vim list Juergen Salk
-mentioned the "*" key as something that he wished he had know earlier. When
-I read the mail I had to go help on what the heck the "*" did. I also wish
-I had known earlier...
-
-Using the "*" key while in normal mode searches for the word under the cursor.
-
-If that doesn't save you a lot of typing, I don't know what will.
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>easy
-edit of files in the same directory</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=2">http://vim.sf.net/tip_view.php?tip_id=2</A><BR>
-
-It was often frustrating when I would open a file deep in the code tree and
-then realize I wanted to open another file in that same directory. Douglas
-Potts taught me a nice way to do this. Add the following snipit to your vimrc:
-
-" Edit another file in the same directory as the current file " uses
-expression to extract path from current file's path " (thanks Douglas Potts)
-if has("unix")
- map ,e :e &lt;C-R&gt;=expand("%:p:h") . "/" &lt;CR&gt;
-else
- map ,e :e &lt;C-R&gt;=expand("%:p:h") . "\" &lt;CR&gt;
-endif
-
-Then when you type ,e in normal mode you can use tab to complete to the
-file. You can also expand this to allow for spitting, etc. Very very nice.
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>use
-vim to quickly compile java files</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=3">http://vim.sf.net/tip_view.php?tip_id=3</A><BR>
-
-For a number of years I used vim on an SGI box. When I left my job at SGI
-I went to a company that developed on PCs. For 2 years I used IDEs. I was
-unhappy. I was frustrated. I couldn't figure out why. (Beyond my machine
-crashing twice a day.) Finally I upgraded to windows 2000 (kind of stable!) and
-started using vim as an IDE. All was good. Here is how you use vim to compile
-your java:
-
-1. While I'm sure this works with javac, javac is slow slow slow. So download
-the Jikes complier first. (Jikes is from ibm, search on google for jikes
-and you will find it..available on most platforms.)
-
-2. Add the following to your vimrc:
-
-set makeprg=jikes -nowarn -Xstdout +E % set
-errorformat=%f:%l:%c:%*\d:%*\d:%*\s%m
-
-3. When you are editing a java file type :make and it will compile the
-current file and jump you to the first error in the file (if any). Read
-":help quickfix" for how to move between errors.
-
-To setup your classpath environment either launch gvim from a shell that
-has your classpath/path setup or use the "let" command to configure it in
-your vimrc.
-
-</pre></tip> </html> <Tip category="KVim">
-<html><center>Any word completion</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=4">http://vim.sf.net/tip_view.php?tip_id=4</A><BR>
-
-Either when programming or writing, I tend to have some identifiers or words
-that I use all the time. By sheer accident, I noticed the 'ctrl-n' command,
-that will attempt to complete the word under the cursor. Hit it once, and it
-will try to complete it with the first match in the current file. If there is
-no match, it will (at least in the case of C code) search through all files
-included from the current one. Repeated invocations will cycle through all
-found matches.
-
-</pre></tip> </html> <Tip category="KVim">
-<html><center>Quickly searching for a word</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=5">http://vim.sf.net/tip_view.php?tip_id=5</A><BR>
-
-To search for a word under the cursor in the current file you can use either
-the "*" or "#" keys.
-
-The "*" key will search for the word from the current cursor position to
-the end of the file. The "#" key will search for the word from the current
-cursor position to the top of the file.
-
-Note that the above two keys will search for the whole word and not the
-partial word. This is equivalent to using the &lt;word&gt; pattern in the
-search commands (/ and ?).
-
-To search for partial matches, you can use the "g*" and "g#" key sequence.
-
-You can also use the mouse to search for a word. This will only work in
-the GUI version of VIM (gvim) or a console version of VIM in an xterm which
-accepts a mouse. Also, the 'mousemodel' should be set to 'extend'. Add the
-following line to your .vimrc:
-
-set mousemodel=extend
-
-To search for a word under the cursor from the current cursor position to
-the end of the file, press the shift key and click on the word using the
-left mouse button. To search in the opposite direction, press the shift
-key and click on the word using the the right mouse button.
-
-To get more help on these, use
-
-:help * :help # :help g* :help g# :help &lt;S-LeftMouse&gt; :help
-&lt;S-RightMouse&gt;
-
-</pre></tip> </html> <Tip category="KVim">
-<html><center>Using the % key</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=6">http://vim.sf.net/tip_view.php?tip_id=6</A><BR>
-
-The % key can be used
-
-1. To jump to a matching opening or closing parenthesis, square
- bracket or a curly brace i.e. ([{}])
-2. To jump to start or end of a C-style comment /* */. 3. To jump to a
-matching #if, #ifdef, #else, #elif, #endif C
- preprocessor conditionals.
-
-To get more information about this, do
-
- :help %
-
-The % key can be extended to support other matching pairs by modifying the
-"matchpairs" option. Read the help on
-
- :help matchpairs
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>Jumping
-to the start and end of a code block</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=7">http://vim.sf.net/tip_view.php?tip_id=7</A><BR>
-
-To jump to the beginning of a C code block (while, switch, if etc), use the
-[{ command.
-
-To jump to the end of a C code block (while, switch, if etc), use the ]}
-command.
-
-The above two commands will work from anywhere inside the code block.
-
-To jump to the beginning of a parenthesis use the [( command.
-
-To jump to the end of a parenthesis use the ]) command.
-
-To get more help on these commands, do
-
-:help [{ :help ]} :help [( :help ])
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>Jumping
-to the declaration of a local/global variable</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=8">http://vim.sf.net/tip_view.php?tip_id=8</A><BR>
-
-'gd' command: To jump to the declaration of a local variable in a C program,
-position the cursor on the name of the variable and use the gd command.
-
-'gD' command: To jump to the declaration of a global variable in a C program,
-position the cursor on the name of the variable and use the gD command.
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>Displaying
-a variable/macro definition</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=9">http://vim.sf.net/tip_view.php?tip_id=9</A><BR>
-
-To display the definition of a variable, place the cursor on the variable
-and use the [i command. To display a macro definition, place the cursor on
-the macro name and use the [d command. Note that these commands will work
-most of the time (not all the time). To get more help on these commands, use
-
-:help [i :help [d
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>Jumping
-to previosuly visited locations in a file</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=10">http://vim.sf.net/tip_view.php?tip_id=10</A><BR>
-
-Vim remembers all the locations visited by you in a file in a session.
-You can jump to the older locations by pressing the Ctrl-O key. You can
-jump to the newer locations by pressing the Ctrl-I or the &lt;Tab&gt; key.
-
-To get more help on these keys, use
-
-:help CTRL-O :help CTRL-I :help jump-motions
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>Completing
-words quicky in insert mode</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=11">http://vim.sf.net/tip_view.php?tip_id=11</A><BR>
-
-In Insert mode, press the Ctrl-p or Ctrl-n key to complete part of a word
-that has been typed.
-
-This is useful while typing C programs to complete long variable and
-function names. This also helps in avoiding typing mistakes.
-
-Note that using the 'complete' option, you can complete keywords defined in
-one of the include files, tag file, etc.
-
-To get more help on this, use
-
-:help i_Ctrl-N :help i_Ctrl-P :help ins-completion :help complete
-
-</pre></tip> </html> <Tip category="KVim">
-<html><center>Converting tabs to spaces</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=12">http://vim.sf.net/tip_view.php?tip_id=12</A><BR>
-
-To insert space characters whenever the tab key is pressed, set the
-'expandtab' option:
-
- set expandtab
-
-With this option set, if you want to enter a real tab character use
-Ctrl-V&lt;Tab&gt; key sequence.
-
-To control the number of space characters that will be inserted when the tab
-key is pressed, set the 'tabstop' option. For example, to insert 4 spaces
-for a tab, use:
-
- set tabstop=4
-
-After the 'expandtab' option is set, all the new tab characters entered will
-be changed to spaces. This will not affect the existing tab characters.
-To change all the existing tab characters to match the current tab settings,
-use
-
- :retab
-
-To change the number of space characters inserted for indentation, use the
-'shiftwidth' option:
-
- set shiftwidth=4
-
-For example, to get the following coding style,
- - No tabs in the source file - All tab characters are 4 space
- characters
-
-use the following set of options:
-
- set tabstop=4 set shiftwidth=4 set expandtab
-
-Add the above settings to your .vimrc file.
-
-To get more help on these options, use :help tabstop :help shiftwidth :help
-expandtab
-
-</pre></tip> </html> <Tip category="KVim">
-<html><center>Incremental search</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=13">http://vim.sf.net/tip_view.php?tip_id=13</A><BR>
-
-To move the cursor to the matched string, while typing the search string,
-set the following option in the .vimrc file:
-
- set incsearch
-
-You can complete the search by pressing the Enter key. To cancel the search,
-press the escape key.
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>Highlighting
-all the search pattern matches</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=14">http://vim.sf.net/tip_view.php?tip_id=14</A><BR>
-
-To highlight all the search pattern matches in a file set the following option:
-
- :set hlsearch
-
-After this option is set, if you search for a pattern, all the matches in
-the file will be highlighted in yellow.
-
-To disable the highlighting temporarily, use the command
-
- :nohlsearch
-
-This command will remove the highlighting for the current search.
-The highlighting will come back for the next search.
-
-To disable the highlighting completely, set the following option:
-
- :set nohlsearch
-
-By default, the hlsearch option is turned off.
-
-To get more help on this option, use
-
-:help 'hlsearch' :help :nohlsearch
-
-</pre></tip> </html> <Tip category="KVim">
-<html><center>Displaying status line always</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=15">http://vim.sf.net/tip_view.php?tip_id=15</A><BR>
-
-To display the status line always, set the following option in your .vimrc
-file:
-
- set laststatus=2
-
-The advantage of having the status line displayed always is, you can see
-the current mode, file name, file status, ruler, etc.
-
-To get more help on this, use
-
-:help laststatus
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>Avoiding
-the "Hit ENTER to continue" prompts</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=16">http://vim.sf.net/tip_view.php?tip_id=16</A><BR>
-
-To avoid the "Hit ENTER to continue" prompt, use the 'shortmess' option.
-Add the following line to your .vimrc file:
-
- set shortmess=a
-
-Also, you can increase the height of the command line to 2
-
- set cmdheight=2
-
-The default command height is 1.
-
-To get more help on these options, use
-
-:help hit-enter :help shortmess :help cmdheight
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>Erasing
-previosuly entered characters in insert mode</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=17">http://vim.sf.net/tip_view.php?tip_id=17</A><BR>
-
-In insert mode, to erase previously entered characters, set the following
-option:
-
- set backspace=2
-
-By default, this option is empty. If this option is empty, in insert mode,
-you can not erase characters entered before this insert mode started.
-This is the standard Vi behavior.
-
-To get more help on this, use
-
-:help 'backspace'
-
-</pre></tip> </html> <Tip category="KVim">
-<html><center>Cleanup your HTML</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=18">http://vim.sf.net/tip_view.php?tip_id=18</A><BR>
-
-From Johannes Zellner on the vim list:
-
-You can use vim's makeprg and equalprg to clean up HTML. First download
-html tidy from <A HREF="http://www.w3.org/People/Raggett/tidy/. Then use
-the following commands.">http://www.w3.org/People/Raggett/tidy/. Then use
-the following commands.</A><BR>
-
-vim6? exe 'setlocal equalprg=tidy -quiet -f '.&errorfile setlocal makeprg=tidy
--quiet -e %
-
-vim5? exe 'set equalprg=tidy -quiet -f '.&errorfile set makeprg=tidy -quiet
--e %
-
-At this point you can use make to clean up the full file or you can use =
-to clean up sections.
-
-:help = :help equalprg :help makeprg
-
-</pre></tip> </html> <Tip category="KVim">
-<html><center>line numbers...</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=19">http://vim.sf.net/tip_view.php?tip_id=19</A><BR>
-
-I have started doing all my code reviews on a laptop because of the number
-command.
-
-:set number will put line numbers along the left side of a window
-
-:help number
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>Are *.swp
-and *~ files littering your working directory?</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=20">http://vim.sf.net/tip_view.php?tip_id=20</A><BR>
-
-Have you ever been frustrated at swap files and backups cluttering up your
-working directory?
-
-Untidy:
- ons.txt ons.txt~ README README~ tester.py tester.py~
-
-Here are a couple of options that can help:
-
- set backupdir=./.backup,.,/tmp set directory=.,./.backup,/tmp
-
-This way, if you want your backups to be neatly grouped, just create
-a directory called '.backup' in your working directory. Vim will stash
-backups there. The 'directory' option controls where swap files go. If your
-working directory is not writable, Vim will put the swap file in one of the
-specified places.
-
-</pre></tip> </html> <Tip category="KVim">
-<html><center>easy pasting to windows apps</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=21">http://vim.sf.net/tip_view.php?tip_id=21</A><BR>
-
-In Vim, the unnamed register is the " register, and the Windows Clipboard is
-the * register. This means that if you yank something, you have to yank it to
-the * register if you want to paste it into a Windows app. If this is too much
-trouble, set the 'clipboard' option to 'unnamed'. Then you always yank to *.
-
-So pasting to windows apps doesn't require prefixing "* :
-
- set clipboard=unnamed
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>handle
-common typos for :commands</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=22">http://vim.sf.net/tip_view.php?tip_id=22</A><BR>
-
-I frequently hold the shift key for too long when typing, for instance :wq,
-and end up with :Wq. Vim then whines "Not an editor command: Wq"
-
-In my .vimrc, I have taught vim my common typos: command! Q quit command! W
-write command! Wq wq " this one won't work, because :X is already a built-in
-command command! X xit
-
-</pre></tip> </html> <Tip category="KVim">
-<html><center>Vim xterm title</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=23">http://vim.sf.net/tip_view.php?tip_id=23</A><BR>
-
-Check out your .vimrc. If 'set notitle' is an entry, comment it out with
-a quotation mark ("). Now your xterm should inherit the title from Vim.
-e.g. 'Vim - ~/.vimrc'. This can be quite nice when programming and editing
-lots of files at the same time. by [jonasbn@wanadoo.dk]
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>changing
-the default syntax highlighting</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=24">http://vim.sf.net/tip_view.php?tip_id=24</A><BR>
-
- Here are some pointers to the vim documentation. Notice that the
- mechanism is different in vim 6.0 and vim 5.x.
-
-1. I want *.foo files to be highlighted like HTML files.
-
-:help new-filetype <A
-HREF="http://www.vim.org/html/autocmd.html#new-filetype">http://www.vim.org/html/autocmd.html#new-filetype</A><BR>
-
-2. I want to define a syntax file for *.bar files. Read the above and also
-
-:help mysyntaxfile <A
-HREF="http://www.vim.org/html/syntax.html#mysyntaxfile">http://www.vim.org/html/syntax.html#mysyntaxfile</A><BR>
-
-3. I want to make a few changes to the existing syntax highlighting.
-Depending on the x in 5.x, either read the above and page down a few screens,
-or you may be able to skip right to
-
-:help mysyntaxfile-add <A
-HREF="http://www.vim.org/html/syntax.html#mysyntaxfile-add">http://www.vim.org/html/syntax.html#mysyntaxfile-add</A><BR>
-
-4. I want to change some of the colors from their defaults. Again, read
-
-:help mysyntaxfile <A
-HREF="http://www.vim.org/html/syntax.html#mysyntaxfile">http://www.vim.org/html/syntax.html#mysyntaxfile</A><BR>
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>color
-highlighting on telnet (esp w/ SecureCRT)</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=25">http://vim.sf.net/tip_view.php?tip_id=25</A><BR>
-
-The following settings in .vimrc will enable color highlighting when using
-SecureCRT and may work on other telnet packages. The terminal type should
-be selected as ANSI and color enabled.
-
-if !has("gui_running") set t_Co=8 set t_Sf=^[[3%p1%dm set t_Sb=^[[4%p1%dm endif
-
-The ^[ is entered as "&lt;ctrl-v&gt;&lt;esc&gt;"
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>Getting
-rid of ^M - mixing dos and unix</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=26">http://vim.sf.net/tip_view.php?tip_id=26</A><BR>
-
-If you work in a mixed environment you will often open files that have ^M's
-in them. An example would be this:
-
-------------------------------------------------------------------
-import java.util.Hashtable; ^M import java.util.Properties; ^Mimport
-java.io.IOException; import org.xml.sax.AttributeList; ^M import
-org.xml.sax.HandlerBase; ^Mimport org.xml.sax.SAXException;
-
-/**^M
- * XMLHandler: This class parses the elements contained^M * within a XML
- message and builds a Hashtable^M
-
-[snip] ------------------------------------------------------------------
-
-Notice that some programs are not consistent in the way they insert the line
-breaks so you end up with some lines that have both a carrage return and a
-^M and some lines that have a ^M and no carrage return (and so blend into
-one). There are two steps to clean this up.
-
-1. replace all extraneous ^M:
-
-:%s/^M$//g
-
-BE SURE YOU MAKE the ^M USING "CTRL-V CTRL-M" NOT BY TYPING "CARROT M"! This
-expression will replace all the ^M's that have carriage returns after them
-with nothing. (The dollar ties the search to the end of a line)
-
-2. replace all ^M's that need to have carriage returns:
-
-:%s/^M//g
-
-Once again: BE SURE YOU MAKE the ^M USING "CTRL-V CTRL-M" NOT BY TYPING
-"CARROT M"! This expression will replace all the ^M's that didn't have
-carriage returns after them with a carriage return.
-
-Voila! Clean file. Map this to something if you do it frequently.
-
-:help ffs - for more info on file formats
-
-thanks to jonathan merz, douglas potts, and benji fisher
-
-</pre></tip> </html> <Tip category="KVim">
-<html><center>Convert hex to dec</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=27">http://vim.sf.net/tip_view.php?tip_id=27</A><BR>
-
-when you check the output of objdump, you'll confused by the $0xFFFFFFc
-operand, this function translate the hexcamal to decimal. function! Hex2Dec()
- let lstr = getline(".") let hexstr = matchstr(lstr, '0x[a-f0-9]+')
- while hexstr != ""
- let hexstr = hexstr + 0 exe 's#0x[a-f0-9]+#'.hexstr."#" let lstr =
- substitute(lstr, '0x[a-f0-9]+', hexstr, "") let hexstr = matchstr(lstr,
- '0x[a-f0-9]+')
- endwhile
-endfunction usage: 5,8call Hex2Dec()
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>add a line-number
-to every line without cat or awk alike utilities.</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=28">http://vim.sf.net/tip_view.php?tip_id=28</A><BR>
-
-With Unix-like environment, you can use cat or awk to generate a line number
-easily, because vim has a friendly interface with shell, so everything work
-in vim as well as it does in shell. :%!call -n or :%!awk '{print NR,$0}'
-
-But, if you use vim in MS-DOS, of win9x, win2000, you loss these tookit.
-here is a very simple way to archive this only by vim: fu! LineIt()
- exe ":s/^/".line(".")."/"
-endf
-
-Well, a sequence composed with alphabet is as easy as above:
- exe "s/^/".nr2char(line("."))."/"
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>reverse
-all the line with only 7 keystroke in vim</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=29">http://vim.sf.net/tip_view.php?tip_id=29</A><BR>
-
-:g/^/m0 well, 1. : bring you to command-line mode(also known as ex-mode)
-from normal-mode(also known as command mode). 2. g means you'll take an
-action through the whole file, generally perform a search, `v' also perform
-a search but it match the line not match the canonical expression. 3. /
-begins the regular express 4. ^ is a special character respect the start
-of a line. 5. the second / ends the regular express and indicate that the
-remains is action to do. 6. m means move, `t` and `co' for copy, `d' for
-delete 7. 0 is the destination line.
-
-you can use :g/regexp/t$ to filter all lines and pick the match line together
-and copy them to the end of the buffer or :g/regexp/y A to put them into a
-register(not eax, ebx...)
-
-</pre></tip> </html> <Tip category="KVim">
-<html><center>Increasing or decreasing numbers</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=30">http://vim.sf.net/tip_view.php?tip_id=30</A><BR>
-
-To increase a number under or nearest to the right of the cursor, go to
-Normal mode and type:
- Ctrl-A
-
-To decrease, type:
- Ctrl-X
-
-Using this in a macro simplifies generating number sequences a lot.
-
-</pre></tip> </html> <Tip category="KVim">
-<html><center>Find and Replace</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=31">http://vim.sf.net/tip_view.php?tip_id=31</A><BR>
-
-To find and replace one or more occurences of a given text pattern with a
-new text string, use the s[ubstitute] command.
-
-There are a variety of options, but these are what you most probably want:
-
-:%s/foo/bar/g find each occurance of 'foo' and replace it with
-'bar' without asking for confirmation
-
-:%s/foo/bar/gc find each occurance of 'foo' and replace it with
-'bar' asking for confirmation first
-
-:%s/&lt;foo&gt;/bar/gc find (match exact word only) and replace each
-occurance of 'foo' with 'bar'
-
-:%s/foo/bar/gci find (case insensitive) and replace each occurance of
-'foo' with 'bar'
-
-:%s/foo/bar/gcI find (case sensitive) and replace each occurance of
-'foo' with 'bar'
-
-NB: Without the 'g' flag, replacement occurs only for the first occurrence
-in each line.
-
-For a full description and some more interesting examples of the substitute
-command refer to
-
-:help substitute
-
-See also:
-
-:help cmdline-ranges :help pattern :help gdefault
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>Write
-your own vim function(scripts)</center> <pre> <A
-HREF="http://vim.sf.net/tip_view.php?tip_id=32">http://vim.sf.net/tip_view.php?tip_id=32</A><BR>
-
-compare to C and shell(bash), herein is some vim specifics about vim-script:
-1. A function name must be capitalized.
- hex2dec is invalid Hex2dec is valid while in c and shell(bash), both
- lowercase and uppercase is allowed.
-2. how to reference the parameters
- fu! Hex2dec(var1, var2)
- let str=a:var1 let str2=a:var2
- you must prefix the parameter name with "a:", and a:var1 itself is read-only
- in c, you reference the parameter directly and the parameter is writable.
-3. how to implement variable parameter
- fu! Hex2dec(fixpara, ...)
- a:0 is the real number of the variable parameter when you invoke the
- function, with :Hex2dec("asdf", 4,5,6), a:0=3, and a:1=4 a:2=5 a:3=6
- you can combine "a:" and the number to get the value while i&lt;a:0
- exe "let num=a:".i let i=i+1
- endwhile in c, the function get the real number by checking the additional
- parameter such as printf family, or by checking the special value such
- as NULL
-4. where is the vim-library
- yes, vim has its own function-library, just like *.a in c :help functions
-5. can I use += or ++ operator?
- Nop, += and ++ (and -=, -- and so on)operator gone away in vim.
-6. How can I assign a value to a variables and fetch its value?
- let var_Name=value let var1=var2 like it does in c, except you must use
- let keyword
-7. Can I use any ex-mode command in a function?
- As I know, yes, just use it directly, as if every line you type appears
- in the familar :
-8. Can I call a function recurse?
- Yes, but use it carefully to avoid infinte call.
-9. Can I call another function in a function?
- Course, like C does.
-10. Must I compile the function?
- No, you needn't and you can't, just :so script_name, after this you can
- call the function freely.
-11. Is it has integer and char or float data type?
- No, like perl, vim script justify the variable type depend upon the context
- :let a=1 :let a=a."asdf" :echo a you'll get `1asdf' :let a=1 :let a=a+2
- :echo a you'll get 3 But it differs from perl.
-12. Must I append a `;' in every statement?
- No, never do that. ; is required in C, and optional in shell for each
- statement in a alone line. But is forbidden in vim. if you want combine
- servals statement in one single line, use `|'. Take your mind that every
- statement appears in function should be valid in ex-mode(except for some
- special statement).
-
-</pre></tip> </html> <Tip category="KVim"> <html><center>toggle
-off the line-number when enter on-line help</center> <pre> <A