GithubHelp home page GithubHelp logo

Comments (6)

keicy avatar keicy commented on July 22, 2024

#54 もあわせて考察

from .emacs.d.

keicy avatar keicy commented on July 22, 2024

ソースコード編集バッファ

バインドは下記、これを変更すればよい。これの他はプレフィックスキーなしでのバインドはないのでそこはOK.

(defvar ensime-mode-map
...
      ;; Prefix-less shortcuts bindings...
      (define-key map (kbd "M-.") 'ensime-edit-definition)
      (define-key map (kbd "M-,") 'ensime-pop-find-definition-stack)

      (define-key map (kbd "M-n") 'ensime-forward-note)
      (define-key map (kbd "M-p") 'ensime-backward-note)

from .emacs.d.

keicy avatar keicy commented on July 22, 2024

REPL

問題は下記。 C-c C-v C-r / Send the region to the REPL でREPLのペーストモードに入った時のモード終了コマンドがEmacsの行削除とバッティング

# REPL

// Entering paste mode (ctrl-D to finish)

やっかいなことに、これは ENSIME/Emacsに設定されたものではなく、呼び出したScala REPLに元々定義されているもの。なので、これの定義はEmacsからは変更できない
なので、対応策は2つ。

  1. Scala REPL のバインドを変更する
  • これは情報ないし無理っぽい
  1. このバッファにおいてEmacsの絶対キー(の一部)を無効にする
  • こちらは helm で実績がある

よって、2の対応策で検討する。

from .emacs.d.

keicy avatar keicy commented on July 22, 2024

REPL対応

Scala REPL のメジャーモードは ensime-inf-mode
※ 画面の表示から判断して Scala REPL Mode と思いきやそうではない、これは表示上のものの様子

  • ensime-inf.el に定義されている
  • ensime-inf-mode-map がある
(define-derived-mode ensime-inf-mode comint-mode "Scala REPL"
  "Major mode for interacting with a Scala interpreter."
  (define-key ensime-inf-mode-map [(meta return)] 'comint-accumulate)
  (define-key ensime-inf-mode-map (kbd "TAB") 'ensime-inf-send-tab)
...

ensime-inf-mode で絶対バインドを無効にすればいけるかもしれない。

(add-hook 'ensime-inf-mode-hook (lambda () (override-global-mode -1)))

いけた!!! C-D がREPLに受付けられた。他のバインドも当然無効になっている。
OK!!

from .emacs.d.

keicy avatar keicy commented on July 22, 2024

上記バインドを Activator Shell にも定義した方が良いか確認
こちらは絶対キーのままで困らないかも、であれば必要ない

→いまのところ特に支障はないのでひとまずこちらは絶対バインドのままにしておく

from .emacs.d.

keicy avatar keicy commented on July 22, 2024

#60 によりクローズ

from .emacs.d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.