WuTheFWasThat / vimflowy

An open source productivity tool drawing inspiration from workflowy and vim
https://www.wuthejeff.com/vimflowy
MIT License
1.6k stars 111 forks source link

gp = go parent #19

Closed za3k closed 9 years ago

za3k commented 9 years ago

Main thing this is waiting on in a change to the keyboard shortcut system. Currently there's no way to separate the p key in gp for GO_PARENT and the p key for PASTE

WuTheFWasThat commented 9 years ago

good point. slightly tricky, since in general, we don't want to allow hotkey collision. I'll think about it

independently, do you think "go to parent" is a useful operation? I'm not sure I'd use it, really, though it is very natural

za3k commented 9 years ago

It was missing in workflowy and this was one of Paul's complaints--I don't personally use workflowy so I don't have strong opinions.

za3k commented 9 years ago
  1. I don't think allowing hotkey collision is that bad. It's pretty obvious if you screw it up, if you want to check it in software you're welcome to but I think it might be overkill.
  2. It won't affect anything here, in any case. We're basically switching to an independent set of keybindings once they press "g" and until the command is done. Have you looked at how e.g. ratpoison does prefix keymaps? (Very similar to your approach except they can't handle functions, only dictionaries.)
WuTheFWasThat commented 9 years ago

sounds like it is useful.

  1. fair enough - so allowing a key to be multiple things should be fine as long as they're not both used in the same dictionary or whatever - yeah?
  2. I haven't seen it. I agree that it's basically independent in the case of "g". in other cases, it's less so, e.g. d+[motion], c+[motion], dd, cc. it's a bit of an annoying problem (making g/c/d/y all work nicely with the hotkey system)
za3k commented 9 years ago

c/d/y are operators. g isn't, it's just a prefix for some related shortcuts. maybe ping me sometime for my research into vim grammar? I think it's useful for thinking about keystroke processing

WuTheFWasThat commented 9 years ago

https://github.com/WuTheFWasThat/vimflowy/commit/9fc43d899ef3a5f1fc866bff940ec8e2e349b51a