diff options
Diffstat (limited to 'runtime/doc/starting.txt')
-rw-r--r-- | runtime/doc/starting.txt | 130 |
1 files changed, 26 insertions, 104 deletions
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index b532a9fb02..0c0b02e591 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -7,14 +7,13 @@ Starting Vim *starting* 1. Vim arguments |vim-arguments| -2. Vim on the Amiga |starting-amiga| -3. Running eVim |evim-keys| -4. Initialization |initialization| -5. $VIM and $VIMRUNTIME |$VIM| -6. Suspending |suspend| -7. Saving settings |save-settings| -8. Views and Sessions |views-sessions| -9. The viminfo file |viminfo-file| +2. Running eVim |evim-keys| +3. Initialization |initialization| +4. $VIM and $VIMRUNTIME |$VIM| +5. Suspending |suspend| +6. Saving settings |save-settings| +7. Views and Sessions |views-sessions| +8. The viminfo file |viminfo-file| ============================================================================== 1. Vim arguments *vim-arguments* @@ -413,15 +412,6 @@ argument. {not in Vi} {not available when compiled without the |+diff| feature} --d {device} Only on the Amiga and when not compiled with the |+diff| - feature. Works like "-dev". - *-dev* --dev {device} Only on the Amiga: The {device} is opened to be used for - editing. - Normally you would use this to set the window position and - size: "-d con:x/y/width/height", e.g., - "-d con:30/10/600/150". But you can also use it to start - editing on another device, e.g., AUX:. {not in Vi} *-f* -f GUI: Do not disconnect from the program that started Vim. 'f' stands for "foreground". If omitted, the GUI forks a new @@ -432,11 +422,6 @@ argument. Careful: You can use "-gf" to start the GUI in the foreground, but "-fg" is used to specify the foreground color. |gui-fork| - Amiga: Do not restart Vim to open a new window. This - option should be used when Vim is started by a program that - will wait for the edit session to finish (e.g., mail or - readnews). See |amiga-window|. - MS-Windows: This option is not supported. However, when running Vim with an installed vim.bat or gvim.bat file it works. @@ -603,57 +588,7 @@ Additional arguments are available on unix like systems when compiled with X11 GUI support. See |gui-resources|. ============================================================================== -2. Vim on the Amiga *starting-amiga* - -Starting Vim from the Workbench *workbench* -------------------------------- - -Vim can be started from the Workbench by clicking on its icon twice. It will -then start with an empty buffer. - -Vim can be started to edit one or more files by using a "Project" icon. The -"Default Tool" of the icon must be the full pathname of the Vim executable. -The name of the ".info" file must be the same as the name of the text file. -By clicking on this icon twice, Vim will be started with the file name as -current file name, which will be read into the buffer (if it exists). You can -edit multiple files by pressing the shift key while clicking on icons, and -clicking twice on the last one. The "Default Tool" for all these icons must -be the same. - -It is not possible to give arguments to Vim, other than file names, from the -workbench. - -Vim window *amiga-window* ----------- - -Vim will run in the CLI window where it was started. If Vim was started with -the "run" or "runback" command, or if Vim was started from the workbench, it -will open a window of its own. - -Technical detail: - To open the new window a little trick is used. As soon as Vim - recognizes that it does not run in a normal CLI window, it will - create a script file in "t:". This script file contains the same - command as the one Vim was started with, and an "endcli" command. - This script file is then executed with a "newcli" command (the "c:run" - and "c:newcli" commands are required for this to work). The script - file will hang around until reboot, or until you delete it. This - method is required to get the ":sh" and ":!" commands to work - correctly. But when Vim was started with the -f option (foreground - mode), this method is not used. The reason for this is that - when a program starts Vim with the -f option it will wait for Vim to - exit. With the script trick, the calling program does not know when - Vim exits. The -f option can be used when Vim is started by a mail - program which also waits for the edit session to finish. As a - consequence, the ":sh" and ":!" commands are not available when the - -f option is used. - -Vim will automatically recognize the window size and react to window -resizing. Under Amiga DOS 1.3, it is advised to use the fastfonts program, -"FF", to speed up display redrawing. - -============================================================================== -3. Running eVim *evim-keys* +2. Running eVim *evim-keys* EVim runs Vim as click-and-type editor. This is very unlike the original Vi idea. But it helps for people that don't use Vim often enough to learn the @@ -705,7 +640,7 @@ One hint: If you want to go to Normal mode to be able to type a sequence of commands, use CTRL-L. |i_CTRL-L| ============================================================================== -4. Initialization *initialization* *startup* +3. Initialization *initialization* *startup* This section is about the non-GUI version of Vim. See |gui-fork| for additional initialization when starting the GUI. @@ -741,8 +676,6 @@ accordingly. Vim proceeds in this order: Unix $HOME/.vimrc or $HOME/.vim/vimrc MS-Windows $HOME/_vimrc, $HOME/vimfiles/vimrc or $VIM/_vimrc - Amiga s:.vimrc, home:.vimrc, home:vimfiles:vimrc - or $VIM/.vimrc The files are searched in the order specified above and only the first one that is found is read. @@ -764,9 +697,9 @@ accordingly. Vim proceeds in this order: a. If vim was started as |evim| or |eview| or with the |-y| argument, the script $VIMRUNTIME/evim.vim will be loaded. *system-vimrc* - b. For Unix, MS-DOS, MS-Windows, Macintosh, and Amiga, the system vimrc - file is read for initializations. The path of this file is shown with - the ":version" command. Mostly it's "$VIM/vimrc". + b. For Unix, MS-DOS, MS-Windows, and Macintosh, the system vimrc file is + read for initializations. The path of this file is shown with the + ":version" command. Mostly it's "$VIM/vimrc". Note that this file is ALWAYS read in 'compatible' mode, since the automatic resetting of 'compatible' is only done later. Add a ":set nocp" command if you like. @@ -782,14 +715,10 @@ accordingly. Vim proceeds in this order: - The user vimrc file(s): "$HOME/.vimrc" (for Unix) (*) "$HOME/.vim/vimrc" (for Unix) (*) - "s:.vimrc" (for Amiga) (*) - "home:.vimrc" (for Amiga) (*) - "home:vimfiles:vimrc" (for Amiga) (*) - "$VIM/.vimrc" (for Amiga) (*) "$HOME/_vimrc" (for MS-DOS and Win32) (*) "$HOME/vimfiles/vimrc" (for MS-DOS and Win32) (*) "$VIM/_vimrc" (for MS-DOS and Win32) (*) - Note: For Unix and Amiga, when ".vimrc" does not exist, + Note: For Unix, when ".vimrc" does not exist, "_vimrc" is also tried, in case an MS-DOS compatible file system is used. For MS-DOS and Win32 ".vimrc" is checked after "_vimrc", in case long file names are used. @@ -805,11 +734,11 @@ accordingly. Vim proceeds in this order: d. If the 'exrc' option is on (which is not the default), the current directory is searched for three files. The first that exists is used, the others are ignored. - - The file ".vimrc" (for Unix and Amiga) (*) + - The file ".vimrc" (for Unix) (*) "_vimrc" (for MS-DOS and Win32) (*) - - The file "_vimrc" (for Unix and Amiga) (*) + - The file "_vimrc" (for Unix) (*) ".vimrc" (for MS-DOS and Win32) (*) - - The file ".exrc" (for Unix and Amiga) + - The file ".exrc" (for Unix) "_exrc" (for MS-DOS and Win32) (*) Using this file or environment variable will cause 'compatible' to be @@ -877,7 +806,6 @@ Standard setup: Create a vimrc file to set the default settings and mappings for all your edit sessions. Put it in a place so that it will be found by 3b: ~/.vimrc (Unix) - s:.vimrc (Amiga) $VIM\_vimrc (MS-DOS and Win32) Note that creating a vimrc file will cause the 'compatible' option to be off by default. See |compatible-default|. @@ -903,12 +831,6 @@ Avoiding setup problems for Vi users: Vi uses the variable EXINIT and the file "~/.exrc". So if you do not want to interfere with Vi, then use the variable VIMINIT and the file "vimrc" instead. -Amiga environment variables: -On the Amiga, two types of environment variables exist. The ones set with the -DOS 1.3 (or later) setenv command are recognized. See the AmigaDos 1.3 -manual. The environment variables set with the old Manx Set command (before -version 5.0) are not recognized. - MS-DOS line separators: On MS-DOS-like systems (MS-DOS itself and Win32), Vim assumes that all the vimrc files have <CR> <NL> pairs as line separators. This will give @@ -1013,7 +935,7 @@ This still won't work for systems where gvim does not use stdout at all though. ============================================================================== -5. $VIM and $VIMRUNTIME +4. $VIM and $VIMRUNTIME *$VIM* The environment variable "$VIM" is used to locate various user files for Vim, such as the user startup script ".vimrc". This depends on the system, see @@ -1075,7 +997,7 @@ greps in the help files) you might be able to use this: > VIMRUNTIME=`vim -e -T dumb --cmd 'exe "set t_cm=\<C-M>"|echo $VIMRUNTIME|quit' | tr -d '\015' ` ============================================================================== -6. Suspending *suspend* +5. Suspending *suspend* *iconize* *iconise* *CTRL-Z* *v_CTRL-Z* CTRL-Z Suspend Vim, like ":stop". @@ -1108,7 +1030,7 @@ can't paste it in another application (since Vim is going to sleep an attempt to get the selection would make the program hang). ============================================================================== -7. Saving settings *save-settings* +6. Saving settings *save-settings* Mostly you will edit your vimrc files manually. This gives you the greatest flexibility. There are a few commands to generate a vimrc file automatically. @@ -1149,7 +1071,7 @@ with ":map" and ":set" commands and write the modified file. First read the default ".vimrc" in with a command like ":source ~piet/.vimrc.Cprogs", change the settings and then save them in the current directory with ":mkvimrc!". If you want to make this file your default .vimrc, move it to your home directory -(on Unix), s: (Amiga) or $VIM directory (MS-DOS). You could also use +(on Unix) or $VIM directory (MS-DOS). You could also use autocommands |autocommand| and/or modelines |modeline|. *vimrc-option-example* @@ -1170,7 +1092,7 @@ option, which has several side effects. See |'compatible'|. 'compatible' option to the output file first, because of these side effects. ============================================================================== -8. Views and Sessions *views-sessions* +7. Views and Sessions *views-sessions* This is introduced in sections |21.4| and |21.5| of the user manual. @@ -1317,7 +1239,7 @@ To automatically save and restore views for *.c files: > au BufWinEnter *.c silent loadview ============================================================================== -9. The viminfo file *viminfo* *viminfo-file* *E136* +8. The viminfo file *viminfo* *viminfo-file* *E136* *E575* *E576* *E577* If you exit Vim and later start it again, you would normally lose a lot of information. The viminfo file can be used to remember that information, which @@ -1384,7 +1306,7 @@ stored, but the '"' mark is. The '"' mark is very useful for jumping to the 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:"). +use "ra:,rb:". The |v:oldfiles| variable is filled with the file names that the viminfo file has marks for. @@ -1416,9 +1338,9 @@ remembered. VIMINFO FILE NAME *viminfo-file-name* - The default name of the viminfo file is "$HOME/.viminfo" for Unix, - "s:.viminfo" for Amiga, "$HOME\_viminfo" for MS-DOS and Win32. For the last - two, when $HOME is not set, "$VIM\_viminfo" is used. When $VIM is also not - set, "c:\_viminfo" is used. + "$HOME\_viminfo" for MS-DOS and Win32. For the last two, when $HOME is not + set, "$VIM\_viminfo" is used. When $VIM is also not set, "c:\_viminfo" is + used. - The 'n' flag in the 'viminfo' option can be used to specify another viminfo file name |'viminfo'|. - The "-i" Vim argument can be used to set another file name, |-i|. When the |