Vim configuration file _ vimrc

Source: Internet
Author: User
Applicable in Windows and Linux, no need to change, except for resetting the program path used; applicable in GUI, Console, or terminal, no need to change. Download/view on my site: _vimrc,_vimrc.txt,_vimrc.html http://linxiao.li.googlepages.com/vimhttp://www.leal.cnbefore use

It is applicable in Windows and Linux, and does not need to be changed, except to reset the program path used;
Applicable under GUI, Console, or terminal. no changes are required.

You can download/view on my site: _ vimrc, _vimrc.txt, _vimrc.html
Http://linxiao.li.goOglepages.com/vim
Http://www.leal.cn

You need to download some scripts before use, see _ vimrc or plugin_list.txt,plugin_list.html
Same as above.

View the instructions of vimrc before use.

Good Luck!

Appendix _ vimrc

"============================================== ========================================================== ======
"Description: My daily vimrc with dozens of plugins.
"Originally derived from metaco SM 'shttp: // vi-improved.oRg/vimrc. php
"Last Change: 0 14/05/2006 20:54:07 Leal @ RAINT: _ vimrc
"
"Author: Leal
Http://www.leal.cn
"Version: 1.0065
"
"Usage: 1. Prepare necessary dirs and files
"$ Vimdata x: \ Vim \ vimdata on Win ,~ /Vimdata on Linux
"|
"| -- Temp to put swap files


"| -- Backup to put backup files
"| -- Diary to save calendar. vim's diaries
"| -- GetLatest to save GetLatestVimScripts. vim's
"|
"| '-- GetLatestVimScripts. dat to store GLVS's items
"|
"| -- _ Vim_fav_files to store favmenu. vim's items
"'-- _ Vim_mru_files to store mru. vim's items
"
"2. Get all scripts you favor on www.vim.org better with GLVS
"
"3. Get all needed utilities, especially on Windows, e.g.
"Wget -- WGET for Windows (win32) http://users.ugent. B E /~ Bpuype/wget/
"Ctags -- Exuberant Ctags http://ctags.sf.net/
"
"4. If you have no idea of some option, just press K ( ) On it.
"
"5. HTML file is produced with: TOhtml, with colo default.
"
"============================================== ========================================================== ======

"Begin "-------------------------------------------------------------------------------------
"TODO List
"Begin "-------------------------------------------------------------------------------------
"1. Install Chinese Vim help helplang-> cn

"Begin "-------------------------------------------------------------------------------------
"General
"Begin "-------------------------------------------------------------------------------------
Set nocompatible "use vim as vim, shocould be put at the verystart
Set history = 1000 "lines of Ex-mode commands, search history
Set browsedir = buffer "use directory of the related buffer for filebrowser
Set clipboard + = unnamed "use clipboard register '*' for all y, d, c, p ops
Set viminfo + =! "Make sure it can save viminfo
Set isk + =$, %, #,-"none of these shocould be word dividers
Set confirm "raise a dialog confirm whether to save changedbuffer
Set ffs = unix, dos, mac "favor unix ff, which behaves good under botWinz & Linux
Set fenc = utf-8 "default fileencoding
Set fencs = UTF-8, ucs-bom, euc-jp, gb18030, gbk, gb2312, cp936
Map Q gq
"Don't use Ex-mode, use Q for formatting
Filetype on "enable file type detection
Filetype plugin on "enable loading the plugin for appropriate filetype

"Begin "-------------------------------------------------------------------------------------
"Platform dependent
"Begin "-------------------------------------------------------------------------------------
If has ("win32 ")
Let $ VIMDATA = $ VIM. '/vimdata'
Let $ VIMFILES = $ VIM. '/vimfiles'
Let PYTHON_BIN_PATH = 'd:/foo/python/python.exe '"ensure the pathright
Else
Let $ VIMDATA = $ HOME. '/vimdata'
Let $ VIMFILES = $ HOME. '/. vim'
Let PYTHON_BIN_PATH = '/usr/bin/Python'
Set guifont = courier \ 10
Endif

"Begin "-------------------------------------------------------------------------------------
"Path/backup
"Begin "-------------------------------------------------------------------------------------
Set backup "make backup file and leave it around und
Set backupdir = $ VIMDATA/backup "where to put backup file
Set directory = $ VIMDATA/temp "where to put swap file
Set runtimepath + = $ VIMDATA "add this path to rtp, supportGetLatestVimScripts. vim
Set path =.,/usr/include/*, "where gf, ^ Wf,: find will search
Set tags =./tags, tags, $ VIMRUNTIME/doc/tags, $ VIMFILES/doc/tags "tagsfiles CTRL-] uses
Set makeef = error. err "the errorfile for: make and: grep

"Begin "-------------------------------------------------------------------------------------
"Colors
"Begin "-------------------------------------------------------------------------------------
Set background = dark "use a dark background
Syntax on "syntax highlighting

"Begin "-------------------------------------------------------------------------------------
"Gui-only settings
"Begin "-------------------------------------------------------------------------------------
If has ("gui_running ")
Colo inkpot "colorscheme, inkpot. vim
Set lines = 40 "window tall and wide, only if gui_running,
Set columns = 120 "or vim under console behaves badly
Endif

"Begin "-------------------------------------------------------------------------------------
"Vim UI
"Begin "-------------------------------------------------------------------------------------
Set linespace = 1 "space it out a little more (easier to read)
Set wildmenu "type: h and press To look whathappens
Set rusers "always show current position along the bottom
Set limit height = 2 "use 2 screen lines for command-line
Set lazyredraw "do not redraw while executing macros (muchfaster)
Set nonumber "don't print line number
Set hid "allow to change buffer without saving
Set backspace = 2 "make backspace work normal
Set whichwrap + = <,>, h, l "allow backspace and cursor keys towrap
Set mouse = a "use mouse in all modes
Set shortmess = atI "shorten messages to avoid 'press a key' prompt
Set report = 0 "tell us when anything is changed :...
Set fillchars = vert: \, stl: \, stlnc :\
"Make the splitters between windows be blank

"Begin "-------------------------------------------------------------------------------------
"Visual cues
"Begin "-------------------------------------------------------------------------------------
Set showmatch "show matching paren
Set matchtime = 5 "1/10 second to show the matching paren
Set nohlsearch "do not highlight searched for phrases
Set incsearch "BUT do highlight where the so far typed patternmatches
Set scroloff = 10 "minimal number of screen lines to keepabove/below the cursor
Set novisualbell "use visual bell instead of beeping
Set noerrorbells "do not make noise
Set laststatus = 2 "always show the status line
Set listchars = tab: \ | \, trail:., extends:>, precedes: <, eol: $ "what to show while: set list
Set statusline =%{ VimBuddy ()} \ % F % m % r % h % w \ [% {& ff}] \ [% Y] \ [\ % 03.3b \ % 02.2B] \ [% 02v \ % 03l \ % L \ % p %]

"Begin "-------------------------------------------------------------------------------------
"Text formatting/layout
"Begin "-------------------------------------------------------------------------------------
Set ai "autoindent
Set si "smartindent
Set cindent "do C-style indenting
Set fo = tcrqn "see help (complex)
Set tabstop = 4 "tab spacing (settings below are just to unifyit)
Set softtabstop = 4 "unify
Set shiftwidth = 4 "unify
Set noexpandtab "real tabs please!
Set smarttab "use tabs at the start of a line, spaceselsewhere
Set nowrap "do not wrap lines
Set formatoptions + = mM "so that vim can reformat multibyte text (e.g. Chinese)

"Begin "-------------------------------------------------------------------------------------
"Folding
"Begin "-------------------------------------------------------------------------------------
Set foldenable "turn on folding
Set foldmethod = indent "make folding indent sensitive
Set foldlevel = 100 "don't autofold anything (but I can still foldmanually)
Set foldopen-= search "don't open folds when you search your them
Set foldopen-= undo "don't open folds when you undo stuff

"Begin "-------------------------------------------------------------------------------------
"Plugin-a. vim
"Begin "-------------------------------------------------------------------------------------
"Alternate files quickly (. c -->. h etc)

"Begin "-------------------------------------------------------------------------------------
"Plugin-c. vim
"Begin "-------------------------------------------------------------------------------------
"Set makeprg = g ++ \ %
Let g: C_AuthorName = 'leal'
Let g: C_Email = 'linxiao. li NOSPAM gmail DOT com'

"Begin "-------------------------------------------------------------------------------------
"Plugin-runscript. vim (for Python)
"Begin "-------------------------------------------------------------------------------------
"Let PYTHON_BIN_PATH =...

"Begin "-------------------------------------------------------------------------------------
"Plugin-calendar. vim
"Begin "-------------------------------------------------------------------------------------
Let g: calendar_diary = $ VIMDATA. '/diary' "where to store yourdiary

"Begin "-------------------------------------------------------------------------------------
"Plugin-mru. vim (most recently used files)
"Begin "-------------------------------------------------------------------------------------
Let MRU_File = $ VIMDATA. '/_ vim_mru_files' "which file to save mruentries
Let MRU_Max_Entries = 20 "max mru entries in _ vim_mru_files

"Begin "-------------------------------------------------------------------------------------
"Plugin-favmenu. vim
"Begin "-------------------------------------------------------------------------------------
Let FAV_File = $ VIMDATA. '/_ vim_fav_files' "which file to savefavorite entries

"Begin "-------------------------------------------------------------------------------------
"Plugin-minibufexpl. vim
"Begin "-------------------------------------------------------------------------------------
Let g: miniBufExplTabWrap = 1 "make tabs show complete (no brokenon two lines)
Let g: miniBufExplModSelTarget = 1

"Begin "-------------------------------------------------------------------------------------
"Plugin-taglist. vim
"Begin "-------------------------------------------------------------------------------------
If has ("win32 ")
Let Tlist_Ctags_Cmd = $ VIMFILES. '/ctags.exe' "location of ctagstool
Else
Let Tlist_Ctags_Cmd = '/usr/local/bin/ctags'
Endif

Let Tlist_Sort_Type = "name" "order
Let Tlist_Use_Right_Window = 1 "split to the right side of thescreen
Let Tlist_Compart_Format = 1 "show small meny
Let Tlist_Exist_OnlyWindow = 1 "if you are the last, killyourself
Let Tlist_File_Fold_Auto_Close = 0 "do not close tags for otherfiles
Let Tlist_Enable_Fold_Column = 0 "do not show folding tree

"Begin "-------------------------------------------------------------------------------------
"Plugin-matchit. vim
"Begin "-------------------------------------------------------------------------------------
Let B: match_ignorecase = 1

"Begin "-------------------------------------------------------------------------------------
"Plugin-supertab. vim
"Begin "-------------------------------------------------------------------------------------
" Has been mapped to SuperTab () func in that plugin

"Begin "-------------------------------------------------------------------------------------
"Plugin-timestamp. vim
"Begin "-------------------------------------------------------------------------------------
Let g: timestamp_regexp = '\ v \ C % ( Let g: timestamp_rep = '% w % d/% m/% Y % H: % M: % S # u @ # h: # F'
Augroup TimeStampHtml
Au filetype html let B: timestamp_regexp = '\ v \ C % (\

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.