Vim display chaotic solution under Linux TTY character terminal

Source: Internet
Author: User


A few days ago I was well equipped with vim as a C language development environment, add a few plug-ins, syntax highlighting, font size are changed, in the gvim under the very comfortable, in the graphical interface of the terminal window using Vim is very comfortable, but accidentally found the TTY virtual terminal under the hanging. For example, I write a code: 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5C/14/wKiom1UaMPXTPhkuAAFGjwz6SBg854.jpg "title = "Gvim." JPG "alt=" Wkiom1uampxtphkuaafgjwz6sbg854.jpg "/>


This looks great, the code automatically prompts for anything. Then I save this file and get the character terminal open:


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5C/0E/wKioL1UaMm3znpOIAACAUxDDun0941.jpg "title=" character vim. JPG "alt=" Wkiol1uamm3znpoiaacauxddun0941.jpg "/>


That's it, a few keystrokes are all chaotic characters.

Later after the discovery is VIMRC file setup problem, in the pure character terminal, this black window is the size of 80x25. But I joined this line in the VIMRC,

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5C/0E/wKioL1UaMsmDWR1KAACmb_nGeSg278.jpg "title=" line. jpg " alt= "Wkiol1uamsmdwr1kaacmb_ngesg278.jpg"/>


This line is prepared for the Gvim, the graphical interface window size can be arbitrarily changed, so in the graphical interface to open the terminal window using vim also no problem, but in the character terminal is not able to change the window size, so add this line will cause the display confusion, commented out on the good.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5C/14/wKiom1UaMpWjaTNPAACpIKaVa-Q310.jpg "title=" matches. JPG "alt=" Wkiom1uampwjatnpaacpikava-q310.jpg "/>


But comments out of the words of our gvim window size can not be customized, each time to manually adjust, much trouble, how can not damage the display of the character terminal, but also to make the graphical interface Gvim very good display it.


In fact, we just need to write a file in the home directory. GVIMRC, you can write this one-size-sized configuration to this file, so you don't have to compromise the two worlds.



This article is from the "mirage1993" blog, make sure to keep this source http://mirage1993.blog.51cto.com/2709744/1626772

Vim display chaotic solution under Linux TTY character terminal

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.