Your own configuration file

Source: Internet
Author: User

[User]

Name = Yulong Dong

email = [email protected]

[Core]

Editor = Vim

whitespace = trailing-space,space-before-tab,tab-in-indent

[Commit]

Template = ~/.ssh/.gitmsg.template

[Color]

UI = Auto

Status = Auto

Branch = Auto

[Rerere]

Enabled = 0

[Merge]

Tool = Vimdiff

[Alias]

CO = Checkout

BR = Branch-v

St = Status

CI = Commit

Glog = Log--graph

[Format]

Signoff = True





"=========================================================================

"DesCRiption: VIMRC file for your own use, for Ubuntu

"

"Last change:2012 April 20 15:13

"

"version:1.00

"

"=========================================================================


Syntax on"syntax highlighting


Set Cursorline"highlight when moving forward


Set nocompatible"Do not use the VI keyboard mode, but vim your own


Set history=50"Keep 50 lines of command-line history


Set ShowCmd"Show unfinished Commands


Set Hlsearch"Search for verbatim Fugauliang


Set Incsearch"match in Search"


Set number"displays line numbers

"Set Nonu" does not display line numbers


Set autoindent"Auto Indent


Set cindent"C indent


Set smartindent"Smart indent


Set Noet"tab is not a space to write makefile before the Command tab


Set tabstop=4"Hard indent


Set shiftwidth=4"Indent space number


Set Softtabstop=4 "allows you to delete 4 spaces at a time by pressing BACKSPACE


Set ignorecase smartcase "ignores case when searching, but remains case sensitive when one or more uppercase letters are available


Set Showmatch"Show matching brackets


"Set Nowrapscan" prohibits re-searching when searching to both ends of a file


Set Noeb"Remove input error sounds

Set Noerrorbells

Set Novisualbell

Set t_vb=


Set Shortmess=ati"does not display the prompt to aid Somalia children when started


Set clipboard+=unnamedshared clipboard with Windows


Set cmdheight=2"command line height


Set so=7"Rolling mouse wheel, 7 rows at a time


Set Nobackup"does not produce backup files


Set NOWB"Cancel swap Zone


Set Noswapfile"Cancel swap file


ColorScheme Evening"color profile in/usr/share/vim/vim72/colors/directory


"Set default decoding

Set Fenc=utf-8

Set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936


"Shows the line number and column number where the cursor is located on the status line

Set ruler

Set rulerformat=%20 (%2*%<%f%=\%m%r\%3l\%c\%p%%%)


The Code folding feature

"Set foldenable" starts folding

"Set Foldmethod=marker" setting syntax folding

Set foldcolumn=0 Sets the width of the collapsed area

"Setlocal foldlevel=1" sets the number of collapsed layers to

Set Foldclose=all to automatically turn off folding

"Nnoremap <space> @= (foldclosed (Line (')) < 0)? ' Zc ': ' zo ') <CR>


"Look at the Code shortcut key settings

Nmap <F9> <c-w>w "two files to switch between

Nmap <F7> <C-W>< "Shift left

Nmap <F8> <C-W>> "Move right


"Vim shortcut key settings

Nmap:wq<enter>:wq<enter>

Nmap:q<enter>:q<enter>


The file Encoding format

Let&termencoding=&encoding

Set Fileencodings=utf8,gbk,prc,ucs-bom



The status line Color

Highlight Statusline Guifg=slateblue Guibg=yellow

Highlight Statuslinenc Guifg=gray Guibg=white


"Display whitespace between split windows for easy reading

Set Fillchars=vert:\, Stl:\, Stlnc:\


"Show tab key, TAB key is >-, SPACEBAR +

The set list

The Set listchars=trail:+,tab:>-


"How to use Cscope,ctags

"Ctags-r

"MV tags. /

"Cscope-rbq

"MV.. /tags./

"CS Add ~/cscope.out ~/


The Set Tags=/home/dongyl/source/linux-2.6.36/tags

"CS add/home/dongyl/source/linux-2.6.36/cscope.out/home/dongyl/source/linux-2.6.36/


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

The Ctags settings

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

"http://www.vim.org/scripts/script.php?script_id=273

"Whether the current label is highlighted

Let Tlist_auto_highlight_tag = 1


The Auto-open tlist

Let Tlist_auto_open = 0


The Automatic Update tlist

Let Tlist_auto_update = 1


"Whether to automatically close the Label List window after selecting a label or file

Let Tlist_close_on_select = 0


The compression method

Let Tlist_compact_format = 1


"Do you want to replace the signature with a label prototype in the Label List window?

Let Tlist_display_prototype = 0


"Whether the label valid range is displayed after the signature

Let Tlist_display_tag_scope = 1


"Do not show collapsed trees

Let Tlist_enable_fold_column = 1


"Turn off vim and turn off tlist

Let Tlist_exit_onlywindow = 1


"Do not close other tags

Let Tlist_file_fold_auto_close = 0


"1 uses Tlisttoggle to open the Label List window and will receive focus as for the Label List window; 0 TagList Open after focus remains in the code window

Let Tlist_gainfocus_on_toggleopen = 0


"Allow/disallow expansion of Vim window width when displaying the label List window

Let Tlist_inc_winwidth = 1


"F3 Switch tlist

Nmap <F3>:tlist<enter>


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

The buffer setting

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Let G:bufexplorerdefaulthelp=0 "does not show the default help.

Let g:bufexplorershowrelativepath=1 "Show relative paths.

Let's g:bufexplorersortby= ' MRU ' "Sort by the most recently used.

Let's g:bufexplorersplitright=0 "Split left.

Let g:bufexplorersplitvertical=1 "Split vertically.

Let G:bufexplorersplitvertsize = "Split width

Let G:bufexplorerusecurrentwindow=1 ' Open in new window.

Map <C-F8>:bufexplorer<cr>


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

The Winmanager settings

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

"Http://www.vim.org/scripts/script.php?script_id=95

"Set Interface segmentation

Let g:winmanagerwindowlayout = "fileexplorer| TagList "


"Sets the width of the Winmanager, which defaults to 25

Let G:winmanagerwidth = 30


"Define Open Close Winmanager button

Nmap wm:wmtoggle<cr>


"When there is only one window left, exit

Let g:persistentbehaviour=0


"Automatically opens when you enter Vim.

Let G:autoopenwinmanager = 1


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

The Minibuffer settings

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

"Http://www.vim.org/scripts/script.php?script_id=159

"Allow <C-Tab> and <C-S-Tab> to switch

Let G:minibufexplmapctabswitchbufs = 1

Let G:minibufexplmapwindownavvim = 1

Let G:minibufexplmapwindownavarrows = 1

Let G:minibufexplmodseltarget = 1

Let G:minibufexplorermorethanone=0 "Allow Minibuffer to appear only one


Map <C-Tab>:bn<cr> "Toggle buffer, switch right

Map <S-Tab>:bp<cr> "Toggle buffer, switch left


<Tab> forward cycle to each buffer name

<S-Tab> cycle back to each buffer name

<Enter> in the buffer where the cursor is opened

D Delete the buffer where the cursor is located


"The following two features need to be added in the ~/.VIMRC:

"Let G:minibufexplmapctabswitchbufs = 1

<C-Tab> forward cycle to each buffer and open in front window

<C-S-Tab> cycle back to each buffer and open in the front window


"If the following sentence is set in ~/.VIMRC:

Let G:minibufexplmapwindownavvim = 1 can be used <C-h,j,k,l> to switch to the upper and lower left and right window, like:

"C-w,h J K L to" left, bottom, top, right "toggle window.


"Set in ~/.VIMRC:

"Let G:minibufexplmapwindownavarrows = 1 is with <c-arrow key > Switch to the left and right window to go


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" where the cursor is, F, look up the dictionary."

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

function! Mydict ()

Let Expl=system (' Sdcv-n ').

\ expand ("<cword>"))

Windo if

\ expand ("%") = = "Dict-tmp" |

\ q!| endif

25VSP dict-tmp

setlocal buftype=nofile bufhidden=hide Noswapfile

1s/^/\=expl/

1

Endfunction

Nmap f:call mydict () <CR>


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Thecscope settings

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""


If has ("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 Cscope.out

"Else add database pointed to by environment

ElseIf $CSCOPE _db! = ""

CS Add $CSCOPE _db

endif

Set Csverb

" This item is not set, otherwise your cscope search will not be able to open the search File Results window, very depressed

Theset cscopequickfix=s-,c-,d-,i-,t-,e-

Nmap S:cs Find S <c-r>=expand ("<cword>") <CR><CR>

Nmap <C-]>: CS Find G <c-r>=expand ("<cword>") <CR><CR>

Nmap C:cs Find C <c-r>=expand ("<cword>") <CR><CR>

Nmap <c-\>t:cs Find T <c-r>=expand ("<cword>") <CR><CR>

Nmap <c-\>e:cs Find e <c-r>=expand ("<cword>") <CR><CR>

Nmap <c-\>f:cs find F <c-r>=expand ("<cfile>") <CR><CR>

Nmap <c-\>i:cs Find I <c-r>=expand ("<cfile>") <CR><CR>

Nmap <c-\>d:cs Find D <c-r>=expand ("<cword>") <CR><CR>

endif


"0 or S find this C symbol (can skip comments)

"1 or G to find this definition

"2 or D finds functions called by this function

"3 or C finds functions that call this function

"4 or T Find this string

"6 or E find this egrep mode

"7 or F find this file

"8 or I find the file containing this file


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" Use the S-r key to automatically add printing information to your code

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Noremap <S-r>:%s/) \n{/) \r{\r\ #ifdef DEBUG_DYL\R\TPRINTK (\ "[Dongyulong]%s%d%s\\n\", __file__, __line__, __func __); \r\ #endif/g <CR>


Your own configuration file

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.