You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a new feature, and want to get feedback to see if I should keep it in my personal fork, or if it would be accepted to core.
There's a certain consistency in various mappable commands: you can either insert, append or replace.
More specifically, the shell_insert_output, shell_append_output, shell_pipe commands.
The issue here is that while you can prepend or append the output of a shell command, if you wanted to replace your selections with the output of a shell command, you would have to employ hacks:
press d and then prepend — this easily breaks, because in a lot of cases all of your cursors would merge into a single one, so you can no longer replace all of those selections, you only have one
use shell_pipe like ; my-actual-command — while this works, I think it's agreeable that it's a hack.
First of all, most people probably don't know they could use ; like that.
Second of all, the intention is different. If we want to replace selections with the output of a shell command, we never wanted to pipe to begin with, so it's just a workaround for something that should be doable directly.
So, I intend to implement shell_replace_with_output (not sure about the _with there, looking for feedback on naming).
It will replace selections, but won't actually pipe them.
The text was updated successfully, but these errors were encountered:
I'm working on a new feature, and want to get feedback to see if I should keep it in my personal fork, or if it would be accepted to core.
There's a certain consistency in various mappable commands: you can either
insert
,append
orreplace
.More specifically, the
shell_insert_output
,shell_append_output
,shell_pipe
commands.The issue here is that while you can prepend or append the output of a shell command, if you wanted to replace your selections with the output of a shell command, you would have to employ hacks:
d
and then prepend — this easily breaks, because in a lot of cases all of your cursors would merge into a single one, so you can no longer replace all of those selections, you only have oneshell_pipe
like; my-actual-command
— while this works, I think it's agreeable that it's a hack.First of all, most people probably don't know they could use
;
like that.Second of all, the intention is different. If we want to replace selections with the output of a shell command, we never wanted to pipe to begin with, so it's just a workaround for something that should be doable directly.
So, I intend to implement
shell_replace_with_output
(not sure about the_with
there, looking for feedback on naming).It will replace selections, but won't actually pipe them.
The text was updated successfully, but these errors were encountered: