Christian Brabandt | b4ddc6c | 2024-01-02 16:51:11 +0100 | [diff] [blame] | 1 | *os_unix.txt* For Vim version 9.1. Last change: 2022 Nov 25 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 2 | |
| 3 | |
| 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
| 5 | |
| 6 | |
| 7 | *unix* *Unix* |
| 8 | This file contains the particularities for the Unix version of Vim. |
| 9 | |
| 10 | For compiling Vim on Unix see "INSTALL" and "Makefile" in the src directory. |
| 11 | |
| 12 | The default help file name is "/usr/local/lib/vim/help.txt" |
| 13 | The files "$HOME/.vimrc" and "$HOME/.exrc" are used instead of "s:.vimrc" and |
Bram Moolenaar | 13fcaaf | 2005-04-15 21:13:42 +0000 | [diff] [blame] | 14 | "s:.exrc". Additionally "/usr/local/etc/vimrc" is used first. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 15 | If "/usr/local/share" exists it is used instead of "/usr/local/lib". |
| 16 | |
| 17 | Temporary files (for filtering) are put in "/tmp". If you want to place them |
| 18 | somewhere else, set the environment variable $TMPDIR to the directory you |
| 19 | prefer. |
| 20 | |
| 21 | With wildcard expansion you can use '~' (home directory) and '$' |
| 22 | (environment variable). |
| 23 | |
| 24 | *fork* *spoon* |
| 25 | For executing external commands fork()/exec() is used when possible, otherwise |
| 26 | system() is used, which is a bit slower. The output of ":version" includes |
| 27 | |+fork| when fork()/exec() is used, |+system()| when system() is used. This |
| 28 | can be changed at compile time. |
Bram Moolenaar | 13fcaaf | 2005-04-15 21:13:42 +0000 | [diff] [blame] | 29 | (For forking of the GUI version see |gui-fork|.) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 30 | |
Bram Moolenaar | c1cf4c9 | 2022-11-25 15:09:35 +0000 | [diff] [blame] | 31 | For historic reasons terminal updating under Unix is expected to be slow (e.g. |
| 32 | serial line terminal, shell window in suntools), the 'showcmd' and 'ruler' |
| 33 | options are off by default. If you have a fast terminal, try setting them |
| 34 | on: > |
| 35 | set showcmd ruler |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 36 | |
| 37 | When using Vim in an xterm the mouse clicks can be used by Vim by setting |
Bram Moolenaar | 13fcaaf | 2005-04-15 21:13:42 +0000 | [diff] [blame] | 38 | 'mouse' to "a". If there is access to an X-server gui style copy/paste will |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 39 | be used and visual feedback will be provided while dragging with the mouse. |
| 40 | If you then still want the xterm copy/paste with the mouse, press the shift |
| 41 | key when using the mouse. See |mouse-using|. Visual feedback while dragging |
| 42 | can also be achieved via the 'ttymouse' option if your xterm is new enough. |
| 43 | |
| 44 | *terminal-colors* |
| 45 | To use colors in Vim you can use the following example (if your terminal |
| 46 | supports colors, but "T_Co" is empty or zero): > |
| 47 | :set t_me=^[[0;1;36m " normal mode (undoes t_mr and t_md) |
| 48 | :set t_mr=^[[0;1;33;44m " reverse (invert) mode |
| 49 | :set t_md=^[[1;33;41m " bold mode |
| 50 | :set t_se=^[[1;36;40m " standout end |
| 51 | :set t_so=^[[1;32;45m " standout mode |
| 52 | :set t_ue=^[[0;1;36m " underline end |
| 53 | :set t_us=^[[1;32m " underline mode start |
| 54 | [the ^[ is an <Esc>, type CTRL-V <Esc> to enter it] |
| 55 | |
| 56 | For real color terminals the ":highlight" command can be used. |
| 57 | |
Bram Moolenaar | 2641f77 | 2005-03-25 21:58:17 +0000 | [diff] [blame] | 58 | The file "tools/vim132" is a shell script that can be used to put Vim in 132 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 59 | column mode on a vt100 and lookalikes. |
| 60 | |
Bram Moolenaar | 91f84f6 | 2018-07-29 15:07:52 +0200 | [diff] [blame] | 61 | vim:tw=78:ts=8:noet:ft=help:norl: |