Accepting a count
mawkler opened this issue · 4 comments
It would be nice if I could pass a count value n
to for instance BufSurfBack
that would jump that n
steps back. Calling BufSurfForward
would then bring me back to the buffer that I was in originally.
I tried implementing this myself in my own .vimrc
by calling BufSurfBack
n
times but the problem is that if n > 1
and I call BufSurfForward
it will only jump one buffer forward, which isn't as useful in my opinion.
This behaviour is actually implemented in the Google Chrome plugin Vimium, for jumping between browser tabs. In Vimium the command is called visitPreviousTab
.
In case you have called BufSurfBack
n
times, would it not work if you then for the next BufSurfForward
call also execute it n
times? This would require a little bit of state in your wrapper script to remember whether BufSurfBack
was called with the n
option the last time around.
That could work. Thanks!
Let me know if it works, otherwise, maybe we can improve things on the plugin side.
Closing for now, reopen if it turns out there is need for some functionality at the plugin side.