'vim mouse mode disable on .vimrc

If I set :set mouse-=a to .vimrc, the highlight color will not be seen when I open the file with vim.

how can I set :set mouse-=a automatically when I use the vim editor with the previous feature(color, etc.)?



Solution 1:[1]

The syntax in .vimrc is set mouse=a.

You only use a preceding colon when you are using the command pallet accesed by pressing escape key.

Solution 2:[2]

The correct syntax in .vimrc to enable your mouse's usage is the following:

set mouse=a

It appears, according to your question, that you have added a hyphen character(-) before the equals sign, making it -=, when it should just be an equals sign (=).

Could you please make sure to remove the hyphen and see if it works after that?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Newton Karanu
Solution 2