I'm new to Vim, sorry for this newbie question. I'm using a vim plugin vim-indent-guides
The default mapping to toggle the plugin is <leader>ig
. What modification should be made to make it toggled on when vim-started
Sounds like something the plugin might support in its configuration. Vim plugins are generally configured by putting something like
let g:global_variable_for_plugin = 1
in your ~/.vimrc
.
Lo and behold, from the vim-indent-guides documentation:
Use this option to control whether the plugin is enabled on Vim startup.
Default: 0. Values: 0 or 1.
>
let g:indent_guides_enable_on_vim_startup = 0
<
What you need is to run the following command at vim startup
:IndentGuidesEnable
One of the ways is to add an autocommand to your .vimrc like
au VimEnter * IndentGuidesEnable
There are probably other ways but this looks pretty simple for me.
I have no idea why that plugin is not enabled by default but the
IndentGuidesEnable
command seems to do just that. Add it somewhere in your ~/.vimrc
.
More generally, mappings are just convenient shortcuts for commands or sequences of commands. You want to execute the command, not the mapping.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With