Set the line number and highlight the syntax font for ubuntu vi.

Source: Internet
Author: User

Ubuntu vi sets the line number, highlight the syntax font, and so on. 1. In The sudo vi/etc/vim/vimrc file, the dual guide represents the comment. You can set the double quotation marks, you can also delete double quotation marks and add new ones. The following are some settings: two of them can only take one set ai/noai "auto indent, keep the new line with the previous line-caused automatic space/non-automatic space (default) set aw/noaw "automatic write, when transferring to shell or using: n to edit other files, the current buffer is written/not written to set flash/noflash "Flashing in the error but not calling (default) /use call without blinking set ic/noic. "Case Insensitive during query and mode matching/case insensitive (default) set nu/nonu set number/nonumber "display the row number on the left of the screen/do not display the row number (default) set showmatch" display parentheses matching, when you type, high Brightness Display matching brackets/default not highlighted set showmode "Mode indicator in the highlighted button bar when in text input mode/default not indicating current mode set showcmd" display currently executed commands in the status bar, uncompleted command fragments will also be displayed. After the set warn/nowarn is modified, the system displays the text when it leaves the shell (default) set ws/nows "when searching, if the end of the file is reached, the file header is bypassed and the search continues. set wrap/nowrap" long line display automatic folding colorscheme evening "sets the background to night mode filetype plugin on" Automatic Identification file type, automatically match the corresponding, "file type Plugin. vim "file, using indent definition file set autoindent" to set Automatic indent: that is, the indent value of each line is equal to that of the previous line; use noautoindent to unset set cindent "to indent set noignorecase in C/C ++ mode" default case-sensitive set rstrap "to open the status bar ruler set scroloff = 5" set the cursor to 5 off the upper and lower boundary of the window the row window automatically scrolls the set shiftwidth = 4 "setting <and> the width of the command is 4 set softtabstop = 4", so that four spaces can be deleted at a time when you press the return key, if there are less than four spaces, delete all spaces) set tabstop = 4 "set tab length to 4 set wrap" show syntax enablesyntax on "auto syntax Highlight 2. Step 2 you have to copy a file http://www.bkjia.com/ OS /201109/105303.html note: when I modified the above operations, I also downloaded a new vim file. (after reading it online, it seems that the built-in vi file is not true. I have installed this file and do not know whether it has any impact)

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.