This is interesting—I hadn’t heard of vis or Sam. Thanks for sharing!
I will say that I like to think of myself as a reasonably advanced Vim user, and the substitution commands used for the example wouldn’t have even occurred to me for changes 1 and 2. I would have automatically done it the alternative ways listed. I’m pretty sure those would be faster to type too (they’re fewer keystrokes). Is it really true for most people that “the substitute command is used 90% of the time when using commands”?
I guess my point was not really clear then. I wanted to point out that vim’s “command” mode is not optimal because when you use it, you’ll use the substitute command 90% of the time. This might be more visible if you compare sam to ed or sed, which are not visual editors.
Of course vim’s normal mode is better for the changes I listed, but I wanted to make a point about sam’s commands being more powerful than vim’s commands.
This is the whole point of this post: using vim with sam’s command mode makes it a better editor !
This is interesting—I hadn’t heard of vis or Sam. Thanks for sharing!
I will say that I like to think of myself as a reasonably advanced Vim user, and the substitution commands used for the example wouldn’t have even occurred to me for changes 1 and 2. I would have automatically done it the alternative ways listed. I’m pretty sure those would be faster to type too (they’re fewer keystrokes). Is it really true for most people that “the substitute command is used 90% of the time when using commands”?
I guess my point was not really clear then. I wanted to point out that
vim
’s “command” mode is not optimal because when you use it, you’ll use the substitute command 90% of the time. This might be more visible if you comparesam
toed
orsed
, which are not visual editors.Of course
vim
’s normal mode is better for the changes I listed, but I wanted to make a point aboutsam
’s commands being more powerful thanvim
’s commands.This is the whole point of this post: using
vim
withsam
’s command mode makes it a better editor !