My Vim plugin

Source: Internet
Author: User

Record the following my vim plug-ins

1. ctags

Use the ctags-R command

2. cscope

Not used yet

3. toglist

4. winmanager

5. Pathogen

6. nerdtree

 

Appendix:

My. vimrc

"
"My Vim Configuration
"
"Disable compatible
Set nocompatible
"Enable syntax highlighting
Syntax on
"Set automatic text encoding Recognition
Set fencs = GBK, UTF-8, ucs-bom, gb18030, gb2312, cp936
"Use the mouse
Set mouse =
"Set highlight search
Set hlsearch
"The matching point is displayed after the input string is entered.
Set incsearch
"The entered command is displayed, which is clear.
Set showcmd

Set background = dark

Set history = 900 "900 historical records
Filetype plugin indent on "open file type detection
Set completeopt = longest, menu "Close the smart full-time preview window
"Color Scheme
Colorscheme desert "Desert Color Scheme

"Interface settings.
Set ruler "to display the current location
Set number "display row number
"Set nonumber" does not display row numbers

"Format settings.
Set autoindent "auto indent
Set smartindent "smart indent
Set cindent "C indent
Set tabstop = 4 "Hard Tab
Set softtabstop = 4 "soft Tab
Set shiftwidth = 4 "Number of indented Spaces
Set expandtab "Space replacement Tab
"Set smarttab" smart Tab

Set tags = tags; "ctags
Set autochdir "ctags

"Taglist"
Let tlist_show_one_file = 1
Let tlist_exit_onlywindow = 1
Let tlist_use_left_window = 1

"Bufexplorer"
Let G: bufexplorerdefaulthelp = 0
Let G: bufexplorershowrelativepath = 1
Let G: bufpolicersortby = 'mru'
Let G: bufexplorersplitright = 0
Let G: bufpolicersplitvertical = 1
Let G: bufexplorersplitvertsize = 30
Autocmd bufwinenter/[Buf/LIST/] SETl nonumber

"Winmanager setting"
Let G: winmanagerwindowlayout = "fileexplorer, bufexplorer | taglist"
Let G: winmanagerwidth = 30
Let G: defaultexplorer = 0
Map <span style = "color: #00ff00;"> <F12> </span>: wmtoggle <CR>
Imap <span style = "color: #00ff00;"> <F12> </span> <ESC> <F12>
NMAP <C-W> <C-F>: firstexplorerwindow <CR>
NMAP <C-W> <C-B>: bottomexplorerwindow <CR>
NMAP <silent> <leader> WM: wmtoggle <CR>
NMAP <silent> <leader> Wu: wa <CR>: tlistupdate <CR>: firstexplorerwindow <CR>

"Lookupfile setting"
Let G: lookupfile_minpatlength = 2
Let G: lookupfile_preservelastpattern = 0
Let G: lookupfile_preservepatternhistory = 1
Let G: lookupfile_alwaysacceptfirst = 1
Let G: lookupfile_allownewfiles = 0
If filereadable ("./filenametags ")
Let G: lookupfile_tagexpr = '"./filenametags "'
Endif
NMAP <silent> <leader> LK: lutags <CR>
NMAP <silent> <leader> LL: lubufs <CR>
NMAP <silent> <leader> LW: luwalk <CR>

"Cscope setting"
Set cscopequickfix = s-, C-, D-, I-, T-, e-
NMAP <F6> S: CS find S <C-R> = expand ("<cword>") <CR>
NMAP <F6> G: CS find G <C-R> = expand ("<cword>") <CR>
NMAP <F6> C: CS find C <C-R> = expand ("<cword>") <CR>
NMAP <F6> T: CS find t <C-R> = expand ("<cword>") <CR>
NMAP <F6> E: CS find e <C-R> = expand ("<cword>") <CR>
NMAP <F6> F: CS find F <C-R> = expand ("<cfile>") <CR>
NMAP <F6> I: CS find I ^ <C-R> = expand ("<cfile>") <CR >$ <CR>
NMAP <F6> D: CS find d <C-R> = expand ("<cword>") <CR>

"Code folding
Set foldmethod = syntax
Set foldlevel = 100 "do not automatically collapse the code when starting Vim

"Supertab
Let G: supertabretaincompletiontype = 2
Let G: supertabdefacomplecompletiontype = "<C-X> <C-O>"

"Ctags_highlighting
Let B: typesfilerecurse = 1
Let B: typesfiledonotgeneratetags = 1
Let B: typesfile1_delocals = 1
"Let B: typesfile=desynmatches = 1
"Let B: typesfilelanguages = ['C']

"FN shortcut
"F5-lookupfile, F6-cscope
Nnoremap <silent> <F7>: wmtoggle <CR> "(Note that there must be an empty location before the colon)
Nnoremap <silent> <F8>: A <CR>
Set nocompatible

"Pathogen
Call pathogen # infect ()
Call pathogen # helptags ()

"Set nerdtree
Map <F3>: nerdtreemirror <CR>
Map <F3>: nerdtreetoggle <CR>

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.