Andr3wD

Results 9 comments of Andr3wD

I believe this can be done with `historyEventDelay` at https://codemirror.net/doc/manual.html#config and `setOption` part of `CodeMirror.Vim`. I'm offering to implement this, but I'm not sure if it's too out of scope...

Unfortunately `surround` doesn't work with spaces, since spaces are the delimiters for the left and right surround text. I will look into adding `\` to escape the space delimiter.

@luoluorushi since release 0.4.3, the escape character `\` has been added to escape the space delimiter for the surround command. Surrounding text with `TEXT` should now be possible with `:surround...

I'm working on a small command that allows surrounding your selected text in visual mode with characters. See https://github.com/Andr3wD/obsidian-vimrc-support/commit/0636e2772411c4826694d7f900f282659a1f121a if interested. I'll make a PR sometime soon.

I've spent some more time trying to get it to act like [`vim-surround`](https://github.com/tpope/vim-surround), but it seems like CodeMirror.Vim doesn't allow unmapping or overwriting of main actions, such as `y`, `s`,...

I've spent more time looking into custom actions and I was able to recreate one `vim-surround` keybind for adding surrounding text by using the CodeMirror [dialog addon](https://codemirror.net/doc/manual.html#addons). See https://github.com/Andr3wD/obsidian-vimrc-support/commit/bbdde52e75c40dbe75fe6c530e7239c658e03243 for...

I can't seem to get just `` remapped either. This is likely a bug with CodeMirror unfortunately.

Unfortunately, probably yeah. There's a chance a workaround can be added, but I don't know if anyone really wants to deal with intercepting any keys, if that's even possible. At...

I spent some time looking into it and couldn't replicate the problem, but I might have a fix. CM is likely accidentally keeping multiple selections due to a bug somewhere...