Linux Text editor vim configuration

Source: Internet
Author: User
Tags linux text editor

Vim is a well-known, powerful, highly customizable text editor similar to VI, which improves and adds many features on the basis of VI. Vim is purely free software.

So a well-configured vim will certainly be more handy to use.

650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0036.gif "alt=" j_0036.gif "/> That question came, in the end how to configure it???


First open the port (terminal) under Linux and switch to root

Root Toggle command: $ Su, then enter the password

Then enter the command: $ cd/etc, locate the file VIMRC in the directory, and edit it inside.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/82/CC/wKiom1dhHuqw2kTAAAAzoKN63Ag021.png "title=" 0.PNG " Width= "height=" border= "0" hspace= "0" vspace= "0" style= "width:500px;height:45px;" alt= " Wkiom1dhhuqw2ktaaaazokn63ag021.png "/>

If not, you'll need to create a file of the same name yourself.

Here are the main settings I've made, and as the study progresses in the further

Main configuration commands

Auto Indent set autoindentset cindentsyntax on                //Syntax Highlighting set nu                   //Display line number set tabstop=4            //tab the width of the key set softtabstoop=4set shiftwidth=4set history=1000         //history number of records winpos 5 5               //setting Window Position  set lines=40 columns=155set  go=                  //No graphic button autocmd insertleave * se nocul         //highlight current line with light autocmd insertenter * se cul           //highlight current line with light Set ruler               //Show Ruler set  showcmd             //input commands to show, see more clearly set  cmdheight=1         //the height of the command line (under the status line), set to 1 set  novisualbellset completeopt=preview,menufiletype plugin onset clipboard+=unnamedset  nobackupaet autowriteset cursorline          // Highlight when forward

Automatic completion of parentheses and punctuation

: Inoremap (() <esc>i:inoremap [[]<esc>i:inoremap {}<esc>i:inoremap < <><esc>i: Inoremap "" "<esc>i:inoremap" <esc>i

Verified, the above statement first ': ' Optional, specific reasons I'm not particularly clear at the moment


Write that much first.


This article from the "777 Fast" blog, declined reprint!

Linux Text editor vim configuration

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.