Vim configuration Information VIMRC

Source: Internet
Author: User

The VIMRC file is a VIM environment settings file.

The overall vim setting is in the/ETC/VIMRC file.

Modifying the/ETC/VIMRC file is not recommended, and each user can set up vim in the user's root directory and create a new ~/.VIMRC.

My VIMRC configuration is as follows (continuous update):


if v:lang =~  "utf8$"  | |  v:lang =~  "utf-8$"    set fileencodings=ucs-bom,utf-8,latin1endifset  Nocompatible " Use Vim defaults  (much better!) Set bs=indent,eol,start " allow backspacing over everything in insert  Mode "Set ai"  always set autoindenting on "Set backup"  keep a  backup fileset viminfo= ' 20,\ '  read/write a .viminfo file, don ' t  Store more " than 50 lines of registersset history=50"  keep 50  lines of command line historyset ruler " show the cursor  Position all the time " only do this part when compiled with  support for autocommandsif has ("Autocmd")   augroup redhat   autocmd!   " in text files, always limit the width of text to 78  characters   " autocmd BufRead *.txt set tw=78  "  When  editing a file, always jump to the last cursor position   autocmd bufreadpost *  \ if line ("' \" ")  > 0 &&  line  ("' \" ")  <= line (" $ ")  |  \   exe " normal!  G ' \ ""  |  \ endif   " don ' t write swapfile on most  commonly used directories for nfs mounts or usb sticks   autocmd bufnewfile,bufreadpre /media/*,/run/media/*,/mnt/* set directory=~/tmp,/var/tmp,/ tmp   " start with spec file template  autocmd bufnewfile  *.spec 0r /usr/shAre/vim/vimfiles/template.spec  augroup endendifif has ("Cscope")  &&  Filereadable ("/usr/bin/cscope")    set csprg=/usr/bin/cscope   set csto =0   set cst   set nocsverb    " add any  Database in current directory   if filereadable ("Cscope.out")        cs add  $PWD/cscope.out    " else add database  pointed to by environment   elseif  $CSCOPE _db !=  ""        cs add  $CSCOPE _db   endif   set  Csverbendif " switch syntax highlighting on, when the terminal has  colors " Also switch on highlighting the last used search  pattern.if &t_co  > 2 | |  has ("gui_running")   syntax on  set hlsearchendif " filetype  plugin onfiletype plugin indent on   (more in Python syntax, the keyword is automatically indented) if &term== " Xterm "     set t_Co=8     set t_Sb=m      set t_sf=mendif " don ' t wake up system with blinking  cursor: "&NBSP;HTTP://WWW.LINUXPOWERTOP.ORG/KNOWN.PHPLET&NBSP;&AMP;GUICURSOR&NBSP;=&NBSP;&AMP;GUICURSOR&NBSP;   ", A:blinkon0"


This article is from the creator think blog, so be sure to keep this source http://strongit.blog.51cto.com/10020534/1861586

Vim configuration Information VIMRC

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.