Lines Matching refs:to

9 Define a list of files to work on and jump from one to the other.  Copy text
14 |07.3| Jumping from file to file
27 So far you had to start Vim for every file you wanted to edit. There is a
36 E37: No write since last change (use ! to override) ~
50 Or you can force Vim to discard your changes and edit the new file, using the
55 If you want to edit another file, but not write the changes in the current
66 You can start Vim to edit a sequence of files. For example: >
72 file, to edit the next file you use this command: >
82 But mostly you want to save the changes and move on to the next file. There
98 If you want to see the list of files, use this command: >
117 direction. Again, there is a shortcut command for when you want to write the
122 To move to the very last file in the list: >
126 And to move back to the first one again: >
139 When moving around the files and making changes, you have to remember to use
141 always want to write modified files, you can tell Vim to automatically write
146 When you are editing a file which you may not want to write, switch it off
154 You can redefine the list of files without the need to exit Vim and start it
155 again. Use this command to edit three other files: >
163 Vim will take you to the first file in the list. Again, if the current file
165 added) to abandon the changes.
170 When you use a list of files, Vim assumes you want to edit them all. To
174 E173: 46 more files to edit ~
176 If you really want to exit, just do it again. Then it will work (but not when
180 *07.3* Jumping from file to file
191 Now you are in two.c. Now use CTRL-^ to go back to one.c. Another CTRL-^ and
207 After jumping to another file, you can use two predefined marks which are very
212 This takes you to the position where the cursor was when you left the file.
219 file you use "x" to delete a character. Then you go to the last line with "G"
221 ":edit one.txt" to come back to "one.txt". If you now use `" Vim jumps to the
222 last line of the file. Using `. takes you to the position where you deleted
224 to the remembered position. At least until you make another change or leave
231 and jump to that position with "`x". That works within one file. If you edit
233 each file has its own set of marks, they are local to the file.
236 For example suppose that we are editing the file "foo.txt". Go to halfway
245 Now you can use the "'F" command to jump back to halfway foo.txt. Or edit yet
249 can place the mark, do hours of editing and still be able to jump back to that
251 It's often useful to think of a simple connection between the mark letter
255 To see where a specific mark is, give an argument to the ":marks" command: >
263 Don't forget that you can use CTRL-O and CTRL-I to jump to older and newer
269 Usually Vim does not produce a backup file. If you want to have one, all you
270 need to do is execute the following command: >
274 The name of the backup file is the original file with a ~ added to the end.
284 backup file is written. The default, to write the backup in the same
298 If you are editing source files, you might want to keep the file before you
310 If you make further changes to the file, Vim will notice that
319 This explains how to copy text from one file to another. Let's start with a
320 simple example. Edit the file that contains the text you want to copy. Move
321 the cursor to the start of the text and press "v". This starts Visual mode.
322 Now move the cursor to the end of the text and press "y". This yanks (copies)
330 Now edit the file you want to put the text in. Move the cursor to the
331 character where you want the text to appear after. Use "p" to put the text
337 Of course you can use many other commands to yank the text. For example, to
338 select whole lines start Visual mode with "V". Or use CTRL-V to select a
339 rectangular block. Or use "Y" to yank a single line, "yaw" to yank-a-word,
341 The "p" command puts the text after the cursor. Use "P" to put the text
348 When you want to copy several pieces of text from one file to another, having
349 to switch between the files and writing the target file takes a lot of time.
350 To avoid this, copy each piece of text to its own register.
352 registers named a to z (later you will find out there are others). Let's copy
353 a sentence to the f register (f for First): >
360 Now yank three whole lines to the l register (l for line): >
364 The count could be before the "l just as well. To yank a block of text to the
382 When you delete text, you can also specify a register. Use this to move
383 several pieces of text around. For example, to delete-a-word and write it in
397 This will write the text of the current file to the end of "logfile". Thus it
398 is appended. This avoids that you have to copy the lines, edit the log file
399 and put them there. Thus you save two steps. But you can only append to the
402 ":write". In chapter 10 you will learn other ways to select a range of lines.
407 Sometimes you only want to see what a file contains, without the intention to
420 When you try to make a change to the file Vim will give you a warning:
425 example, to be able to read it easily.
426 If you make changes to a file and forgot that it was read-only, you can
427 still write it. Add the ! to the write command to force writing.
429 If you really want to forbid making changes in a file, do this: >
433 Now every attempt to change the text will fail. The help files are like this,
434 for example. If you try to make a change you get this error message:
438 You could use the -M argument to setup Vim to work in a viewer mode. This is
447 A clever way to start editing a new file is by using an existing file that
449 to move a file. You know that you already have a program that copies a file,
454 You can delete the stuff you don't need. Now you need to save the file under
462 When you want to change the name of the file you are editing, but don't
463 want to write the file, you can use this command: >
468 the file you started editing. When you try to write the file, you might get
471 E13: File exists (use ! to override) ~