In this article I'd like to share a sample .exrc file which I've begun to use while working with the vi text editor on UNIX systems. It lacks the extreme level of customization available with vim and is more of a minimal vim version.
The .exrc file is to be placed within the users' home directory and the mentioned settings will get loaded every time the user uses vi to edit a file.
So, here's the file:
[ssuri@myserver:~] $ cat .exrc
" Show whitespace and EOL characters
" set list
" Show line numbers
set nu
" Hide Line Numbers
" set nonu
" Show matching brackets
set showmatch
" Show current mode in status line
"show current editor mode
set showmode
"set autoindentation in scripts
set autoindent
"map S to :wq! key combination
map S :wq!
"set searches to case insensitive
set ignorecase
"set shell env for ! commands
set shell=/bin/bash
"show matching braces
set showmatch
The .exrc file is to be placed within the users' home directory and the mentioned settings will get loaded every time the user uses vi to edit a file.
So, here's the file:
[ssuri@myserver:~] $ cat .exrc
" Show whitespace and EOL characters
" set list
" Show line numbers
set nu
" Hide Line Numbers
" set nonu
" Show matching brackets
set showmatch
" Show current mode in status line
"show current editor mode
set showmode
"set autoindentation in scripts
set autoindent
"map S to :wq! key combination
map S :wq!
"set searches to case insensitive
set ignorecase
"set shell env for ! commands
set shell=/bin/bash
"show matching braces
set showmatch
Comments are indicated y double quotes (").
Note: I've observed that this file does not tolerate blank lines. So if you'd like to keep some blank lines in the file to make it more readable, be sure to place " at the start of the line.
No comments:
Post a Comment