Enhanced Python color in Vim

Source: Internet
Author: User
Tags python script

I used to use putty with Unix server to open screen, and then use Vim to write Python. This recording improves the color of Python.

Activating 256-Color terminal

First, increase the available color to 256 colors, make sure Putty is the new version (old version Putty does not support 256 colors). Then, "let vim, screen support 256 colors" to set screen and Vim, remember to use the text mentioned in the Colortest test whether there are 256 colors, success, the numbers 0 ~ 15 for the original 16 colors, 16 ~ 231 for the new color (6 X 6 x 6), 232 ~ 255 for new gray color. You can see the numbers and colors with colortest.

Here to forget the steps mentioned in this article:

    • Join in ~/.VIMRC:
      1
      Set t_co=256
    • Join in ~/.SCREENRC:
      1
      Termcapinfo xterm ' CO#256:AB=\E[48;5;%DM:AF=\E[38;5;%DM '
Update the format of the Python script detector

Update the Syntax/python.vim to let vim detect more of the formats, such as the end of the line, or blank lines with spaces will be detected. The procedure is as follows:

    1. Download the latest Python.vim and put it under ~/.vim/syntax/.
    2. Edit ~/.VIMRC, join
      1
      Let Python_highlight_all = 1

      To show all python.vim in the form of a reconnaissance. Take a look at the Python.vim and learn about the details.

Replace the color that is displayed
    1. Download the Vim color Scheme:Wombat256.vim and put it under ~/.vim/colors/.
    2. Join in ~/.VIMRC
      1
      ColorScheme wombat256

So there is a beautiful color, wombat256 screenshot see here.

Registration

This website offers many different color scheme screenshot, but it does not have Python screenshot.

Original: https://www.cnblogs.com/lexus/archive/2012/03/11/2390414.html

Enhanced Python color in Vim

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.