Should questions about bash's vi mode (or readline in general) be on-topic?
4 Answers
No:
- It's not an editor
- It's not "compatible" with vi; it only implements a (very) small subset.
Also see: What is considered to be vi?.
We should focus the site on vi-editors, bringing in the entire kittenkaboodle that has keybinds vaguely reminiscent of vi and we'll basically be superuser or unix.se
-
-
1
Yes, readline
and zle
are both stand alone special purpose text editors. Their special purpose is line editting
.
This falls in scope of the guidelines proposed here: https://vi.stackexchange.com/help/on-topic
-
1I'm inclined to agree. When I wrote the top-posted answer on this question the site was very new, and restricting the scope was a good idea (it's easy to expand a scope later on, not so easy to narrow it). I think expanding it to vi-mode in shells probably makes sense now that the site is more firmly established, and there is probably a significant overlap in expertise. Jun 1, 2019 at 2:04
-
1I think expanding the scope for this is something that's probably best done with another meta question. I've been intending to write an answer to this one for a while, proposing just that (although I don't think that vi-like shortcuts in browsers should be on-topic). I just haven't found the time yet :-( Jun 1, 2019 at 2:04
I my opinion we should not allow questions about Vi mode in Bash (or other programs). Bash is not Vi(m). And a lot of programs do have some kind of Vi(m) mode. If we allow questions about Vi mode in bash, we should also allow questions about those programs.
While my initial impression is to agree that this should be a "no", I also can't imagine that the subset of "all possible readline vi-mode" questions would be large enough to detract from this site in any way.
After thinking about it more (this was a complete reversal in an edit; if you read my answer before, yes, I'm indecisive) I think that these questions should be on topic — or at least should be considered on an individual basis. Having more questions about "vim-like" programs and plugins will only make this a richer community, and a more helpful niche of the internet.
set -o vi
will make bash’s readline behave similarly to vi—effectively, you can hit escape and move around to edit your command using vi commands.