os_unix.txt 2.5 KB

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