Vim is a text editor intended for advanced uses. If you just want to occasionally edit text files, a simpler editor like nano is probably more appropriate.
Vim has a configuration file located in /etc/vim/vimrc. We can assume that all these packages may be affected by changes to this file:Files that are part of a package are overwritten when the package is updated, it is recommended to use /etc/vim/vimrc.local instead. Or Here are my personal modifications to Vim's default configuration:This one only works in the home directory (don't ask me why):You may have other interesting configuration items, please share them
Vim has a configuration file located in /etc/vim/vimrc. We can assume that all these packages may be affected by changes to this file:
Code:
$> apt-file -x search "/etc/vim/vimrc$"vim-common: /etc/vim/vimrc$> apt --no-breaks --no-replaces rdepends "vim-common" 2>/dev/null | sed 's/ (.\+//'vim-commonReverse Depends: Depends: vim-latexsuite Depends: vim-addon-manager Depends: vim Depends: vim-tiny Depends: vim-nox Depends: vim-motif Depends: vim-gtk3 Depends: pollinate Depends: dh-vim-addon Suggests: libfinal0
~/.vimrc
in your home directory.Code:
$> tail -n5 /etc/vim/vimrc" Source a global configuration file if availableif filereadable("/etc/vim/vimrc.local") source /etc/vim/vimrc.localendif
Code:
$> cat /etc/vim/vimrc.local"" enable syntax highlightingsyntax on"" for dark backgrounds (why isn't this the default?)set background=dark"" I don't like the default blue color for commentshi Comment ctermfg=Grey"" avoid syntax highlighting errors when jumping to a distant position":au Syntax * syntax sync fromstart"" same but for shell scripts only:au Syntax sh syntax sync fromstart"" jump to the last position when reopening a fileif has("autocmd") au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endifendif"" original tab setting:"set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab"" do not use tabs, insert three spaces instead (secures rendering on other systems)set tabstop=3 softtabstop=3 shiftwidth=3 expandtab
Code:
$> cat ~/.vimrc"" The middle mouse button pastes from the system clipboard, NOT from the vim clipboardset mouse=
Statistics: Posted by fabien — 2024-09-27 22:50 — Replies 1 — Views 32