summaryrefslogtreecommitdiffstats
path: root/runtime/doc
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2008-11-09 12:46:09 +0000
committerBram Moolenaar <Bram@vim.org>2008-11-09 12:46:09 +0000
commitd812df63003c86880c97057cfb17e3db2059a56f (patch)
tree9dee4f7222edfb2916cf9fa38d8ffde19edc5a41 /runtime/doc
parentc590f62349b39ab426217bcbe05320bf6790c909 (diff)
updated for version 7.2-031v7.2.031
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/cmdline.txt33
-rw-r--r--runtime/doc/eval.txt13
-rw-r--r--runtime/doc/starting.txt29
-rw-r--r--runtime/doc/usr_21.txt46
4 files changed, 104 insertions, 17 deletions
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index c6f13120fa..839536b21f 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -1,4 +1,4 @@
-*cmdline.txt* For Vim version 7.2. Last change: 2008 Jul 29
+*cmdline.txt* For Vim version 7.2. Last change: 2008 Sep 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -157,6 +157,11 @@ CTRL-R {0-9a-z"%#:-=.} *c_CTRL-R* *c_<C-R>*
(doesn't work at the expression prompt; some
things such as changing the buffer or current
window are not allowed to avoid side effects)
+ When the result is a |List| the items are used
+ as lines. They can have line breaks inside
+ too.
+ When the result is a Float it's automatically
+ converted to a String.
See |registers| about registers. {not in Vi}
Implementation detail: When using the |expression| register
and invoking setcmdpos(), this sets the position before
@@ -730,19 +735,29 @@ to use |fnameescape()|.
In Ex commands, at places where a file name can be used, the following
characters have a special meaning. These can also be used in the expression
function expand() |expand()|.
- % is replaced with the current file name *:_%*
- # is replaced with the alternate file name *:_#*
+ % Is replaced with the current file name. *:_%* *c_%*
+ # Is replaced with the alternate file name. *:_#* *c_#*
#n (where n is a number) is replaced with the file name of
- buffer n. "#0" is the same as "#"
- ## is replaced with all names in the argument list *:_##*
+ buffer n. "#0" is the same as "#".
+ ## Is replaced with all names in the argument list *:_##* *c_##*
concatenated, separated by spaces. Each space in a name
is preceded with a backslash.
-Note that these give the file name as it was typed. If an absolute path is
-needed (when using the file name from a different directory), you need to add
-":p". See |filename-modifiers|.
+ #<n (where n is a number > 0) is replaced with old *:_#<* *c_#<*
+ file name n. See |:oldfiles| or |v:oldfiles| to get the
+ number. *E809*
+ {only when compiled with the +eval and +viminfo features}
+
+Note that these, except "#<n", give the file name as it was typed. If an
+absolute path is needed (when using the file name from a different directory),
+you need to add ":p". See |filename-modifiers|.
+
+The "#<n" item returns an absolute path, but it will start with "~/" for files
+below your home directory.
+
Note that backslashes are inserted before spaces, so that the command will
correctly interpret the file name. But this doesn't happen for shell
-commands. For those you probably have to use quotes: >
+commands. For those you probably have to use quotes (this fails for files
+that contain a quote and wildcards): >
:!ls "%"
:r !spell "%"
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 7959275e01..81afadcaa8 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.2. Last change: 2008 Aug 09
+*eval.txt* For Vim version 7.2. Last change: 2008 Nov 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1484,6 +1484,17 @@ v:mouse_col Column number for a mouse click obtained with |getchar()|.
This is the screen column number, like with |virtcol()|. The
value is zero when there was no mouse button click.
+ *v:oldfiles* *oldfiles-variable*
+v:oldfiles List of file names that is loaded from the |viminfo| file on
+ startup. These are the files that Vim remembers marks for.
+ The length of the List is limited by the ' argument of the
+ 'viminfo' option (default is 100).
+ Also see |:oldfiles| and |c_#<|.
+ The List can be modified, but this has no effect on what is
+ stored in the |viminfo| file later. If you use values other
+ than String this will cause trouble.
+ {only when compiled with the +viminfo feature}
+
*v:operator* *operator-variable*
v:operator The last operator given in Normal mode. This is a single
character except for commands starting with <g> or <z>,
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index c6d0e5eb57..2326985b42 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -1,4 +1,4 @@
-*starting.txt* For Vim version 7.2. Last change: 2008 Jun 21
+*starting.txt* For Vim version 7.2. Last change: 2008 Nov 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1337,8 +1337,9 @@ enter Vim and directly start working in your desired setup. |session-file|
*viminfo-read*
When Vim is started and the 'viminfo' option is non-empty, the contents of
the viminfo file are read and the info can be used in the appropriate places.
-The marks are not read in at startup (but file marks are). See
-|initialization| for how to set the 'viminfo' option upon startup.
+The |v:oldfiles| variable is filled. The marks are not read in at startup
+(but file marks are). See |initialization| for how to set the 'viminfo'
+option upon startup.
*viminfo-write*
When Vim exits and 'viminfo' is non-empty, the info is stored in the viminfo
@@ -1372,6 +1373,8 @@ cursor position when the file was last exited. No marks are saved for files
that start with any string given with the "r" flag in 'viminfo'. This can be
used to avoid saving marks for files on removable media (for MS-DOS you would
use "ra:,rb:", for Amiga "rdf0:,rdf1:,rdf2:").
+The |v:oldfiles| variable is filled with the file names that the viminfo file
+has marks for.
*viminfo-file-marks*
Uppercase marks ('A to 'Z) are stored when writing the viminfo file. The
@@ -1463,8 +1466,8 @@ most of the information will be restored).
*:rv* *:rviminfo* *E195*
:rv[iminfo][!] [file] Read from viminfo file [file] (default: see above).
If [!] is given, then any information that is
- already set (registers, marks, etc.) will be
- overwritten. {not in Vi}
+ already set (registers, marks, |v:oldfiles|, etc.)
+ will be overwritten {not in Vi}
*:wv* *:wviminfo* *E137* *E138* *E574*
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see above).
@@ -1479,4 +1482,20 @@ most of the information will be restored).
the .viminfo file.
{not in Vi}
+ *:ol* *:oldfiles*
+:ol[dfiles] List the files that have marks stored in the viminfo
+ file. This list is read on startup and only changes
+ afterwards with ":rviminfo!". Also see |v:oldfiles|.
+ The number can be used with |c_#<|.
+ {not in Vi, only when compiled with the +eval feature}
+
+:bro[wse] ol[dfiles][!]
+ List file names as with |:oldfiles|, and then prompt
+ for a number. When the number is valid that file from
+ the list is edited.
+ If you get the |press-enter| prompt you can press "q"
+ and still get the prompt to enter a file number.
+ Use ! to abondon a modified buffer. |abandon|
+ {not when compiled with tiny or small features}
+
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/usr_21.txt b/runtime/doc/usr_21.txt
index a6e58bebaa..cdbc42e76c 100644
--- a/runtime/doc/usr_21.txt
+++ b/runtime/doc/usr_21.txt
@@ -1,4 +1,4 @@
-*usr_21.txt* For Vim version 7.2. Last change: 2007 May 01
+*usr_21.txt* For Vim version 7.2. Last change: 2008 Nov 09
VIM USER MANUAL - by Bram Moolenaar
@@ -153,7 +153,7 @@ information. This may cause information that previously exiting Vims stored
to be lost. Each item can be remembered only once.
-GETTING BACK TO WHERE YOU WERE
+GETTING BACK TO WHERE YOU STOPPED VIM
You are halfway editing a file and it's time to leave for holidays. You exit
Vim and go enjoy yourselves, forgetting all about your work. After a couple
@@ -168,6 +168,48 @@ Mark '9 is lost.
The |:marks| command is useful to find out where '0 to '9 will take you.
+GETTING BACK TO SOME FILE
+
+If you want to go back to a file that you edited recently, but not when
+exiting Vim, there is a slightly more complicated way. You can see a list of
+files by typing the command: >
+
+ :oldfiles
+< 1: ~/.viminfo ~
+ 2: ~/text/resume.txt ~
+ 3: /tmp/draft ~
+
+Now you would like to edit the second file, which is in the list preceded by
+"2:". You type: >
+
+ :e #<2
+
+Instead of ":e" you can use any command that has a file name argument, the
+"#<2" item works in the same place as "%" (current file name) and "#"
+(alternate file name). So you can also split the window to edit the third
+file: >
+
+ :split #<3
+
+That #<123 thing is a bit complicated when you just want to edit a file.
+Fortunately there is a simpler way: >
+
+ :browse oldfiles
+< 1: ~/.viminfo ~
+ 2: ~/text/resume.txt ~
+ 3: /tmp/draft ~
+ -- More --
+
+You get the same list of files as with |:oldfiles|. If you want to edit
+"resume.txt" first press "q" to stop the listing. You will get a prompt:
+
+ Type number and <Enter> (empty cancels): ~
+
+Type "2" and press <Enter> to edit the second file.
+
+More info at |:oldfiles|, |v:oldfiles| and |c_#<|.
+
+
MOVE INFO FROM ONE VIM TO ANOTHER
You can use the ":wviminfo" and ":rviminfo" commands to save and restore the