2

Vim 8.1 add a new :Termdebug command with a really good gdb integration. If the mouse option is set, there is also a visual bar appearing on vim. Here is an extract of the man:

If 'mouse' is set the plugin adds a window toolbar with these entries:
  Step          :Step 
  Next          :Over
  Finish        :Finish
  Cont          :Continue
  Stop          :Stop
  Eval          :Evaluate
This way you can use the mouse to perform the most common commands.  
You need to have the 'mouse' option set to enable mouse clicks.
                                                               :Winbar
You can add the window toolbar in other windows you open with: 
  :Winbar

My problem is, I would like to keep the mouse option on my configuration, but I would like to hide this bar, either at run-time with a command or preferably from the beginning in the vimrc. Is it possible to do so and how ?

1

Don't know about hiding it from the start, but what works to remove it after it was added is the following:

:aunmenu WinBar

I had one time where this did not work for some reason, but I cannot pinpoint the reason.

Note: It only works if you execute it in the window that has the toolbar

Note2: If you have other element in the window toolbar, those will get removed too. If you don't want this, you should explictly specify which elements to remove:

:aunmenu WinBar.Next
:aunmenu WinBar.Step

etc..

1

It doesn't look like this was made to be configurable unfortunately. This is from the plugin itself:

if has('menu') && &mouse != ''
    call s:InstallWinbar()

I think your only options are to

  1. Make your own command that will quickly turn mouse off and then back on again
  2. Comment out these two lines located in: .../Vim/vim##/pack/dist/opt/termdebug/plugin/termdebug.vim

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.