Common VIM configuration files in linux

Source: Internet
Author: User
Article Title: Commonly Used VIM configuration files in linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Update Software source first

Sudo apt-get updata

Then install sudo apt-get install vim-full

Enter gedit ~ in the terminal ~ /. Vimrc copy the 1 file to it and save it.

Enter gedit ~ in the terminal ~ /. Gvimrc copy the 2 file to it and save it.

Close the terminal and restart the terminal. Then you can see the effect in VIM.

. Vimrc

"""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""

"General settings

"""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""

"Set Default Decoding

Set fenc = UTF-8

Set fencs = UTF-8, usc-bom, euc-jp, gb18030, gbk, gb2312, cp936

"Do not use the vi keyboard mode, but vim's own

Set nocompatible

"Number of lines to be recorded in the history file

Set history = 100

"Confirmation pops up when processing unsaved or read-only files

Set confirm

"Share clipboard with windows

Set clipboard + = unnamed

"File type detection

Filetype on

"Load file type plug-in

Filetype plugin on

"Load indent files for a specific file type

Filetype indent on

"Save global variables

Set viminfo + =!

"Do not separate words with the following symbols by line breaks

Set iskeyword + =_, $, @, % ,#,-

"Syntax highlighting

Syntax on

"Highlight characters, so it is not limited to 100 Columns

: Highlight OverLength ctermbg = red ctermfg = white guibg = red guifg = white

: Match OverLength '\ % 101 v .*'

"Status line color

Highlight StatusLine guifg = SlateBlue guibg = Yellow

Highlight StatusLineNC guifg = Gray guibg = White

"""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""

"File Settings

"""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""

"Do Not Back Up Files (choose as needed)

Set nobackup

"Do not generate a swap file. Hide it when the buffer is discarded.

Setlocal noswapfile

Set bufhidden = hide

"Number of pixel rows inserted between characters

Set linespace = 0

"The command line in enhanced mode automatically completes the operation

Set wildmenu

"Display the row number and column number at the cursor position on the Status line

Set ruler

Set rulerformat = % 20 (% 2 * % <% f % = \ % m % r \ % 3l \ % c \ % p %)

"The height of the command line (under the Status line). The default value is 1. Here is 2.

Set bytes Height = 2

"Enable backspace to process indent, eol, start, and so on.

Set backspace = 2

"Allow backspace and cursor keys to span row boundaries

Set whichwrap + = <,>, h, l

"You can use the mouse anywhere in the buffer (similar to double-click the mouse in the workspace in office to locate the location)

Set mouse =

Set selection = exclusive

Set selectmode = mouse, key

"The prompt for assistance to children in Somalia is not displayed at startup.

Set shortmess = atI

"The commands command tells us which row of the file has been changed.

Set report = 0

"Don't let vim sound annoying.

Set noerrorbells

"White space is displayed between Split windows for ease of reading

Set fillchars = vert: \, stl: \, stlnc :\

[1] [2] [3] [4] [5] Next page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.