• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

dennisog/julia-shell-mode: Emacs major mode for an interactive Julia shell.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

dennisog/julia-shell-mode

开源软件地址:

https://github.com/dennisog/julia-shell-mode

开源编程语言:

Emacs Lisp 91.2%

开源软件介绍:

julia-shell-mode

MELPA

Emacs major mode for an interactive Julia shell

Screenshot

Introduction

julia-shell-mode provides a comfortable Julia REPL in an interactive Emacs buffer. Some of the features include TAB completion through the Emacs completion system and easy interaction between a julia-mode editing buffer and a live julia-shell REPL.

Features/Usage

Julia-shell

To start a julia-shell, simply do

M-x run-julia

Completions

To query Julia for completions of the current command on the prompt, simply hit TAB. This supports LaTeX substitutions, just like the native Julia shell. For example, hitting TAB after

julia> y + \Delta

Completes to

julia> y + Δ

just like in the native Julia REPL.

When not substituting LaTeX letters, julia-shell will open a buffer with suggestions on how to complete the current command using Emacs' completion system. Simply press TAB to get a list of suggestions. For example, pressing TAB after

julia> his

First completes to

julia> hist

And pressing TAB again opens up a new *Completions* buffer with the following suggestions:

Click on a completion to select it.
In this buffer, type RET to select the completion near point.

Possible completions are:
hist 	hist2D
hist2d 	histrange

Shell interaction from julia-mode

You can use the function julia-shell-run-region-or-line to send the current region to the Julia interpreter. If the region is not active, this function will send the current line.

Another handy function is julia-shell-save-and-go: Save the current buffer and evaluate it in the Julia shell using evalfile().

Installation

Put the following code in your .emacs, init.el, or equivalent:

(add-to-list 'load-path "path-to-julia-shell-mode")
(require 'julia-shell)

where "path-to-julia-shell-mode" should be the location of this archive. Since the alias to run-julia overrides julia-mode's command, make sure to include these line after requiring julia-mode.

To interact with julia-shell from julia-mode, add the following code to your init.el:

(defun my-julia-mode-hooks ()
  (require 'julia-shell-mode))
(add-hook 'julia-mode-hook 'my-julia-mode-hooks)
(define-key julia-mode-map (kbd "C-c C-c") 'julia-shell-run-region-or-line)
(define-key julia-mode-map (kbd "C-c C-s") 'julia-shell-save-and-go)

Acknowledgments

This mode borrows heavily from MATLAB-emacs and hopes to replicate the comfortable MATLAB shell experience using Julia. Thanks!

Furthermore, thanks to the devs of the original julia.el for laying the foundation of this, especially the neat LaTeX substitutions.

License

GPL v2




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap