GermainZ / weechat-vimode

A WeeChat script that adds vi-like modes, commands and keybindings.
GNU General Public License v3.0
266 stars 28 forks source link

Feature request: Leader mode #74

Closed Aerex closed 4 years ago

Aerex commented 5 years ago

I would like to see if I can integrate this myself. I really like this plugin.

Is it possible to integrate something like a leader mode (e.g /). The reason why I asked is because I would like to be able to cycle through my buflist such as going to the top of the buflist using a command like <leader>gg and keep gg for going to the top of a current buffer. Another example would be to use <leader>M to go the middle of the buflist and have M go the the middle of the current buffer.

GermainZ commented 5 years ago

/ is reserved for searching, but \ (or similar, e.g. ') can be used with :nmap.

For example, :nmap \gg /buffer 1 will make \gg go to the first buffer, while preserving the behavior of gg.

There is no <leader> variable in vimode.py. I feel like that's not very useful for vimode.py's scope, but perhaps I'm missing something so I'm open to the idea if there's demand.