Skip to content

F6 to run the Nim program/module like the VSCode's extension does ? #26

@Kiloneie

Description

@Kiloneie

'F6' Run: myModule.nim

(Yes, i put "" around my filename)
Inside "tasks.json" opened via F1 —> (command palette) -> "open tasks".

{
  "label": "Run: \"${ZED_FILENAME}\"",
  "command": "nim",
  "args": ["c", "-r", "$ZED_FILE"],
  "use_new_terminal": false,
  "reveal": "always",
  "reveal_target": "dock",
  "tags": ["Run the current Nim module"]
}

Inside "keymap.json" opened via F1 —> (command palette) -> "open keymap".

{
  "context": "Editor && extension == nim",
  "bindings": {
    "F6": ["task::Spawn", { "task_tag": "Run the current Nim module" }]
  }
}

Maybe even 'F5' to kill the Nim program/module ?

Inside "keymap.json" opened via F1 —> (command palette) -> "open keymap".

Requires a double 'F5' key press to kill the task in this way:

{
    "context": "",
    "bindings": {
      "F5": ["action::Sequence", ["terminal_panel::ToggleFocus", ["terminal::SendKeystroke", "ctrl-c"]]]
    }
},

Maybe also 'F7'(or some other key), to check the Nim module ?

Inside "keymap.json" opened via F1 —> (command palette) -> "open keymap".

{
  "context": "Editor && extension == nim",
  "bindings": {
    "F7": ["task::Spawn", { "task_tag": "Check the current Nim module" }]
  }
}

Inside "tasks.json" opened via F1 —> (command palette) -> "open tasks".

{
  "label": "Check: \"${ZED_FILENAME}\"",
  "command": "nim",
  "args": ["check", "$ZED_FILE"],
  "use_new_terminal": false,
  "reveal": "always",
  "reveal_target": "dock",
  "tags": ["Check the current Nim module"]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions