Sublime Forum

[CLOSED] Is there similar functions like this?

#1

such as vim :r !ls

  • run cmd/bash and auto print the result into text area

Tried

  • I can’t find builtin command in subl command palette
  • I can’t find similar package in packagecontrol

Does anyone know about the similarities In subl?

Or If I define the script by myself

  • Which functions/Class I need to override by python script for subl ?
0 Likes

#2

Certainly nothing built in does this, although the Arithmetic command lets you programmatically manipulate text. You can also use the subl command line tool to send command output directly, eg: ls | subl -.

2 Likes

#3

Thank you for replying to me so quickly !
subl - is an interesting feature indeed !

1 Like

#4

there’s also https://github.com/STealthy-and-haSTy/SublimeScraps/blob/master/plugins/pipe_text.py which does something similar - can execute the selections and replace them with the results from stdout

1 Like

#5

Thanks, I will try it!

0 Likes