search

Home  >  Q&A  >  body text

vim color configuration is invalid and all is white

This is my color file, I added lucius.vim to it,

This is the color elflord that comes with vim, which displays normally

After changing line 66 to lucius and saving, the text is all white when reopened

How to solve it?

我想大声告诉你我想大声告诉你2774 days ago1310

reply all(5)I'll reply

  • 某草草

    某草草2017-05-16 16:39:06

    You should not put customized color files in the system shared directory (/usr/share/vim/vim74/colors/). If you insist on putting them in this directory, I estimate that you need to log out and log in again before vim can Ability to read newly added color profiles.

    Recommendation:

    Looking at your vimrc, you are already using Vundle to manage the plug-in, so just use Vundle to download the color configuration file for you.

    Plugin 'jonathanfilip/vim-lucius'

    Then execute:

    :PluginInstall

    In this way, after restarting vim, the new configuration file will take effect without logging out again.

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-16 16:39:06

    I have encountered the same problem. Just put colorscheme in the last line of .vimrc. I don’t know the specific reason. I guess it may be related to the order in which color files are loaded.
    You can also try this.

    reply
    0
  • PHP中文网

    PHP中文网2017-05-16 16:39:06

    ubuntu system

    List items

    1. sudo apt-get uninstall vim

    2. sudo apt-get install vim-gtk

    3. To report an error in step 2, just enter something like

        sudo apt-get install vim-gui-common=2:7.4.488-3ubuntu2
        等

    reply
    0
  • 阿神

    阿神2017-05-16 16:39:06

    Not every color scheme is suitable for use in terminal. This seems to only have an effect in the GUI.

    reply
    0
  • ringa_lee

    ringa_lee2017-05-16 16:39:06

    Your color configuration may only display properly in the gui.

    You can try it on your vimrc文件里加入(或者打开你的第61行注释):
    set t_Co=256

    It may not work, just give it a try. I paid attention to your terminal. I don’t know if your terminal supports 256 colors. Please try typing in your terminal first:
    tput colors
    Look at the return value

    reply
    0
  • Cancelreply