Modify Vim configurations in Ubuntu and Ubuntu

Source: Internet
Author: User

Modify Vim configurations in Ubuntu and Ubuntu
In UBUNTU, the vim configuration file is stored in the/etc/vim directory. The configuration file name is vimrc.

  1. Show row number

  2. Syntax highlighting

  3. Auto indent

  4. Show commands in text

  5. Show nearest matching brackets

  6. Smart matching

  7. Smart prompt and search

" The following are commented out as they cause vim to behave a lot" differently from regular Vi. They are highly recommended though."set showcmd            " Show (partial) command in status line."set showmatch          " Show matching brackets."set ignorecase         " Do case insensitive matching"set smartcase          " Do smart case matching"set incsearch          " Incremental search"set autowrite          " Automatically save before commands like :next and :make"set hidden             " Hide buffers when they are abandoned"set mouse=a            " Enable mouse usage (all modes)

Note: In the location file, you can use "Comments allowed"

Automatic highlighted code prompt

" Vim5 and later versions support syntax highlighting. Uncommenting the next" line enables syntax highlighting by default.if has("syntax")  syntax onendif
Command Prompt code
" Uncomment the following to have Vim load indentation rules and plugins" according to the detected filetype.if has("autocmd")  filetype plugin indent onendif
set nuset autoindentset cindent "this is main for C languageset tabstop=4set shiftwidth=4set softtabstop=4

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.