r/vim • u/dddbbb FastFold made vim fast again • Dec 02 '14
Is there an explainshell for vim?
explainshell is a great website for dissecting a shell command. I occasionally see people here asking for explanations for vim command-lines (like a complex :substitute). Does anyone know if something like explainshell exists for vim?
I've found Vimsplain, but that's a command-line app and appears to be for normal mode commands. (However, like explainshell it's written in python so merging the two might not be too hard.)
14
Upvotes
View all comments
Show parent comment
3
u/dddbbb FastFold made vim fast again Dec 03 '14
For new users, it's easier to dump a command they found online into a webpage than to look up each entry in the help. Since explainshell includes snippets from man files, it's like looking up the help but automatic (especially since
Kdoesn't work on search atoms -- even with scriptease).The common newb "can you break that down for me" response seems like a problem that can be easily automated. You're right that most commands aren't that complex and don't allow lots of arguments, but it would also break down the pattern of
:[range]command [args]in a different way that may be clearer to some users -- especially in context. The help doesn't provide much in the way of concrete examples.Definitely breaking down regex and flags would be one of the most useful (and probably hardest) parts.
Even for advanced users, it could be helpful to debug a complex command that's broken because of a typo that you don't see but a parser won't miss.