Ubuntu Vim configuration file

Source: Internet
Author: User
Ubuntu Vim configuration file description
Favorites

After I installed ubuntu8.04beta, my vim became "loose" because I didn't set attributes in the configuration file. My ubuntu6.06 was configured by David for me, which was very fast, I have finished the experiment before I can see it clearly. I tried it today, so I searched the internet for the relevant content and tried to show me what I was doing. The experiment was basically successful!

My Vim configuration file location:
/Etc/Vim/vimrc

Content I added:

"-----------------------
"Basic settings
"-----------------------

"Do not use the Vi-compatible keyboard Mode
Set nocompatible

"Check file type
Filetype on

"Number of historical rows recorded
Set history = 1000

"After a file is modified, the backup is automatically performed. The backup file name is added to the original file name." ~ "Suffix
"If has (" VMS ")
"Set nobackup
"Else
"Set backup
"Endif

"You can use the mouse anywhere in the buffer.
Set mouse =
Set selection = exclusive
Set selectmode = mouse, key

"-----------------------
"Interface settings
"----------------------

"Display row number
Set Nu!

"Highlight the current row
Set cursorline

"Black Background
Set background = dark

"Remove toolbar from Vim's Gui version
Set guioptions-= T

"The cursor position is displayed in the lower right corner during editing.
Set ruler

"Always show the status line
Set laststatus = 2

"---------------------
"Format settings
"---------------------

"Automatic line feed
Set wrap

"Line feed
Set linebreak

"Automatic Alignment
Set autoindent

"Smart alignment
Set smartindent

"Set automatic indent
Set Ai!

"Set the tab key to 4 spaces.
Set tabstop = 4

"Do not use spaces instead of tabs
Set noexpandtab

"Set to 4 spaces for interlace
Set shiftwidth = 4

"Make the backspace key available
Set backspace = 2

"Allow backspace and cursor keys to span row boundaries
Set whichwrap + = <,>, H, l

"---------------------
"Programming settings
"---------------------

"Syntax High Brightness Display
Syntax on

"Set matching mode, similar to the right parenthesis that will be matched when a left parenthesis is entered.
Set showmatch

"--------------------
"Search Settings
"-------------------

"By default, the search result is displayed in High Brightness. This setting disables the highlighted display.
"Set nohlsearch

"Incremental search with input
Set incsearch

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.