MY $ MYVIMRC, mymyvimrc

Source: Internet
Author: User

MY $ MYVIMRC, mymyvimrc

Set nocompatible
Source $ VIMRUNTIME/vimrc_example.vim
"Source $ VIMRUNTIME/mswin. vim
"Behave mswin
Let $ LANG = 'en' "set message language
Set langmenu = en "set menu's language of gvim. no space beside '='


"Syntax highlighting
Set syntax = on
"Confirmation pops up when processing unsaved or read-only files
Set confirm
"Auto indent
"Set autoindent
Set cindent
"Automatic line feed
Set wrap
"Line feed
Set linebreak
"Tab key width
Set tabstop = 4
"Unified indent to 2
Set softtabstop = 4
Set shiftwidth = 4
"Use a tab at the beginning of a row and segment
Set smarttab
"Display row number
Set number
"Number of historical records
Set history = 100
"Do not generate temporary files
Set nobackup
Set noswapfile
"Search for highlighted characters by character
Set hlsearch
Set incsearch
"Intra-row replacement
Set gdefault
"Set the font.
"Set guifont = Liberation \ Mono \ 12
"Always show status line
Set laststatus = 2
"The status line at the cursor position is displayed in the lower right corner during editing.
Set ruler
"File type detection
Filetype on
"Load file type plug-in
Filetype plugin on
"Load indent files for a specific file type
Filetype indent on
"Save global variables
Set viminfo + =!
"Do not separate words with the following symbols by line breaks
Set iskeyword + =_, $, @, % ,#,-
"Number of pixel rows inserted between characters
Set linespace = 0
"The command line in enhanced mode automatically completes the operation
Set wildmenu
"Enable backspace to process indent, eol, start, and so on.
Set backspace = 2
"Allow backspace and cursor keys to span row boundaries
Set whichwrap + = <,>, h, l
"You can use the mouse anywhere in the buffer (similar to double-click the mouse in the workspace in office to locate the location)
Set mouse =
Set selection = exclusive
Set selectmode = mouse, key
"The commands command tells us which row of the file has been changed.
Set report = 0
"The prompt for assistance to children in Somalia is not displayed at startup.
Set shortmess = atI

Colorscheme desert
"White space is displayed between Split windows for ease of reading
Set fillchars = vert: \, stl: \, stlnc :\
"Highlight matching brackets
Set showmatch
"Matching the time when brackets are highlighted (unit: 10 seconds)
Set matchtime = 5
"Move the cursor to the top and bottom of the buffer to keep the distance between three rows
Set scroloff = 3
"Provides automatic indentation for C Programs
Set smartindent
"Highlight common txt files (txt. vim script is required)
Au BufRead, BufNewFile * setfiletype txt
"Use the Space key to switch and collapse
Set foldenable
Set foldmethod = manual

 

"Vim tag configuration begin """"""""""""""" """""""
"Display the order of tabs to switch tabs. to switch to a tab numbered 3, press 3gt.
If exists ("+ showtabline ")
Function! MyTabLine ()
Let s =''
Let t = tabpagenr ()
Let I = 1
While I <= tabpagenr ('$ ')
Let buflist = tabpagebuflist (I)
Let winnr = tabpagewinnr (I)
Let s. = '%'. I. 'T'
Let s. = (I = t? '% 1 *': '% 2 *')
Let s. =''
Let s. = I .')'
Let s. = '% *'
Let s. = (I = t? '% # TabLineSel #': '% # TabLine #')
Let file = bufname (buflist [winnr-1])
Let file = fnamemodify (file, ': p: t ')
If file =''
Let file = '[NEW]'
Else
Let m = 0 "& modified counter
Let bc = len (tabpagebuflist (I) "counter to avoid last''
"Loop through each buffer in a tab
For B in tabpagebuflist (I)
"Check and ++ tab's & modified count
If getbufvar (B, "& modified ")
Let m + = 1
Break
Endif
Endfor
"Add modified label + where n pages in tab are modified
If m> 0
Let file = '+'. file
Endif
Endif
Let s. = ''. file .''
Let I = I + 1
Endwhile
Let s. = '% T % # TabLineFill # % ='
Let s. = (tabpagenr ('$')> 1? '% 999xx': 'X ')
Return s
Endfunction
Set bandwidth = 2
Set tabline = %! MyTabLine ()
Endif
"Vim label configuration end """"""""""""""" """""""

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.