VIM Programmer Enhancements

Source: Internet
Author: User
Tags set background

1. Folding

     1.1 folding in six different ways           manual: Define the range of folding spans in a standard vim structure, like the move command     & nbsp;     indent: Collapsed and collapsed hierarchy, corresponding to the indentation of text with SHIFTWIDTH option values           expr: Define folding           syntax with regular expressions: Collapse the program language semantics that correspond to the file            diff: Define folding           marker with two file differences: Specify the collapsed bounds with the file-defined tags      1.2 collapse command            All folding related commands start with "Z" and the usual folding commands are as follows:          za: Recursive toggle collapse State   & nbsp       ZC: Recursive close collapsed state           ZD: Recursive delete collapse           ze: Remove all folds           ZF: Create collapse (only visible lines are counted)            COUNTZF: Create a collapse that contains count rows (only visible rows are counted)           ZM: Set foldlevel options for 0       & nbsp  ZN,ZN: Set (zn) or Reset (zn) foldenable options           zo: Recursive open collapse           za: Toggle a collapsed state           ZC: Close a folding & nbsp         ZD: Delete a collapse           zi: Toggle the value of foldenable option           ZK,ZJ: Move the cursor to the next collapsed place or opposite direction           ZM,ZR: decrements or increments the value of the Foldlevel option           zo: Open a collapse           ZM: Recursively close all collapses           ZR: Recursively open all collapsed      1.3 common folding settings           :set foldcolumn=n   : Set collapse Status column width (left border)           :set foldmethod= (any of six ways): Set folding mode        & nbsp  :set foldlevel=n: Sets the collapsed level of the display, the small remainder equals n will be displayed      1.4 for the collapsed operation is in effect for all content within the collapsed  2. Automatic Smart Indent   : Set Cindent #标准c缩进 to customize the keyword and indent style   3 that trigger indentation. Keyword Incomplete      multiple complement modes
Whole
Line
Current File keywords
•  Dictionary option Keywords
•  Thesaurus option Keywords
Current and included file keywords
tags (as in ctags)
filenames
macros
VIM command line
user-defined
Omni
Spelling Suggestions
Complete Option Keywords
 
In addition to complete all the complements are first pressed ctrl+x then CTRL + the letter representing the completion mode (f complements the full file name)
 
ctrl+n,ctrl+p query Other matches
ctrl+e Cancel Match completion
ctrl+x,ctrl+l Complete Line completion
ctrl+x,ctrl+k keyword completion, keyword files and options need to be defined by themselves
/usr/dict/words (Cygwin on XP)
/usr/share/dict/words (FreeBSD)
• $HOME/.mydict (personal list of dictionary words)
": Set dictionary=~/.mydict" b
Ctrl+x,ctrl+t thesaurus completion, thesaurus files and and options to set yourself
eg: Thesaurus file ~/mymythesaurus
SET Options ": Set Thesaurus=~/.mythesaurus"
A
line in a thesaurus can set up many related words, and the head of any word in the line will match all the other words in that line
.
ctrl+x,ctrl+i current file and current file include file to match, include file has standard C syntax indicated (#include <some.h> #include "some.h"), Vim will find standard header file and user header file according to syntax
ctrl+x,ctrl+] Label match
ctrl+x,ctrl+f file name completion
ctrl+x,ctrl+v vim Command completion
CTRL+X,CTRL+D Macro Complement
 
label
 
 

": Tag/pattern"//Find all tags that match regular expressions

": Ts/pattern"Find all tags that match regular expressions   Syntax Highlighting "Syntax enable"//Open Syntax highlighting "syntax on"//Open Syntax Highlighting ": Set Syntax=sh"//Display file contents in shell script syntax format three options for adjusting colors "Set background ?"" Set ColorScheme? ": Highlight comment"//Highlight Comment compilation quick fix window ": CW", "CN", "CP" "MAKEPRG"//make or compile program name and options "Colder", "CNE Wer "//Now the oldest 10 errors, or the latest 10 errors" Errorformat "//Set the format for matching errors editing a binary file"Vim-b filename" or "Set binary"

Remote editing$ Vim Scp://[email PROTECTED]:122/.VIMRC

Supported Protocols · ftp:and SFTP:(Regular FTP and secure FTP)
SCP:(Secure remote copy over SSH)
http:(File transfer using standard browser protocol)
DAV:(a relatively new but popular proposed open standard for web transfer)
rcp:(Remote copy)

Edit Directory Press D on the catalog item to delete the fileConvert to HTML ": TOhtml"


VIM Programmer Enhancements

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.