Linux. VIMRC Settings!

Source: Internet
Author: User

0. Remember to download vim before the match. Different versions download vim using different commands ubuntu using sudo apt-get install vim

1.VI ~/.VIMRC Open the Vim profile under the current user (only valid for the current user after the modification is completed)

2. The following are some of the parameters that have been written, can be used directly, after the match is very convenient (direct copy Save: wq! on the line).

Set nocompatible "Turn off VI compatibility mode syntax on" Automatic syntax highlighting ColorScheme Molokai "Set color scheme set number" show line numbers set Cursorline "Highlight current line set RU Ler "Open the status bar ruler set shiftwidth=4" Settings << and >> command when moving the width of 4set softtabstop=4 "so that when the backspace bar can be deleted at a time 4 spaces set tabstop=4" set Fixed tab length 4set nobackup "Overwrite files without backing up set Autochdir" automatically switches the current directory to the directory where the current file is located filetype plugin indent on "Open plugin set Backupcopy=yes" setting The behavior when backing up the backup overrides the case when the set ignorecase smartcase "Search is ignored, but remains case sensitive when there is one or more uppercase letters set Nowrapscan" Prohibit re-searching of set incsearch on both ends of a file search " Display search results when searching for content set Hlsearch "search highlighting found text set Noerrorbells" Turn off error message ring set Novisualbell "Turn off use visual ring instead of call set t_vb=" Empty error ring End generation  Code set Showmatch "when inserting parentheses, briefly jump to match the corresponding parentheses set matchtime=2" short jump to match the parentheses time set magic "set magical set hidden" allows the buffer to be toggled when there are unsaved modifications, at which time the modification by vim Responsible for saving set Guioptions-=t "Hide toolbar set guioptions-=m" Hide Menu bar set smartindent "Turn on new row using Smart Auto indent set Backspace=indent,eol,start" not set in Insert State cannot remove carriage return with backspace and delete key set cmdheight=1 "SET command line number to 1set laststatus=2" Display status bar (default = 1, cannot display status bar) set Statusline=\%<%f[% 1*%m%*%n%r%h]%=\%y\%0 (%{& fileformat}\%{&encoding}\%c:%l/%l%) " Set the information displayed in the status line set foldenable "Start collapse set Foldmethod=syntax" Set syntax collapse set foldcolumn=0 "set width of collapsed area setlocal foldlevel=1" Set fold layer to SE T Foldclose=all "is set to automatically turn off folding Nnoremap <space> @= ((foldclosed line ('. ')) < 0)? ' Zc ': ' zo ') <CR> "use SPACEBAR to switch folding

3. When we use VI to open the file again, it is prompt connt not find Molokai. (like this bar, meaning is not found Molokai color, this time we need to download Molokai color on github, put Molokai.vim files in the/usr/share/vim/vim74/colors directory to solve the problem, Some people may be vim72. The version is different. )

Download: Https://github.com/tomasr/molokai/blob/master/colors/molokai.vim

Linux. VIMRC Settings!

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.