Vim basic configuration

Source: Internet
Author: User

1. Disable the VI consistency mode.

set nocompatible

2. How to configure backspace

set backspace=indent,eol,start

3. display the row number

set number

4. Set to display the cursor row and column information in the lower right corner of the editing process.

set ruler

5. display the command being entered in the status bar

set showcmd

6. Set the number of historical records

set history=1000

7. Set canceling backup to prohibit generation of temporary files

set nobackupset noswapfile

8. Set the matching mode.

set showmatch

9. Set automatic alignment in C/C ++ Mode

set autoindentset cindent

10. Enable syntax highlighting.

syntax enablesyntax on

11. Specify the color scheme as 256 colors.

set t_Co=256

12. Case Insensitive when searching

set ignorecase

13. You can use the mouse in vim.

set mouse=a

14. Set the tab width

set tabstop=4

15. Set the number of automatically alignment Spaces

set shiftwidth=4

16. Four spaces can be deleted when the backspace key is set.

set smarttabset softtabstop=4

17. automatically convert the tab key to a space

set expandtab

18. Set the encoding method

set encoding=utf-8

19. When automatically determining the encoding, try the following encoding in sequence

set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1

20. Check the file type

filetype on

21. adopt different indentation methods for different files

filetype indent on

22. Allow plug-ins

filetype plugin on

23. Start smart completion

filetype plugin indent on

24. required to start using vundle

set nocompatiblefiletype offset rtp+=~/.vim/bundle/vundle/call vundle#rc()

25. Use vundle to manage vundle

Bundle ‘gmarik/vundle‘

26. Enhanced display of Powerline plug-in status bar

Bundle ‘Lokaltog/vim-powerline‘

27. If Vim has a status bar and powerline, two status bars are displayed.

set laststatus=2set t_Co=256let g:Powline_symbols=‘fancy‘

28. Plug-ins must be enabled for vundle Configuration

filetype plugin indent on



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.