Hi AJ, thanks for writing this. I'm looking at switching from vim/tmux to VS Code too. If you could show me how to bind leader + | and leader + - to create vertical and horizontal splits that would be awesome.
Hi Alex, that seems like a handy binding :). At first I thought the easiest way to handle that would be inside ~/.vimrc, coupled with the "Use key mappings from .vimrc" setting. That worked for split but not vsplit in my setup. That could be an issue just on my end, I've messed with my settings a bunch since this post!
That said, handling it from the VS Code side worked fine for me. The VSCodeVim extension lets you define mode-level overrides, so a block like this in your settings.json should do the trick:
Hi AJ, thanks for writing this. I'm looking at switching from vim/tmux to VS Code too. If you could show me how to bind leader + | and leader + - to create vertical and horizontal splits that would be awesome.
Hi Alex, that seems like a handy binding :). At first I thought the easiest way to handle that would be inside
~/.vimrc
, coupled with the "Use key mappings from .vimrc" setting. That worked for split but not vsplit in my setup. That could be an issue just on my end, I've messed with my settings a bunch since this post!That said, handling it from the VS Code side worked fine for me. The VSCodeVim extension lets you define mode-level overrides, so a block like this in your settings.json should do the trick: