Vim always displays line number, open syntax highlighting in Mac/linux

Source: Internet
Author: User
Tags set background

Step 1:

CP/USR/SHARE/VIM/VIMRC ~/.VIMRC

First copy the Vim configuration template to the personal directory

Step 2:

VI ~/.VIMRC

Enter insert mode, add two lines at the end

Syntax on

Set nu!

Save the call.

Finally, attach other options (from the Internet)

Set nocompatible "Remove the relevant VI consistency pattern to avoid bugs and limitations in previous versions

Set nu! The Display line number

Set GUIFONT=LUXI/MONO/9 "Setting font, font name and font size

filetype on "Detecting file types

Set history=1000 "Record the number of rows in history

Set Background=dark "Background using black

Syntax on "Syntax high brightness display

Set Autoindent "Vim uses automatic alignment, that is, applies the alignment format of the current line to the next line (auto indent)

Set Cindent "(Cindent is automatically indented for C language syntax)

Set Smartindent "according to the above alignment format, intelligent selection alignment, for similar C language writing useful

Set tabstop=4 "Sets the TAB key to 4 spaces,

Set shiftwidth = 4 "Sets the use of 4 spaces when interlaced between rows

Set ai! The Set auto indent

Set Showmatch "Sets the matching pattern, similar to when an opening parenthesis is entered, matches the appropriate closing parenthesis

Set guioptions-=t "Removal of vim in GUI version toolbar

Set VB t_vb= "When Vim is being edited, an alert is issued if the command is wrong, and the setting removes the alarm

Set ruler "Displays the status line of the cursor position in the lower-right corner during the editing process

Set Nohls "By default, look for a match is a high brightness display, this setting turns off highlighting

Set Incsearch "Query a word in the program, automatically match the position of the word, such as query desk word, when you lose to D, will automatically find the first d word, when input to/de, will automatically find the first word to start with DS, and so on, into When you find a word to match, don't forget to enter

Set backspace=2 "Setting backspace key available

Vim always displays line number, open syntax highlighting in Mac/linux

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.