A minor emacs mode for Go REPL.
gorepl-mode is a Go REPL interaction library for Emacs. It's built on top of gore.
Gorepl packs some features (in no particular order):
- Powerful REPL - thanks to gore
- Interactive code evaluation
- Evaluate expressions selected
- Launch a repl with loaded file in a context
gorepl-mode
is available on MELPA
You can install gorepl-mode
with the following command:
M-x package-install [RET] gorepl-mode [RET]
Install gore.
- Enable
gorepl-mode
ingo-mode
buffers:
(add-hook 'go-mode-hook #'gorepl-mode)
-
M-x gorepl-run: Launch an instance of gore REPL client.
-
M-x gorepl-run-load-current-file: Launch an instance of gore REPL client with the current file loaded.
Keyboard shortcut | Description |
---|---|
C-C C-g | Launch an instance of gore REPL client |
C-C C-l | Launch an instance of gore REPL client - with the current file loaded |
C-c C-e | Evaluate the region selected |
C-c C-r | Evaluate the current line |
The performance for gore is not very fast, in fact when a gorepl is running using gorepl-run-load-current-file
it can be slow at first, especially with large files, because it's doing go run
to all file.
- Autocompletion
- go-mode in gorepl-mode