3

I am looking for a key mapping hint plugin, which has a similar functionality to the spacemacs' space key. Here is a window that displays the key mappings after pressing a spacebar:

enter image description here

... and when I press g, I can access git functions:

enter image description here

... then, pressing S would close the hint window and stage the file.

It is great, because I can learn key mappings of plugins very easily, without reading the docs. Needless to say, it is impossible to remember all those bindings for longer time, even those defined by myself in vimrc.

Is there a plugin with similar functionality, where pressing a leader key would open such window, awaiting for further user input?

It would be still great if it only accepted custom bindings from a config, so I can read the docs once, create bindings, add some labels with info for each entry, and forget about the details.

  • 2
    I've never seen this but you could try to create one by parsing the output of :map. Also if I may give an unsolicited opinion: Needless to say, it is impossible to remember all those bindings for longer time, even those defined by myself in vimrc. I think that you should define your mappings by yourself and by small steps: first define 2 or 3 mappings use them for a while, when they are in your muscle memory add some more and do it again... Plugins which defines mappings for you are not a good thing because they prevent you from learning Vim. (But that's just my opinion) – statox Jul 22 '16 at 9:37
  • 2
    I agree with @statox here. While having a nano-like help is useful, you will find eventually that you may learn more if you have to remember the mapping (and make them muscle memory). I think it's worth the work to be fluent in Vim. Otherwise have a look at unite-mapping which let you search through mapping, it's not the same but may be useful :) – nobe4 Jul 22 '16 at 9:41
  • I have been hearing about spacemacs since I started suing Vim but never knew what it does till now. It looks really good. And coming to your question, I don't think there is any such hinting plugins. At-least I have not seen anyone use it or mention it. But, if you want to see the mappings available you can use map. Its not that visually appealing but it shows you the full list. Similarly, imap for Insert mode mappings, nmap for Normal mode mappings and so on. – Durga Swaroop Jul 22 '16 at 9:42
  • 1
    Thank you for tips. The requested functionality doesn't make the muscle memory redundant, but it helps at training. If the bindings become well-trained, one could type <space>gS so fast the window wouldn't even pop, staging the file immediately. It also makes such rare functions like toggle spell checking with dictionary a breeze, where muscle memory doesn't reach. – jligeza Jul 22 '16 at 9:56
  • In that case you can trying to set your own mapping by hand. e.g. in my config I have <leader>gs for :Gstatus, <leader>gp for :Gpush, ... I tend to recommend not going with an existing full mapping, but to create yours over time. Anyhow, the screen does looks good for sure and it sure help during training. – nobe4 Jul 22 '16 at 10:07
0

SpaceVim provides such functionality, but bundled with other things. Maybe it would be possible to cherrypick that plugin, or just use the entire bundle.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.