SendCode icon indicating copy to clipboard operation
SendCode copied to clipboard

Keymap for sending all file content

Open neronmoon opened this issue 6 years ago • 3 comments

Thx for great project! I'd like to have an option to send all file to repl. Now i have to select all source, and than tap cmd+enter, instead of for example just cmd+shift+enter That would be very useful!

I know, that for some languages we can use build system, but i write in clojure, and it not supported

neronmoon avatar Aug 31 '17 10:08 neronmoon

isn't true that you could use (load-file "$file") via custom keybindings?

EDIT,

    {
        "keys": ["cmd+shift+enter"], "command": "send_code",
        "args": {"cmd": "(load-file \"$file\")"},
        "context": [
            { "key": "selector", "operator": "equal", "operand": "source.clojure" }
        ]
    },

randy3k avatar Aug 31 '17 13:08 randy3k

Looks like that doesn't work.

Tried like this:

  1. Open file
  2. Write (def test "1")
  3. Push cmd+shift+enter
  4. No errors in terminal. Load-file returns nil
  5. write (println test)
  6. Push cmd+enter on that line
  7. Get undeclared Var error in terminal

neronmoon avatar Aug 31 '17 13:08 neronmoon

oh, you need to save the file first.

randy3k avatar Aug 31 '17 13:08 randy3k