"Linux" "vim" to create its own vim editing environment __linux

Source: Internet
Author: User
Configuration file path:/ETC/VIM/VIMRC

SYN on; syntax highlighting

Set tabstop=4 tab width

Set shiftwidth=4, line indent width

Set backspace=2, setting backspace available

Set Incsearch Search Auto-complement

Set ai! ; Set Automatic indentation

Set nu! ; Show line Numbers

Make VI compatible with Windows Chinese

Set fencs=utf-8,ucs-bom,euc-jp,gb18030,gbk,gb2312,cp936

CTRL + N automatically search for complement functions or variables. If the Custom Shell tab full function only needs to add the following code inside the VIMRC:

function! Clevertab ()
If Strpart (Getline ('. '), 0, col ('. ') -1) =~ ' ^\s*$ '
Return "\<tab>"
Else
Return "\<c-n>"
Endfunction
Inoremap <Tab> <c-r>=clevertab () <CR>
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.