为什么我的vim状态行有一个左红色空格

时间:2017-06-07 06:59:37

标签: vim powerline

我使用vim和power-line插件,但我发现我的vim状态行在左边有一个丑陋的红色空间。谁可以帮我删除红色空间。

enter image description here

1 个答案:

答案 0 :(得分:0)

这可能是因为您正在使用the deprecated(Lokaltog / vim-powerline)版本的电力线,以及在全局范围内使用pip安装的系统范围版本,以便在vim之外使用它。

在这种情况下,电力线docs表示您只需要使用全局电力线版本,因此需要在.vimrc中添加以下行:

let intervalID;
wallsTime = 2000;
wallsToggle = true

function wallsTimerPing(){
    console.log("wallsToggle is: " + wallsToggle);
    
    // The code that determines if the timer should continue should 
    // be in the function that will be called repeatedly.
    if (wallsToggle === true) {
        console.log('Timer has been reset');
    } else  { // <-- If a Boolean isn't true, it must be false. No need to check
        // Clear the interval when you've determined that you need to stop
        clearInterval(intervalID);  
        console.log('Timer is disabled');
    }
    
  // The main code that this function does here
  // along with something that would change wallsToggle to false
  wallsToggle = false;
}

function timerReset() {
   intervalID = setInterval(wallsTimerPing, wallsTime);
}

timerReset();