Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the output is added to the end of the file #77

Open
jabbalaci opened this issue Mar 15, 2019 · 1 comment
Open

the output is added to the end of the file #77

jabbalaci opened this issue Mar 15, 2019 · 1 comment

Comments

@jabbalaci
Copy link

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?

@ntroutman
Copy link

ntroutman commented Aug 26, 2019

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"
    }
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants