Lines Matching refs:file
18 10. The viminfo file |viminfo-file|
23 Most often, Vim is started to edit a single file with the command
31 Option arguments and file name arguments can be mixed, and any number of them
39 *-file* *---*
40 filename One or more file names. The first one will be the current
41 file and read into the buffer. The cursor will be positioned
43 To avoid a file name starting with a '-' being interpreted as
46 < All arguments after the "--" will be interpreted as file names,
76 -t {tag} A tag. "tag" is looked up in the tags file, the associated
77 file becomes the current file, and the associated command is
79 "tag" often is a function name. The effect is that the file
80 containing that function becomes the current file and the
85 -q [errorfile] QuickFix mode. The file with the name [errorfile] is read
88 for the file name. See 'errorfile' for the default value.
91 new buffer. It's empty and doesn't have a file name.
153 During startup write timing messages to the file {fname}.
155 your .vimrc, plugins and opening the first file.
161 --literal Take file names literally, don't expand wildcards. Not needed
162 for Unix, because Vim always takes file names literally (the
169 file being edited. If "num" is missing, the cursor will be
174 "pat" in the first file being edited (see |pattern| for the
181 -c {command} {command} will be executed after the first file has been
182 read (and after autocommands and modelines for that file have
196 {command} will be executed before processing any vimrc file.
201 -S {file} The {file} will be sourced after the first file has been read.
203 -c "source {file}"
206 {file} cannot start with a "-".
215 -r Recovery mode. Without a file name argument, a list of
216 existing swap files is given. With a file name, a swap file
226 be prevented from accidentally overwriting a file. If you
228 you can overwrite a file by adding an exclamation mark to
234 the swap file will not be updated automatically very often.
282 To be used when Vim is used to execute Ex commands from a file
301 file with the |-u| flag: >
309 before reading any file in the arglist. See also
332 Messages will be given for each file that is ":source"d and
333 for reading or writing a viminfo file. Can be used to find
340 that messages are not displayed but written to the file
352 this to get 'compatible', even though a .vimrc file exists.
364 use this to get 'nocompatible', when there is no .vimrc file
376 -n No swap file will be used. Recovery after a crash will be
377 impossible. Handy if you want to view or edit a file on a
385 vimrc file, but before the GUI initializations. Thus it
386 overrides a setting for 'updatecount' in a vimrc file, but not
387 in a gvimrc file. See |startup|.
396 one window is opened for every file given as argument. If
399 few windows will be editing an empty file.
408 for every file given as argument. The maximum is set with
411 empty file. Also see |tabpage|.
459 running Vim with an installed vim.bat or gvim.bat file it
466 -u {vimrc} The file {vimrc} is read for initializations. Most other
477 skipped, including reading the |gvimrc| file when the GUI
494 -U {gvimrc} The file {gvimrc} is read for initializations when the GUI
496 is equal to "NONE", no file is read for GUI initializations at
498 Exception: Reading the system-wide menu file is always done.
501 -i {viminfo} The file "viminfo" is used instead of the default viminfo
502 file. If the name "NONE" is used (all uppercase), no viminfo
503 file is read or written, even if 'viminfo' is set or when
504 ":rv" or ":wv" are used. See also |viminfo-file|.
515 - no viminfo file is read or written
523 not needed when reading a file, because there is a check if
524 the file that is being read has been encrypted, and Vim asks
545 -s {scriptin} The script file "scriptin" is read. The characters in the
546 file are interpreted as if you had typed them. The same can
548 of the file is reached before the editor exits, further
557 -w {scriptout} All the characters that you type are recorded in the file
559 to create a script file to be used with "vim -s" or
560 ":source!". When the "scriptout" file already exists, new
565 -W {scriptout} Like -w, but do not append, overwrite an existing file.
567 --remote [+{cmd}] {file} ...
568 Open the {file} in another Vim that functions as a server.
569 Any non-file arguments must come before this.
572 --remote-silent [+{cmd}] {file} ...
576 --remote-wait [+{cmd}] {file} ...
578 file(s).
581 --remote-wait-silent [+{cmd}] {file} ...
637 it. The second form specifies a file to read connection info
665 The name of the ".info" file must be the same as the name of the text file.
666 By clicking on this icon twice, Vim will be started with the file name as
667 current file name, which will be read into the buffer (if it exists). You can
672 It is not possible to give arguments to Vim, other than file names, from the
685 create a script file in "t:". This script file contains the same
687 This script file is then executed with a "newcli" command (the "c:run"
689 file will hang around until reboot, or until you delete it. This
729 <Down> moves by screen lines rather than file lines
751 - in a text file 'textwidth' is set to 78
774 The options and file names from the command that start Vim are
783 A file that contains initialization commands is called a "vimrc" file.
784 Each line in a vimrc file is executed as an Ex command line. It is
785 sometimes also referred to as "exrc" file. They are the same type of
786 file, but "exrc" is what Vi always used, "vimrc" is a Vim specific
804 If Vim was started with "-u filename", the file "filename" is used.
808 reading a file. "vim -u NONE" also skips loading plugins. |-u|
817 b. For Unix, MS-Windows, VMS, Macintosh and Amiga the system vimrc file
818 is read for initializations. The path of this file is shown with the
819 ":version" command. Mostly it's "$VIM/vimrc". Note that this file is
827 set to the file that was first found, unless $MYVIMRC was already set
831 II The user vimrc file(s):
844 "_vimrc" is also tried, in case an MS-DOS compatible file
846 "_vimrc", in case long file names are used.
852 IV The user exrc file(s). Same as for the user vimrc file, but with
855 V The default vimrc file, $VIMRUNTIME/defaults.vim. This sets up
862 - The file ".vimrc" (for Unix, Amiga) (*)
864 - The file "_vimrc" (for Unix, Amiga) (*)
866 - The file ".exrc" (for Unix, Amiga)
869 (*) Using this file or environment variable will cause 'compatible' to be
873 the vimrc file. Changing 'mzschemedll' later has no effect.
885 - The 'loadplugins' option was reset in a vimrc file.
920 9. Read the viminfo file
921 If the 'viminfo' option is not empty, the viminfo file is read. See
922 |viminfo-file|.
924 10. Read the quickfix file
925 If the "-q" flag was given to Vim, the quickfix file is read. If this
946 The $MYVIMRC or $MYGVIMRC file will be set to the first found vimrc and/or
947 gvimrc file.
953 Create a vimrc file to set the default settings and mappings for all your edit
960 Note that creating a vimrc file will cause the 'compatible' option to be off
965 vimrc file and place it in that directory under the name ".vimrc" ("_vimrc"
971 want to set the defaults for all users. Create a vimrc file with commands
976 Saving the current state of Vim to a file ~
979 mapping, then you may want to save them in a vimrc file for later use. See
980 |save-settings| about saving the current state of settings to a file.
985 Vi uses the variable EXINIT and the file "~/.exrc". So if you do not want to
986 interfere with Vi, then use the variable VIMINIT and the file "vimrc" instead.
1000 line separators. This will give problems if you have a file with only <NL>s
1008 - a user vimrc file is found, or
1009 - a vimrc file in the current directory is found, or
1014 - a gvimrc file was found,
1017 Note that this does NOT happen when a system-wide vimrc file was found.
1032 a .vimrc file is found: Mappings are interpreted the moment they are
1038 Defaults without a .vimrc file ~
1040 If Vim is started normally and no user vimrc file is found, the
1055 revert individual settings. See the defaults.vim file for hints on how to
1066 While reading the "vimrc" or the "exrc" file in the current directory, some
1068 This is always done when executing the command from a tags file. Otherwise it
1069 would be possible that you accidentally use a vimrc or tags file that somebody
1071 that start a shell, the ones that write to a file, and ":autocmd". The ":map"
1073 If you want Vim to execute all commands in a local vimrc file, you
1075 in the global "exrc" or "vimrc" file. This is not possible in "vimrc" or
1078 vimrc file. Warning: If you unpack an archive that contains a vimrc or exrc
1079 file, it will be owned by you. You won't have the security protection. Check
1080 the vimrc file before you start Vim in that directory, or reset the 'exrc'
1081 option. Some Unix systems allow a user to do "chown" on a file. This makes
1085 part of the line in the tags file) is always done in secure mode. This works
1099 - If you have "viminfo" enabled, the loading of the viminfo file may take a
1102 lines stored in a register with ":set viminfo='20,<50,s10". |viminfo-file|.
1107 When Vim starts without a file name, an introductory message is displayed (for
1116 file with: >
1118 vim --help >file
1150 problem). The file name ("help.txt" or any other) is removed. Then
1155 file in some directory, and adjusted the search path to find the vim
1168 highlighting. For example, the main help file is normally
1215 buffer with changes and a file name is written out.
1250 flexibility. There are a few commands to generate a vimrc file automatically.
1252 vimrc file.
1255 :mk[exrc] [file] Write current key mappings and changed options to
1256 [file] (default ".exrc" in the current directory),
1259 :mk[exrc]! [file] Always write current key mappings and changed
1260 options to [file] (default ".exrc" in the current
1264 :mkv[imrc][!] [file] Like ":mkexrc", but the default is ".vimrc" in the
1266 written to the file.
1268 These commands will write ":map" and ":set" commands to a file, in such a way
1272 'ttyfast' and 'ttymouse' are not included, because these are terminal or file
1278 misinterpreted. This makes the file incompatible with Vi, but makes sure it
1283 A common method is to use a default ".vimrc" file, make some modifications
1284 with ":map" and ":set" commands and write the modified file. First read the
1287 you want to make this file your default .vimrc, move it to your home directory
1294 1. Edit your vimrc file with Vim.
1303 Note that when you create a .vimrc file, this can influence the 'compatible'
1306 'compatible' option to the output file first, because of these side effects.
1313 *View* *view-file*
1319 *Session* *session-file*
1326 remember information for all Views and Sessions together |viminfo-file|.
1335 :mks[ession][!] [file] Write a Vim script that restores the current editing
1337 When [!] is included an existing file is overwritten.
1338 When [file] is omitted "Session.vim" is used.
1341 added to the file. Which ones depends on the 'sessionoptions' option. The
1342 resulting file, when executed with a ":source" command:
1353 sets the current directory to where the Session file is if 'sessionoptions'
1369 10. If a file exists with the same name as the Session file, but ending in
1383 The |SessionLoadPost| autocmd event is triggered after a session file is
1386 While the session file is loading the SessionLoad global variable is set to 1.
1391 :mkvie[w][!] [file] Write a Vim script that restores the contents of the
1393 When [!] is included an existing file is overwritten.
1394 When [file] is omitted or is a number from 1 to 9, a
1400 An existing file is always overwritten then. Use
1402 When [file] is the name of a file ('viewdir' is not
1403 used), a command to edit the file is added to the
1404 generated file.
1410 2. The file being edited in the window. If there is no file, the window is
1420 5. The scroll position and the cursor position in the file. Doesn't work very
1436 changes in the file between saving and loading the view will mess it up.
1441 :lo[adview] [nr] Load the view for the current file. When [nr] is
1447 different views of a file. These are remembered in the directory specified
1448 with the 'viewdir' option. The views are stored using the file name. If a
1449 file is renamed or accessed through a (symbolic) link the view will not be
1459 10. The viminfo file *viminfo* *viminfo-file* *E136*
1462 information. The viminfo file can be used to remember that information, which
1467 The viminfo file is used to store:
1478 The viminfo file is not supported when the |+viminfo| feature has been
1481 You could also use a Session file. The difference is that the viminfo file
1483 viminfo file. Session files are used to save the state of a specific editing
1486 enter Vim and directly start working in your desired setup. |session-file|
1490 the viminfo file are read and the info can be used in the appropriate places.
1492 (but file marks are). See |initialization| for how to set the 'viminfo'
1497 file (it's actually merged with the existing one, if one exists). The
1503 is currently in the viminfo file. For example:
1530 - The file protection for the viminfo file will be set to prevent other users
1533 - If you want to share the viminfo file with other users (e.g. when you "su"
1534 to another user), you can make the file writable for the group or everybody.
1535 Vim will preserve this when replacing the viminfo file. Be careful, don't
1536 allow just anybody to read and write your viminfo file!
1537 - Vim will not overwrite a viminfo file that is not writable by the current
1540 create a viminfo file owned by root that nobody else can read.
1541 - The viminfo file cannot be a symbolic link. This is to avoid security
1544 Marks are stored for each file separately. When a file is read and 'viminfo'
1545 is non-empty, the marks for that file are read from the viminfo file. NOTE:
1548 unless ":bdel" is used. If you want to save the marks for a file that you are
1551 cursor position when the file was last exited. No marks are saved for files
1555 The |v:oldfiles| variable is filled with the file names that the viminfo file
1558 *viminfo-file-marks*
1559 Uppercase marks ('A to 'Z) are stored when writing the viminfo file. The
1560 numbered marks ('0 to '9) are a bit special. When the viminfo file is written
1562 position and file. The old '0 is moved to '1, '1 to '2, etc. This
1566 back to the file and line where you exited Vim. To do that right away, try
1583 VIMINFO FILE NAME *viminfo-file-name*
1585 - The default name of the viminfo file is "$HOME/.viminfo" for Unix,
1590 file name |'viminfo'|.
1591 - The "-i" Vim argument can be used to set another file name, |-i|. When the
1592 file name given is "NONE" (all uppercase), no viminfo file is ever read or
1596 - For the commands below, another file name can be given, overriding the
1602 The text in the viminfo file is encoded as specified with the 'encoding'
1604 this works just fine. However, if you read the viminfo file with another
1609 Vim will then attempt to convert the text in the viminfo file from the
1617 Two commands can be used to read and write the viminfo file manually. This
1624 The viminfo file itself can be edited by hand too, although we suggest you
1627 create a second file, say "~/.my_viminfo" which could contain certain
1630 command line history. A line in your .vimrc file like >
1633 for different types of files (e.g., C code) and load them based on the file
1637 When Vim detects an error while reading a viminfo file, it will not overwrite
1638 that file. If there are more than 10 errors, Vim stops reading the viminfo
1639 file. This was done to avoid accidentally destroying a file when the file
1640 name of the viminfo file is wrong. This could happen when accidentally typing
1641 "vim -i file" when you wanted "vim -R file" (yes, somebody accidentally did
1642 that!). If you want to overwrite a viminfo file with an error in it, you will
1643 either have to fix the error, or delete the file (while Vim is running, so
1647 :rv[iminfo][!] [file] Read from viminfo file [file] (default: see
1648 |viminfo-file-name| above).
1654 :wv[iminfo][!] [file] Write to viminfo file [file] (default: see
1655 |viminfo-file-name| above).
1658 The information in the file is first read in to make
1666 the .viminfo file.
1670 file. This list is read on startup and only changes
1675 < The filtering happens on the file name.
1679 List file names as with |:oldfiles|, and then prompt
1680 for a number. When the number is valid that file from
1683 and still get the prompt to enter a file number.