Skip to content

Instantly share code, notes, and snippets.

@AgentO3
Created December 14, 2016 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AgentO3/70847121f32d70962af73b0fa24d2611 to your computer and use it in GitHub Desktop.
Save AgentO3/70847121f32d70962af73b0fa24d2611 to your computer and use it in GitHub Desktop.
Proto-Repl Shortcuts

Keybindings and Events

Keyboard shortcuts below refer to using ctrl-alt-, then a letter. That means press the ctrl key and the comma key at the same time, release them, and then press the subsequent letter. Some keyboard shortcuts also include the shift key.

Keybinding Event Action
ctrl-alt-, L proto-repl:toggle Starts the REPL
ctrl-alt-, shift-L proto-repl:toggle Starts the REPL using the current open project.clj
ctrl-alt-, y proto-repl:remote-nrepl-connection Connects to a remote nREPL session.
ctrl-alt-, j proto-repl:start-self-hosted-repl Starts a self hosted REPL.
ctrl-alt-, e proto-repl:exit-repl Exits the REPL
ctrl-alt-, k proto-repl:clear-repl Clears REPL Output
ctrl-alt-shift-, s proto-repl:toggle-auto-scroll Enables/Disables autoscrolling the REPL
ctrl-alt-, b proto-repl:execute-block Sends the current block of Clojure code to the REPL for execution.
ctrl-alt-, B proto-repl:execute-top-block Sends the current top-level block of Clojure code to the REPL for execution.
ctrl-alt-, s proto-repl:execute-selected-text Sends the selected text to the REPL for execution.
ctrl-alt-, f proto-repl:load-current-file Loads the current file in the repl.
ctrl-alt-, r proto-repl:refresh-namespaces Runs the user/reset function. See My Clojure Workflow, Reloaded
ctrl-alt-shift-, r proto-repl:super-refresh-namespaces Clears all loaded namespaces using clojure.tools.namespace the runs the user/reset function.
ctrl-alt-, p proto-repl:pretty-print Pretty prints the last value returned at the REPL.
ctrl-alt-, x proto-repl:run-tests-in-namespace Runs all the tests in the current namespace.
ctrl-alt-, t proto-repl:run-test-under-cursor Runs the test that has a name under the cursor.
ctrl-alt-, a proto-repl:run-all-tests Runs all the test in the current project.
ctrl-alt-, d proto-repl:print-var-documentation Prints the documentation of a var under the cursor.
ctrl-alt-, c proto-repl:print-var-code Prints out the code of the var under the cursor.
ctrl-alt-, o proto-repl:open-file-containing-var Opens the code of the var or namespace under the cursor. This works even with vars defined in libraries.
ctrl-alt-, n proto-repl:list-ns-vars Lists the vars in the namespace under the cursor.
ctrl-alt-shift-, n proto-repl:list-ns-vars-with-docs Lists the vars in the namespace under the cursor with documentation.
shift-ctrl-c proto-repl:interrupt Attempts to interrupt the currently running command in the REPL.
ctrl-alt-shift-, i proto-repl:insert-save-value-call Inserts a call to proto/save with a unique id
ctrl-alt-shift-, d proto-repl:display-saved-values Displays values saved using the proto/save function.
ctrl-alt-shift-, c proto-repl:clear-saved-values Clears previously saved values using the proto/save function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment