0

I just installed tmux, iTerm2 and Vim. However, when i open Vim i have this bar with arrows on the left side. I don't know if it's there because of Vim or the terminal emulator. Is there a way to remove it?

enter image description here

jjaderberg
  • 3,489
  • 1
  • 14
  • 19
MicroGame
  • 11
  • 1
  • The numbers are there because you enabled set number in your vimrc file. The >> are called signs, and are probably added by some plugin such as Syntastic which you added to your vimrc file. See: How do I debug my vimrc file? – Martin Tournoij Aug 20 '15 at 12:13
  • @Carpetsmoker I also suspected this happened because of some plugin , I have 27 plugins installed right now , is there a way i can just disable it directly instead of debugging the .vimrc file ? – MicroGame Aug 20 '15 at 12:43
  • Do you know which plugin does this? You need to know which plugin does this first, otherwise it's attempting to answer a question without actually knowing the question :-) – Martin Tournoij Aug 20 '15 at 12:56
  • @Carpetsmoker I guess that the only option then is to debug the plugins , but how do i disable a plugin ? – MicroGame Aug 20 '15 at 13:02
  • 1
    Just comment them out one-by-one and see when the problem stops appearing? – Martin Tournoij Aug 20 '15 at 13:03
  • @Carpetsmoker I debugged the .vimrc file and i finally found that the problem was the pathogen plugin , When i comment out the line : "execute pathogen#infect()" , the probem is solved but YouCompleteMe plugin doesn't work . any idea why ? thanks for your help . – MicroGame Aug 20 '15 at 13:45
  • Pathogen is not a plugin, it's what installs all other plugins ;-) I don't want to put you off, but it looks like you don't really know what you're doing at all. Vim is not the easiest editor to learn (although not as hard as some make it out to be, either). It's best to gradually learn Vim, first the basics on how to use the editor (motions, buffers, etc.), and then move on and maybe install one or two plugins as you go along, once you've learned to use those plugins, you can install more plugins... – Martin Tournoij Aug 20 '15 at 13:52
  • 2
    ... Yes, this will take more time, but you will actually understand what you're doing, rather than fumbling around cluelessly :-) – Martin Tournoij Aug 20 '15 at 13:56
  • No, execute pathogen#infect() isn't the problem. That's just what's causing your plugin bundles to be loaded. You need to disable individual plugin bundles to see which one is causing it. If you rename the plugin directory so that it ends with a ~ that will prevent pathogen from loading it. – jamessan Aug 20 '15 at 13:56
  • @jamessan thanks , it worked , and strangely it was YouCompleteMe the cause of the problem . – MicroGame Aug 20 '15 at 14:18
  • @Carpetsmoker Thanks for the advice .I just started reading "Practical Vim" . – MicroGame Aug 20 '15 at 14:21
  • 3
    So… you just installed Vim and you already have 27 plugins? – romainl Aug 20 '15 at 16:01

1 Answers1

2

I see you have found the culprit plugin already, but here's how you could go hunting for it if it happens again.

Before the pathogen#infect() line in your vimrc, first add let g:pathogen_disabled = [] and then for each plugin add a line like call add(g:pathogen_disabled, {plugin-name}). Then remove them or comment them out one by one until the undesirable behavior reappears.

The plugin name corresponds to the folder name in your pathogen bundle folder. To quickly add all the plugins to the disabled list you can do, with your cursor on the line above pathogen#infect()

:read !ls ~/.vim/bundle

This gives you the names of all the plugins that pathogen loads. If your plugins are not in .vim/bundle then adjust the path.

Then do

V'[

to select the lines you just added. Then

:s/.*/call add(g:pathogen_disabled, '\0')

to change each line into a call to add the plugin to the disabled list.

Finally, to answer your actual question, if you have signs and you want to remove them, you can do (see :help signs).

:sign unplace *
jjaderberg
  • 3,489
  • 1
  • 14
  • 19