Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to remove warnings as comments in vim?

I am using vim9.1 with ale for syntastic checking, and "pylint" and "flake8" are used for Python. In my vim editor, the warnings are displayed as comments after my code, which makes the file hard to read sometimes. I wonder if I can modify the vim configurations to remove these in-line warning comments but keep the warning symbols on the left and warning messages at the bottom.

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

By default, the ALE plugin uses virtual text to show warnings.
See :help virtual-text for more information on this Vim feature.

You can switch it off by adding the following line to your configuration

:let g:ale_virtualtext_cursor=0

This is also described in ALE’s documentation, section How can I disable virtual text appearing at ends of lines.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading