Vim configuration of the classic editing tool (with plug-in package)

Source: Internet
Author: User

I have used Vim configuration for 4-5 years. Very good

Configuration File + plug-in package + tag Script:/files/magic-Chen/vim_config.rar

 

First, upload the image:

 

Configuration file:

"""""""""""""""""""""""""""""""""
"Peter. Chen
"""""""""""""""""""""""""""""""""
"=> General options "{{{
Set guifont = dejavu \ Sans \ yuanti \ mono \ 10

"Session
Set sessionoptions-= curdir
Set sessionoptions + = sesdir

"Highlight the current row
Set cursorline
Set nocursorcolumn

"Use incompatible Mode
Set nocompatible

"Set automatic text encoding Recognition
Set fencs = UTF-8, gb18030

"Search options
Set HLS
Set incsearch
"Set IC smartcase

"The entered command is displayed.
Set showcmd

"Number of historical records
Set history = 200

"When the file is modified externally, it is automatically read
Set autoread

"Always start the mouse
Set mouse =

"Set mapleader
Let mapleader = ";"
Let G: mapleader = ";"

"Reload configuration files quickly
Map <leader> S: Source ~ /. Vimrc <CR>
Map <leader> E: E! ~ /. Vimrc <CR>

"When. vimrc is modified, reload it
Autocmd! Bufwritepost vimrc source ~ /. Vimrc

"Automatically jump to the last opened position
Autocmd bufreadpost *
\ If line ("'\" ")> 0 & line ("' \ "") <= line ("$") |
\ Exe "normal! G' \ "" |
\ Endif

"}}}
"=> Colors and fonts "{{{
Set t_co= 256
"Set Vim's true color scheme
"Set background = dark
"Colorscheme wombat
Colorscheme desert

"Syntax highlighting
Syntax on

"Font
"Set GFN = Vera \ Sans \ yuanti \ Mono: H10
"Set GFN = droid \ Sans \ fallback: H10

"Gui
If has ("gui_running ")
Set guioptions-= T
Let psc_style = 'cool'
Endif

"Folding related
Set foldmethod = marker
"}}}
"=> Other UI options "{{{
"Tab indent
Set smarttab
Set tabstop = 4
Set expandtab

"Auto indent
Set smartindent
Set shiftwidth = 4
Set autoindent
Set cindent

"Display row number
Set number

"Show cursor position
Set ruler

"Wild menu
Set wildmenu

"Three rows are left when the upstream and downstream operations are performed.
Set so = 3

"Set backspace
Set backspace = EOL, start, indent

"Backspace and cursor keys wrap
Set whichwrap + = <,>, H, l

"Set magic on
Set magic

"No sound on Errors
Set noerrorbells
Set novisualbell
Set t_vb =

"Matching brackets
Set showmatch

"How many tenths of a second to blink
Set MAT = 2

"Status bar
Set laststatus = 2
Function! Curdir ()
Let curdir = substitute (getcwd (), '/home/Peter ',"~ /"," G ")
Return curdir
Endfunction
Set statusline =\% F % m % R % H \ % W \%< CWD :\%{ curdir () }\%= POS :\% L/% L: % C \ % P % \

"Smart way to move BTW. Windows
Map <c-j> <C-W> J
Map <c-k> <C-W> K
Map <c-h> <C-W> H
Map <c-l> <C-W> L

"Command window size
Set Partition Height = 1
"}}}
"=> Files "{{{
"File encoding
Set fileencodings = ucs-bom, UTF-8, gb2312, GBK, gb18030, big-5, UCS, Latin1

"Start file type plug-in
Filetype on
Filetype plugin on
Filetype indent on

"File type
Set FFS = UNIX, DoS
NMAP <leader> FD: se FF = dos <CR>
NMAP <leader> Fu: se FF = UNIX <CR>

"Do Not Back Up Files
Set nobackup
Set nowritebackup
"}}}
"=> MISC "{{{
"}}}
"=> Plugins "{{{
"Completed automatically
Set completeopt = longest, menu

"For taglist
NMAP <F10>: tlisttoggle <CR>
Let tlist_use_right_window = 1
Let tlist_file_fold_auto_close = 1

NMAP <F9>: nerdtreetoggle <CR>

"Minibufexpl
Let G: minibufexplmapwindownavvim = 1
Let G: minibufexplmapwindownavarrows = 1
Let G: minibufexplmapctabswitchbufs = 1
Let G: minibufexplmodseltarget = 1

NMAP <F4>: minibufexplorer <CR>: uminibufexplorer <CR>

"Supertab

"For autocomplete
"Let G: autocomplpop_notenableatstartup = 1
"NMAP <F10>: autocomplpopenable
"NMAP <C-F10>: autocomplpopdisable

"For echofunc
Set tags + = ~ /. Vim/cmdags
"NMAP <M-F9> :! Ctags -- append = yes-f ~ /. Vim/cmdags -- fields = + ls
"NMAP <C-F9> :! Ctags-r -- fields = + ls
Let G: echofunclangsused = ["C", "CPP", "Java"]
"}}}
"=> Some syntax highlighting for DIY "{{{
"Hi Mark ctermbg = red ctermfg = green
"Syntax region unknown start = '??? 'End = '??? '
"Hi def link unknown mark
"Test Line :??? >... <???
"Match mark '??? '
"}}}
"=> Shortcut key "{{{
"Buffer
Set hidden
NMAP <leader> bn: BN <CR>
NMAP <leader> BP: BP <CR>
NMAP <leader> BB: B # <CR>
NMAP <leader> buffers: buffers <CR>
NMAP <leader> B1: B1 <CR>
NMAP <leader> B2: b2 <CR>
NMAP <leader> B3: B3 <CR>
NMAP <leader> B4: B4 <CR>
NMAP <leader> B5: B5 <CR>
NMAP <leader> B6: B6 <CR>
NMAP <leader> B7: B7 <CR>
NMAP <leader> B8: B8 <CR>
NMAP <leader> B9: B9 <CR>

"NMAP <F3>: vimgrep <cword> **/*. cpp **/*. H <CR>: Copen <CR>
"NMAP <F3> MZ: grep-Rn <cword> **/*. CPP **/*. c **/*. h **/*. java 2>/dev/null <CR>: Copen <CR>
NMAP <F3> MZ: grep-Rn <cword>./2>/dev/null <CR>: Copen <CR>
Set grepformat = % F: % L: % m
"Set grepprg =

"}}}

Set tags = tags;

Set autochdir

 

Dependency:

 

Exuberant-ctags cs.pdf

 

 

Tag generation command:

#! /Bin/bash

Find $1-name "*. H"-o-name "*. c"-o-name "*. cpp"-o-name "*. Java"> files
Csw.bkq-I files
Ctags-R

 

Plug-in: (do not know how to upload attachments)

. Vim

── Autoload
│ ── Csapprox. Vim
── Colors
│ ── 3d3dglasses. Vim
│ ── Adaryn. Vim
│ ── Adrian. Vim
│ ├ ── Aiseered. Vim
│ ── Anotherdark. Vim
│ ── Aqua. Vim
│ ── Astronaut. Vim
│ ── Asu1dark. Vim
│ ── Autumn2.vim
│ ── Autumnleaf. Vim
│ ── Autumn. Vim
│ ── Baycomb. Vim
│ ── Bclear. Vim
│ ── Biogoo. Vim
│ ── Blacksea. Vim
│ ── Bluegreen. Vim
│ ── Borland. Vim
│ ── Breeze. Vim
│ ── Brookstream. Vim
│ ── Buttercream. Vim
│ ── Calmar256_dark.vim
│ ── Calmar256-dark.vim.
│ ── Calmar256_light.vim
│ ── Calmar256-light.vim.
│ ── Camo. Vim
│ ── Candycode. Vim
│ ── Candy. Vim
│ ├ Chelchela_light.vim
│ ── Chocolateliquor. Vim
│ ── Clarity. Vim
│ ── Cleanphp. Vim
│ ── Colorer. Vim
│ ── Dante. Vim
│ ── Darkblue2.vim
│ ── Darkbone. Vim
│ ── Darkslategray. Vim
│ ── Darkspectrum. Vim
│ ── Darkz. Vim
│ ── Dawn. Vim
│ ── Denim. Vim
│ ── Desert256.vim
│ ── Desertex. Vim
│ ── Dusk. Vim
│ ── Dw_blue.vim
│ ── Dw_cyan.vim
│ ── Dw_green.vim
│ ── Dw_orange.vim
│ ── Dw_purple.vim
│ ── Dw_red.vim
│ ── Dw_yellow.vim
│ ├ ── Earendel. Vim
│ ── Eclipse. Vim
│ ├ ── Ekvoli. Vim
│ ── Fine_blue2.vim
│ ── Fine_blue.vim
│ ── Fnaqevan. Vim
│ ── Fog. Vim
│ ── Freya. Vim
│ ── Fruit. Vim
│ ├ ── Fruity. Vim
│ ── Golden. Vim
│ ── Guardian. Vim
│ ── Habilight. Vim
│ ── Herald. Vim
│ ├ ── Impact. Vim
│ ── Inkpot. Vim
│ ── Ironman. Vim
│ ├ ── Jammy. Vim
│ ── Jellybeans. Vim
│ ── Kellys. Vim
│ ── Leo. Vim
│ ── Lettuce. Vim
│ ── Lucius. Vim
│ ── Manxome. Vim
│ ── Marklar. Vim
│ ── Maroloccio. Vim
│ ── Martin_krischik.vim
│ ── Matrix. Vim
│ ── Metaco SM. Vim
│ ── Molokai. Vim
│ ── Moria. Vim
│ ── Moss. Vim
│ ── Motus. Vim
│ ── Mustang. Vim
│ ── Navajo_night.vim
│ ── Navajo-night.vim.
│ ── Navajo. Vim
│ ── Neon. Vim
│ ── Neverness. Vim
│ ── Nightshimmer. Vim
│ ── Night. Vim
│ ── No_quarter.vim
│ ── Northland. Vim
│ ── Nuvola. Vim
│ ── Oceanblack. Vim
│ ── Oceandeep. Vim
│ ── Oceanlight. Vim
│ ── Olive. Vim
│ ── Papayawhip. Vim
│ ── Peaksea. Vim
│ ── Print_bw.vim
│ ── Pyte. Vim
│ ── Railscasts2.vim
│ ── Railscasts. Vim
│ ── Rdark. Vim
│ ── Relaxedgreen. Vim
│ ── Mongohood. Vim
│ ── Roorootwater. Vim
│ ── Satori. Vim
│ ── Sea. Vim
│ ── Settlemyer. Vim
│ ── Sienna. Vim
│ ── Silent. Vim
│ ├ ── Simpleandfriendly. Vim
│ ├ ── Softblue. Vim
│ ── Soso. Vim
│ ── Spring. Vim
│ ── Summerfruit256.vim
│ ── Synic. Vim
│ ── Tabula. Vim
│ ── Tango2.vim
│ ── Tango. Vim
│ ── Taqua. Vim
│ ── Tcsoft. Vim
│ ── Tir_black.vim
│ ── Tolerable. Vim
│ ── Torte. Vim
│ ── Twilight. Vim
│ ── Two2tango. Vim
│ ── VC. Vim
│ ── Vibrantink. Vim
│ ── Vividchalk. Vim
│ ── Vylight. Vim
│ ── Winter. Vim
│ ── Wombat256.vim
│ ── Wombat. Vim
│ ── Wood. Vim
│ ── Wuye. Vim
│ ── Xemacs. Vim
│ ── Xoria256.vim
│ ├ ── Zenburn. Vim
│ ── Zmrok. Vim
── Doc
│ ── Bufpolicer.txt
│ ── Csapprox.txt
│ ── Nerd_tree.txt
│ ── Supertab.txt
│ ── Taglist.txt
│ ── Tags
── Minibufexpl. Vim
── Nerdtree_plugin
│ ── Exec_menuitem.vim
│ ── Fs_menu.vim
── Plugin
│ ── Autoload_cscope.vim
│ ── Bufexplorer. Vim
│ ── Csapprox. Vim
│ ── Echofunc. Vim
│ ── Mark. Vim
│ ├ ── Nerd_tree.vim
│ ── Scrollcolor. Vim
│ ── Supertab. Vim
│ ── Taglist. Vim
── Syntax
│ ── CPP. Vim
│ ── C. Vim
│ ├ ── Ifdef. Vim
│ ── Java. Vim
── Mongoags

6 directories, 166 files

 

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.