sublime-text-shell-command
sublime-text-shell-command copied to clipboard
the output is added to the end of the file
Say I want to sort these lines:
bb
dd
cc
aa
In Vim it works like this: select the four lines, press "!", type "sort", Enter, and the four selected lines are replaced by the sorted result.
I want to redo this with this plugin. I have this at the moment:
{
"keys": ["ctrl+enter"],
"command": "shell_command",
"args": {
"prompt": "shell command: ",
"region": "stdin",
"target": "point"
}
}
I select the four lines, press Ctrl + Enter, type in "sort", Enter, and the problem is this: the sorted result is appended to the end of the file. What I want: overwrite the selected four unsorted lines. Is it possible? How?
Also getting this behavior, any output echoed by the script is appended to the end of the file, not inserted where the cursor is located.
{
"keys": ["f8"],
"command": "shell_command",
"args": {
"title": "Elapsed Time",
"command": "~/bin/elapsed",
"target": "point"
}
}