~ubuntu-branches/ubuntu/utopic/vim/utopic

« back to all changes in this revision

Viewing changes to runtime/doc/usr_21.txt

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2009-01-13 18:39:18 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090113183918-kgq1jzdwsbbex4pq
Tags: 2:7.2.079-1ubuntu1
* Resynchronise with Debian (diversions fix closes LP: #296324). Remaining
  changes:
  - runtime/syntax/debcontrol.vim:
    + Add "metapackages" to the list of valid sections.
  - runtime/syntax/debchangelog.vim:
    + Add "jaunty" to the list of valid suites.
  - Drop vim-lesstif package and lesstif2-dev build-dependency.
  - Enable Python interpreter on basic builds.
  - Create a .pot file for translations.
  - Disable autoindent, line-wrapping, and backup files by default.
  - runtime/syntax/debsources.vim:
    + Add "jaunty" to debsourcesDistrKeyword
  - runtime/syntax/grub.vim:
    + Add Ubuntu-specific 'quiet' keyword.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
*usr_21.txt*    For Vim version 7.2.  Last change: 2007 May 01
 
1
*usr_21.txt*    For Vim version 7.2.  Last change: 2008 Nov 09
2
2
 
3
3
                     VIM USER MANUAL - by Bram Moolenaar
4
4
 
153
153
to be lost.  Each item can be remembered only once.
154
154
 
155
155
 
156
 
GETTING BACK TO WHERE YOU WERE
 
156
GETTING BACK TO WHERE YOU STOPPED VIM
157
157
 
158
158
You are halfway editing a file and it's time to leave for holidays.  You exit
159
159
Vim and go enjoy yourselves, forgetting all about your work.  After a couple
168
168
   The |:marks| command is useful to find out where '0 to '9 will take you.
169
169
 
170
170
 
 
171
GETTING BACK TO SOME FILE
 
172
 
 
173
If you want to go back to a file that you edited recently, but not when
 
174
exiting Vim, there is a slightly more complicated way.  You can see a list of
 
175
files by typing the command: >
 
176
 
 
177
        :oldfiles
 
178
<       1: ~/.viminfo ~
 
179
        2: ~/text/resume.txt ~
 
180
        3: /tmp/draft ~
 
181
 
 
182
Now you would like to edit the second file, which is in the list preceded by
 
183
"2:".  You type: >
 
184
 
 
185
        :e #<2
 
186
 
 
187
Instead of ":e" you can use any command that has a file name argument, the
 
188
"#<2" item works in the same place as "%" (current file name) and "#"
 
189
(alternate file name).  So you can also split the window to edit the third
 
190
file: >
 
191
 
 
192
        :split #<3
 
193
 
 
194
That #<123 thing is a bit complicated when you just want to edit a file.
 
195
Fortunately there is a simpler way: >
 
196
 
 
197
        :browse oldfiles
 
198
<       1: ~/.viminfo ~
 
199
        2: ~/text/resume.txt ~
 
200
        3: /tmp/draft ~
 
201
        -- More --
 
202
 
 
203
You get the same list of files as with |:oldfiles|.  If you want to edit
 
204
"resume.txt" first press "q" to stop the listing.  You will get a prompt:
 
205
 
 
206
        Type number and <Enter> (empty cancels): ~
 
207
 
 
208
Type "2" and press <Enter> to edit the second file.
 
209
 
 
210
More info at |:oldfiles|, |v:oldfiles| and |c_#<|.
 
211
 
 
212
 
171
213
MOVE INFO FROM ONE VIM TO ANOTHER
172
214
 
173
215
You can use the ":wviminfo" and ":rviminfo" commands to save and restore the