How to configure vim in cygwin:
1) enter the cygwin environment and execute the following command to copy the vim configuration file.
$ Cp/usr/share/vim/vim71/vimrc_example.vim ~ /. Vimrc
2) Modify. vimrc
$ Cd ~
$ Vi. vimrc
3) I am used to the following Configuration:
Set nu display row number
Set ts = 4 the position where the tab generated by pressing the tab key occupies 4 characters
4) Save and exit. Restart cygwin.
Other vi configurations:
Vi also has many personalized configurations that can be added to. vimrc for your convenience.
Below is a basic configuration
Set fenc = UTF-8 \ "set Default Decoding
Set fencs = UTF-8, usc-bom, euc-jp, gb18030, gbk, gb2312, cp936
Set nocp \ "or set nocompatible is used to disable the compatibility mode of VI.
Set number \ "display row number
Set ai \ "or set autoindent vim uses automatic alignment to apply the alignment format of the current row to the next row.
Set si \ "or set smartindent intelligently selects alignment mode based on the above alignment format
Set tabstop = 4 \ "set the tab key to 4 spaces
Set sw = 4 \ "or set shiftwidth is set to use four spaces when lines are staggered
Set ruler \ "sets the status line at the cursor position in the lower right corner during editing.
Set incsearch \ "to set incremental search. This query is smart.
Set showmatch \ "highlight matching parentheses
Set matchtime = 5 \ "matching bracket highlighting time (unit: 1/10 s) set ignorecase \" Case Insensitive during search
Syntax on \ "highlight syntax
Cygwin Chinese display method.
1. Edit ~ /. Inputrc, add the following settings:
Set meta-flag on
Set input-meta on
Set convert-meta off
Set output-meta on
2. Edit ~ /. Bash_profile, add the following settings:
Alias ls = \ 'ls -- show-control-chars \'