Vim. vimrc File Settings

Source: Internet
Author: User
Tags imap

 

Set nocompatible
Set autowrite
Set autoread
Set nobackup
Set noswapfile


"--- Syntax and indent ---
Syntax on
Set tabstop = 4
Set softtabstop = 4
Set shiftwidth = 4
Set autoindent
Set smartindent
Set cindent
Set expandtab
Set nolinebreak
Set showmatch
Set wrap
"--- Editing setting ---
Set backspace = 2 "use backspace key to delete in insert mode

"--- Encoding ---
Set encoding = UTF-8
Set fileencodings = ucs-bom, UTF-8, cp936, gb2312, gb18030, big5, EUC-JP, EUC-KR, Latin1
Set fileencoding = UTF-8
Set termencoding = UTF-8

"--- Fileformat ---
Set FFS = UNIX, DOS, Mac
Set FF = Unix

Colorscheme desert
"Set columns = 120
Set number

"Statusline
Set laststatus = 2
Set statusline = % F \ % m % Y [% {& FF }:%{ & fenc}] % = % 10. (\ % L, % C % v %) \ % 5. (% P %)


Filetype on
Filetype plugin on

Set mouse =

"--- Find and substitute ---
Set incsearch
Set hlsearch
Set ignorecase
Set Sm

"Set colors when column is great than 90
"Set textwidth = 90
"Set wrapmargin = 90
"Au bufwinenter * Let W: M1 = matchadd ('search', '\ % <101v. \ %> 90v',-1)
"Au bufwinenter * Let W: m2 = matchadd ('errormsg ',' \ %> 100v. \ + ',-1)
"Au bufwinleave * Call clearmatches ()

"--- Ctags setting ---
Set Path =.,/usr/include/,/usr/local/include
Map <F11> :! Ctags-r -- C ++-kinds = + p -- fields = + IAS -- extra = + q. <CR>
Set tags + = ~ /. Vim/Tag/CPP
Set tags + = ~ /. Vim/Tag/Google
"--- Tlist setting ---
Let tlist_ctags_cmd = 'ctags'
Let tlist_use_right_window = 0
Let tlist_show_one_file = 1
Let tlist_file_fold_auto_close = 0
Let tlist_exit_onlywindow = 1
Let tlist_process_file_always = 1
Let tlist_winheight = 100
Let tlist_winwidth = 24
Let tlist_inc_winwidth = 0

"--- ACP setting ---
Let G: acp_completeoptpreview = 0

"--- Omni setting ---
"Press F3 to automatically complete the code. Note that the ing statement cannot contain any other characters, including tabs. Otherwise, pressing F3 will automatically complete some garbled characters.
Imap <F3> <C-X> <C-O>
"Press f2 to complete Based on the keyword in the header file
Imap <F2> <C-X> <C-I>
Set completeopt = menu, menuone "turn off the smart full-time preview window
Let omnicpp_maycompletedot = 1 "AutoComplete.
Let omnicpp_maycompletearrow = 1 "AutoComplete with->
Let omnicpp_maycompletescope = 1 "AutoComplete ::
Let omnicpp_selectfirstitem = 2 "select first item (but don't insert)
Let omnicpp_namespacesearch = 2 "Search namespaces in this and stored ded files
Let omnicpp_showprototypeinabbr = 1 "show function prototype in popup window
Let omnicpp_globalscopesearch = 1 "enable the global scope search
Let omnicpp_displaymode = 1 "Class scope completion mode: Always show all members
Let omnicpp_defaultnamespaces = ["STD", "_ glibcxx_std"]
Let omnicpp_showscopeinabbr = 1 "show scope in Abbreviation and remove the last column
Let omnicpp_showaccess = 1

 

"--- Bufexploerr seting ---
Let G: bufexplorerdefaulthelp = 0 "do not show default help.
Let G: bufexplorershowrelativepath = 1 "show relative paths.
Let G: bufpolicersortby = 'mru' "sort by most recently used.
Let G: bufexplorersplitright = 0 "Split left.
Let G: bufpolicersplitvertical = 1 "split vertically.
Let G: bufexplorersplitvertsize = 40 "split width
Let G: bufpolicerusecuritywindow = 1 "open in new window.
Autocmd bufwinenter \ [Buf \ list \] SETl nonumber

"--- Project setting ---
Let G: proj_flags = "imstfst"

"--- Winmanager: wmtoggle ---
Let G: winmanagerwindowlayout = 'fileexplorer, bufexplorer | taglist'
Let G: winmanagerwidth = 30
Let G: defaultexplorer = 0
Nmap wm: wmtoggle <CR>

"--- Protobuf ---
Augroup filetype
Au! Bufread, bufnewfile *. proto setfiletype prototype
Augroup end

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.