How to configure vim and display Chinese Characters in cygwin

Source: Internet
Author: User

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 \'

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.