Linux Canopy Edition VIMRC configuration

Source: Internet
Author: User

Linux Canopy Edition VIMRC configuration-v2.version 0, as follows: [Shell]   $cat.VIMRC "=="Author: Roc"Website: Roclinux.cn "Version:2.0"=="VIM support Go language-start" Close file type detection function filetypeif"Close file type plug-in loading feature, file type indent function filetype plugin indentoff"added vim-related configuration path for Go languageSetruntimepath+= $GOROOT/misc/Vim "Reopen file type detection, file type plug-in loading function and file type indent function filetype plugin indent on"VIM supports go language-end" by programming language syntax, the code is color-coded, the term is called syntax highlighting syntax on"Use to set automatic formatting rules" T: According to TextWidth from Stayput line "C: if it is a comment line, the line is wrapped according to TextWidth, and the comment mark" R: Typing enter in insert mode automatically adds a comment mark at the beginning of a new line O: Type O or O in normal mode, the comment mark "Q: Support for formatting annotations with GQ" is automatically added to the beginning of a new line "A: Automatically format a paragraph when adding and removing text" N: When formatting text, intelligently processing numbered lists2: Second line indent (default is first line indent)"1: Do not break the line after single-character words "M: more intelligent word-wrap" m: for Chinese and other multi-characters languages, when stitching two lines, if the end of the line or the beginning of a multi-byte character, the stitching should not be inserted in the middle of the space "L: do not wrap in insert mode" default value is TCQSetformatoptions=tcqmm "Set the line width limit, and the line will be automatically folded"SetTextwidth=80"Show line width limit hint Red line(vim7.4 support only)Setcolorcolumn=81"Show row count indicationSetNumber "does not display invisible charactersSetnolist "Prohibit line break by LEFT ARROW and RIGHT ARROW key" B for backspace "s for space" H for left "L for right"<represents the left arrow key in normal mode.>represents the right arrow key in Normal Mode "[represents the left ARROW key in insert mode"] represents the right ARROW key in insert mode, "null means no line break triggered by the above key" set whichwrap=b,s,h,l,<,>,[,] set whichwrap= """Open the status bar's coordinate informationSetruler "cancels the bottom status bar display.   1 is off, 2 is turned on. SetLaststatus=1"Displays the input commands for easy viewing of the information currently enteredSetshowcmd "Sets the Magic match control, which can be: HMagic to view more detailed help informationSetMagic "Set the number of records for the vim stored history commandSethistory=100"underline the line where the cursor is displayed"SetCursorline "momentarily jumps to the matching opening parenthesis when the closing parenthesis is insertedSetShowmatch "Ignoring case when searching"Setignorecase "Do not highlight the matching parentheses let Loaded_matchparen=1"Do not redraw when macro command is executed;" Once the macro command finishes, redraw it at once to improve performance. SetLazyredraw "Sets the number of spaces for a tabSettabstop=2"When you press the BACKSPACE bar, if there are many spaces in front of it, it will be cleared uniformly"SetSofttabstop=4"Cindent is more intelligent and flexible in the indentation of C syntax," while Shiftwidth is using< and >controls the amount of indentation to be used when making indentation adjustments. The Line wrap Auto indent is indented according to the Shiftwidth value .SetCindent shiftwidth=2"The most basic automatic indentationSetAutoindent shiftwidth=2"A slightly smarter auto indent than autoindentSetSmartindent shiftwidth=2"Converts the new tab to a space. The existing tab is not convertedSetExpandtab "highlighting the string to which the search matchesSethlsearch "In search mode, string matching is performed in real time as the search character is entered," and the first matched string is highlightedSetIncsearch "Set the leading key for a custom accelerator let Mapleader= "," " with a leading key plus B, you can add braces to a single list map<leader>b wbi{<esc>ea}<esc>use the leading key plus W to accelerate file saving instead of: w! Plus enter Nmap<leader>w: w!<cr>"matches lines that have spaces or tabs at the end. (Es:endspace Show)Map<leader>es:/.*\s\+$<cr>"Delete the space at the end of the line or tab(Ed:endspace Delete)Map<leader>ed: S#\s\+$##<cr>"If the line at the beginning of the selected row does not#, add an annotation to the beginning of the selected line # (#a: # Add)Map<leader> #a: S/^\ ([^#]\s*\)/#\1/<cr>if the line at the beginning of the selection has#, remove all # from the beginning of the selected line (#d: # Delete)Map<leader> #d: S/^#\+\ (\s*\)/\1/<cr>"If the line at the beginning of the selected row does not, a comment is added to the beginning of the selected line//(/a:/Add)Map<leader>/a: S/^\ ([^\/\/]\s*\)/\/\/\1/<cr>if the line at the beginning of the selection has, the//is removed from the beginning of the selected line (/d:/delete)Map<leader>/d: S/^\/\/\ (\s*\)/\1/<cr>   [/Shell]

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.