Skip to content

Instantly share code, notes, and snippets.

@practicalli-johnny
Created January 3, 2021 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save practicalli-johnny/889cd50a59f601698b7f83e39c1e4b0b to your computer and use it in GitHub Desktop.
Save practicalli-johnny/889cd50a59f601698b7f83e39c1e4b0b to your computer and use it in GitHub Desktop.

Manage REPL session

, m . and , . calva.jackInOrConnect jack-in and connect menu commandPaletteeditor/context

, m c and , ” calva.connect Connect to a Running REPL Server in the Project Ctrl Alt C Ctrl Alt C | |

, m C calva.runCustomREPLCommand Run Custom REPL Command Ctrl Alt C .

, m j and , ’ calva.jackIn Start a Project REPL and Connect (aka Jack-In) Ctrl Alt C Ctrl Alt J

, m r calva.refresh Refresh Changed Namespaces

, m R calva.refreshAll Refresh All Namespaces

, m s calva.switchCljsBuild Select CLJS Build Connection Ctrl Alt C Ctrl Alt B

, m t calva.toggleCLJCSession Toggle the REPL Connection (clj or cljs) used for CLJC Files Ctrl Alt C Ctrl Alt S

, m q and , ! calva.disconnect Disconnect from the REPL Server editor/context

Format code

, = = calva-fmt.formatCurrentForm Format Current Form Tab

, = a calva-fmt.alignCurrentForm Format and Align Current Form (recursively, experimental) Ctrl Alt L

, = i calva-fmt.tabIndent Indent line Ctrl I

, = d calva-fmt.tabDedent Dedent line Ctrl Shift I

Evaluation

, e ; calva.evaluateTopLevelFormAsComment Evaluate Top Level Form (defun) to Comment Ctrl Alt C Ctrl Space editor/context

, e : calva.evaluateSelectionAsComment Evaluate Current Form to Comment Ctrl Alt C C editor/context

, e e calva.evaluateSelection Evaluate Current Form Ctrl Alt C E Ctrl Enter editor/context

, e f calva.evaluateCurrentTopLevelForm Evaluate Top Level Form (defun) Ctrl Alt C Space Alt Enter Enter editor/context

, e i calva.interruptAllEvaluations Interrupt Running Evaluations Ctrl Alt C Ctrl Alt D editor/context

, e l (like clearing the terminal) calva.clearInlineResults Clear Inline Evaluation Results Escape

, e n (evaluate namespace) calva.loadFile Load Current File and Dependencies Ctrl Alt C Enter editor/titleeditor/context

, e t (evaluate tools) calva.requireREPLUtilities Require REPL utilities, like (doc) etcetera, into Current Namespace Ctrl Alt C Ctrl U

, e w calva.evaluateSelectionReplace Evaluate Current Form and Replace it with the Result Ctrl Alt C R

Misc

??? - can be done with SPC v in VSpaceCode calva.selectCurrentForm Select Current Form Ctrl Alt C Ctrl S editor/context

, T p toggle pretty print calva.togglePrettyPrint Toggle Pretty Printing for All Evaluations Ctrl Alt C P editor/context

Debug

, d i calva.debug.instrument Instrument Top Level Form for Debugging Ctrl Alt C I commandPaletteeditor/context

, d r (debug > results ) calva.copyLastResults Copy Last Evaluation Result to Clipboard Ctrl Alt C Ctrl C

, d s (debug > stacktrace) calva.printLastStacktrace Print Last Stacktrace to Output Window Ctrl Alt C Ctrl Alt P

Tests

, t a run all tests calva.runAllTests Run All Tests Ctrl Alt C Shift T editor/context

, t f calva.rerunTests Run Failing Tests Again Ctrl Alt C Ctrl T editor/context

, t n test namespace calva.runNamespaceTests Run Tests for Current Namespace Ctrl Alt C T editor/context

, t t calva.runTestUnderCursor Run Current Test Ctrl Alt C Ctrl Alt T editor/context

Structural editing - SPC m k

, k . paredit.togglemode Toggle Paredit Mode Ctrl Alt P Ctrl Alt M

;; copy s-exp ??

slurp and barf

, k s paredit.slurpSexpForward Slurp Sexp Forward Ctrl RightArrow

, k S paredit.slurpSexpBackward Slurp Sexp Backward Ctrl Shift LeftArrow

, k b paredit.barfSexpForward Barf Sexp Forward Ctrl LeftArrow

, k B paredit.barfSexpBackward Barf Sexp Backward Ctrl Shift RightArrow

, k c paredit.convolute Convolute Sexp ¯\_(ツ)_/¯ Ctrl Shift C

, k J paredit.joinSexp Join Sexp Ctrl Shift J

, k r paredit.raiseSexp Raise Sexp Ctrl Alt P Ctrl Alt R

, k t paredit.transpose Transpose (Swap) the two Sexps Around the Cursor Ctrl Alt T

, k e paredit.spliceSexp Splice Sexp Ctrl Alt S

, k E paredit.splitSexp Split Sexp Ctrl Shift S

BLOCKED Selecting s-expressions

;; Selection is already provided by SPC v ;; Specific paredit key bindings are not required

, k space paredit.rangeForDefun Select Current Top Level (aka defun) Form Ctrl Alt W Space

, k v paredit.sexpRangeExpansion Expand Selection Ctrl W

, k V paredit.sexpRangeContraction Shrink Selection Ctrl Shift W

Wrapping / unwrapping

, k w ( paredit.wrapAroundParens Wrap Around () Ctrl Shift Alt P

, k w ( paredit.wrapAroundSquare Wrap Around [] Ctrl Shift Alt S

, k w { paredit.wrapAroundCurly Wrap Around {} Ctrl Shift Alt C

, k w ” paredit.wrapAroundQuote Wrap Around “” Ctrl Shift Alt Q

, k w p paredit.rewrapParens Rewrap () Ctrl Alt R Ctrl Alt P

, k w s paredit.rewrapSquare Rewrap [] Ctrl Alt R Ctrl Alt S

, k w c paredit.rewrapCurly Rewrap {} Ctrl Alt R Ctrl Alt C

, k w q paredit.rewrapQuote Rewrap “” Ctrl Alt R Ctrl Alt Q

Navigating s-expressions

, k h paredit.backwardSexp Backward Sexp Ctrl Alt LeftArrow

, k H paredit.backwardUpSexp Backward Up Sexp Ctrl UpArrow

, k j paredit.forwardDownSexp Forward Down Sexp Ctrl DownArrow

, k k paredit.backwardDownSexp Backward Down Sexp Ctrl Alt UpArrow

, k l paredit.forwardSexp Forward Sexp Ctrl Alt RightArrow

, k L paredit.forwardUpSexp Forward Up Sexp Ctrl Alt DownArrow

;; use % to toggle between start and end parens paredit.closeList Forward to List End/Close Ctrl End

selecting

paredit.selectForwardSexp Select Forward Sexp Ctrl Shift Alt RightArrow

paredit.selectBackwardSexp Select Backward Sexp Ctrl Shift Alt LeftArrow

paredit.selectForwardDownSexp Select Forward Down Sexp Ctrl Shift DownArrow

paredit.selectBackwardDownSexp Select Backward Down Sexp Ctrl Shift Alt UpArrow

paredit.selectBackwardUpSexp Select Backward Up Sexp Ctrl Shift UpArrow

paredit.selectForwardUpSexp Select Forward Up Sexp Ctrl Shift Alt DownArrow

, k end paredit.selectCloseList Select Forward to List End/Close Ctrl Shift End

, k home paredit.selectOpenList Select Backward to List Start/Open Ctrl Shift Home

Dragging

paredit.dragSexprBackward Drag Sexp Backward Ctrl Shift Alt B

paredit.dragSexprForward Drag Sexp Forward Ctrl Shift Alt F

paredit.dragSexprBackwardUp Drag Sexp Backward Up Ctrl Shift Alt U

paredit.dragSexprForwardDown Drag Sexp Forward Down Ctrl Shift Alt D

paredit.dragSexprForwardUp Drag Sexp Forward Up Ctrl Shift Alt K

paredit.dragSexprBackwardDown Drag Sexp Backward Down Ctrl Shift Alt J

delete / kill

, k delete paredit.killSexpForward Kill/Delete Sexp Forward Ctrl Shift + Delete

paredit.killSexpBackward Kill/Delete Sexp Backward Ctrl Alt Backspace

paredit.killListForward Kill/Delete Forward to End of List Ctrl Delete

paredit.killListBackward Kill/Delete Backward to Start of List Ctrl Backspace

paredit.spliceSexpKillForward Splice & Kill/Delete Forward Ctrl Shift Alt Delete

paredit.spliceSexpKillBackward Splice & Kill/Delete Backward Ctrl Shift Alt Backspace

paredit.deleteForward Delete Forward Delete

paredit.deleteBackward Delete Backward Backspace

paredit.forceDeleteForward Force Delete Forward Alt Delete

paredit.forceDeleteBackward Force Delete Backward Alt Backspace

refactor

add

, r a l calva.refactor.addMissingLibspec Add Missing Require

cycle clean convert

, r c n calva.refactor.cleanNs Clean NS Form

, r c p calva.refactor.cyclePrivacy Cycle/Toggle Privacy

Extract / Expand

, r e f calva.refactor.extractFunction Extract to New Function

, r e l calva.refactor.expandLet Expand Let

Introduce / Inline

, r i l calva.refactor.introduceLet Introduce let

, r i s calva.refactor.inlineSymbol Inline Symbol

Move

, r m l calva.refactor.moveToLet Move to Previous let Box

Thread macro

, r t f calva.refactor.threadFirst Thread First

, r t F calva.refactor.threadFirstAll Thread First All

, r t l calva.refactor.threadLast Thread Last

, r t L calva.refactor.threadLastAll Thread Last All

, r t u calva.refactor.unwindThread Unwind Thread

, r t U calva.refactor.unwindAll Unwind All

Calva windows

;; commands to be evaluated

calva.showOutputWindow Show Output Window Ctrl Alt C O commandPalette

calva.setOutputWindowNamespace Switch Namespace in Output Window to Current Namespace Ctrl Alt C Alt N editor/title

calva.sendCurrentFormToOutputWindow Send Current Form to Output/REPL Window Ctrl Alt C Ctrl Alt E

calva.sendCurrentTopLevelFormToOutputWindow Send Current Top Level Form to Output/REPL Window Ctrl Alt C Ctrl Alt Space

calva.showPreviousReplHistoryEntry Show Previous REPL History Entry Alt UpArrow commandPalette

calva.showNextReplHistoryEntry Show Next REPL History Entry Alt DownArrow commandPalette

calva.clearReplHistory Clear REPL History

LSP

;; LSPl is new functionality in Calva - to be evaluated before adding key bindings

calva.diagnostics.serverInfo LSP Server Info

calva.tellAboutNewChordingKey Ctrl Alt V

Unsure

Deprecated commands

calva.toggleKeybindingsEnabled Toggle Keybindings Enabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment