1

I'm using vim 8 with YCM.

When YCM finds an error, a symbol will popup as below:

enter image description here

As you see, there is a symbol before line 26.

The problem is that it will make the whole window move to right a little to get some spaces to show the symbol >>.

My question is if it is possible to avoid this move?

I need this because vim 8 runs based on a kind of async mechanism. So if I type fast, the error symbol will appear and disappear alternately and this gonna make the window sway.

2
  • 2
    Would set signcolumn=yes (or set it to "no") help?
    – B Layer
    Apr 20, 2020 at 8:39
  • @BLayer Yeah, it helps. thanks
    – Yves
    Apr 20, 2020 at 8:42

1 Answer 1

1

Those symbols are displayed in what's called the signcolumn. Fortunately, there's some degree of control over it using the 'signcolumn' setting. Available values will cause the column to be shown:

   "auto"       only when there is a sign to display
   "no"         never
   "yes"        always
   "number"     display signs in the 'number' column. If the number
                column is not present, then behaves like "auto".

The default is "auto" which results in the behavior you're seeing.

Try setting it to "yes" (:set signcolumn=yes) or, if you don't even care to see the symbols, "no". Both will stop transient symbols from making your text jump around.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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