Feature Request: Support for autocmd commands in .obsidian.vimrc
#274
golovanevsky
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
Currently, settings defined in
.obsidian.vimrconly apply to the first buffer opened. When switching to a new file or pane, Vim settings liketextwidthare not reapplied, which means they revert to their defaults.For example, if I add this to my vimrc:
It works fine in the first file I open, but when I switch to another file,
textwidthbecomes undefined again, andgqformatting commands use the default width of 78 instead of 110.Proposed Solution
Add support for
autocmdcommands in the vimrc file, similar to standard Vim. This would allow users to run commands automatically when certain events occur, such as opening a file or switching buffers.Example use case:
This would automatically set
textwidth=110every time a buffer is entered (file is opened or switched to). This might be useful for other commands as well.Beta Was this translation helpful? Give feedback.
All reactions