Skip to content

Better integration of Julia REPL with Emacs vterm terminal

License

Notifications You must be signed in to change notification settings

wentasah/EmacsVterm.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmacsVterm

Better integration of Julia REPL with Emacs vterm terminal.

Installation

  1. In Julia prompt type:

    julia> ]add EmacsVterm
    
  2. Add the following to ~/.julia/config/startup.jl:

    atreplinit() do repl
        @eval using EmacsVterm
        # Optionally set EmacsVterm.options as you like (see below)
    end
  3. Configure julia-repl to use the vterm backend by putting:

    (julia-repl-set-terminal-backend 'vterm)

    to your Emacs config.

Features

  • You can jump between prompts in *julia* REPL buffers with C-c C-p and C-c C-n.

  • Julia REPL informs Emacs about its working directory. Therefore, after changing directory in Julia, opening file in Emacs (e.g. C-x C-f) starts in that directory.

  • Documentation (@doc ... invocation or C-c C-d in julia-mode buffers with julia-repl enabled) is shown in a separate Emacs buffer.

    To disable this functionality, run:

    EmacsVterm.options.markdown = false

    If you are not happy with where Emacs chooses to display the *julia-doc* buffer, you can configure it via a "display action". For example, the following piece of code in init.el ensures that if the *julia-doc* buffer is already shown somewhere, the same buffer is reused; otherwise, a right side window with an appropriate width will be created.

    (add-to-list 'display-buffer-alist '("\\*julia-doc\\*"
      			       (display-buffer-reuse-window display-buffer-in-side-window)
      			       (side . right) (window-width . 80)))
  • Images can be shown in the *julia-img* Emacs buffer. This functionality is not enabled by default. Enable it with:

    EmacsVterm.options.image = true
  • In addition to EmacsVterm.options, the whole Emacs-based Multimedia I/O can be disabled (resp. enabled) with:

    EmacsVterm.display_off()
    EmacsVterm.display_on()

About

Better integration of Julia REPL with Emacs vterm terminal

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages