jbrooksuk / Sublime-Evaluate

Selection evaluation in Sublime Text
https://james-brooks.uk
25 stars 6 forks source link

Is it possible to call evaluate command with arguments? #11

Open lolgear opened 6 years ago

lolgear commented 6 years ago

@jbrooksuk Hi!

Something like this:

{
  "keys": [
    "super+ctrl+alt+shift+d"
  ],
  "command": "evaluate",
  "args": {
    "input": "date '+%d.%m.%Y'"
  }
}
weichuliu commented 6 years ago

As suggested by the project name, this is to evaluate something rather than insert something.

Maybe you should search for date insertion package. e.g. https://packagecontrol.io/packages/InsertDate

Or if you really want to use evaluate for this very purpose, you can add a snippet that insert !date '+%d.%m.%Y' then evaluate it maybe

lolgear commented 6 years ago

@weichuliu it sounds fancy.

I don't see any reasons against passing parameters to this command in snippet.