Linux VIM configuration (practical)

 

"Path: /usr/share/vim/vimrc file

 

 


"2011-09-30 Update VIM Set:WangShengFeng."

"No need to use vi compatibility mode
set nocompatible

"Syntax highlighting
set syntax=on

"Remove the prompt sound of input error
set noeb

"When processing unsaved or read-only files, a confirmation pop-up
set confirm

"
Autoindent
set autoindent set cindent

"The width of the Tab key
set tabstop=4

"Uniform indentation is 4
set softtabstop=4
set shiftwidth=4

"Don't use spaces instead of tabs
set noexpandtab

"Use tabs at the beginning of lines and paragraphs
set smarttab

"No display line number
set nonumber

"Number of history records
set history=10000

"No temporary files to generate
the SET nobackup
the SET noswapfile

"Search ignore case
set ignorecase

"Search character by character highlighting
set hlsearch
set incsearch

"
Inline replacement set gdefault

"Encoding settings
set enc=utf-8
set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936

"Language settings
set langmenu=zh_CN.UTF-8
set helplang=cn

"The content displayed on my status line (including file type and decoding)

set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")}

"set statusline=[%F]%y%r%m%*%=[Line:%l/%L,Column:%c][%p%%]

"Always display the status line
set laststatus=2

"During the editing process, the status line
set ruler at the cursor position is displayed in the lower right corner

"The height of the command line (under the status line), the default is 1, here is 2
set cmdheight=2

"Detect
filetype filetype on

"Load
filetype plugin on

"Load related indented files for a specific file type
filetype indent on

"Save global variables
" set viminfo+=!

Guess you like

Origin blog.csdn.net/wangshengfeng1986211/article/details/6837761