0

I'm searching for a linux gui text editor with the possibility to have multiple terminal sessions inside of the text editor. Copy paste should be possible with Ctrl c Ctrl v both in the files and in the terminal. It should include some "jump to definition" (not necessarily out-of-the-box).

Emacs with multi-term is nearly perfect, but it is a nightmare to get copy paste with Ctrl c Ctrl v working in multi-term.

I'm looking for something like emacs but with easier configuration and scripting.

1

Edit: I misunderstood your question, but I was able to force this binding by reading the comments on the wiki.

Editing the multi-term.el file (if installed via M-x package-install) (located ~/emacs.d/elpa/multi-term-1.2/multi-term.el

Remove "C-c" from the term-unbind-key-list:

(defcustom term-unbind-key-list
  '("C-z" "C-x" "C-h" "C-y" "<ESC>")
  "The key list that will need to be unbind."
  :type 'list
  :group 'multi-term)

Change the term-bind-key-alist defaults, here I'm using C-c maybe you want C-c-c:

> (defcustom term-bind-key-alist  
>    '(
>     ("C-c" . kill-ring-save)
>     ("C-p" . previous-line)
>     ("C-v" . term-paste)
>       .....

Recompile: M-x byte-recompile-directory

Restart emacs and Ctrl-V and Ctrl-C work as you want them to while in multi-term.

  • I'm well aware of the existance of the Cua-Mode. But unfortunately Cua-Mode does not work with multi-term. (see emacs.stackexchange.com/questions/50920/…) – Kryptomatrix Jun 9 at 21:23
  • Fixed my answer, these bindings work on my local machine. – Jay B Jun 9 at 23:57
  • This works for multi-term, but I want to use C-c and C-v both in multi-term and when editing a file. Once I put a (cua-mode t) in my init.el I can't copy paste in multi-term. – Kryptomatrix Jun 10 at 14:29
0

Visual Studio Code can do that.

To open a new terminal, type Alt-T, N. To split current terminal type ctrl-shift-s.

I've assigned my own keystrokes to switch from terminal-window 1 to main editor window as ctrl-1, and from main editor window to terminal1 as ctrl-2.

To switch from terminal-window 1 to 2, use arrow-right, to switch back use arrow-left.

You can also select text inside the terminal window, but I use the mouse to do that. once text is selected, ctrl-c, ctrl-v works too.

There are also Keymaps available as Extensions for VSCode, enabling you to import settings from other common editors).

  • VSCode is not bad, but I prefer to have a tabbed view of terminals so that the current terminal or the current file takes up most of the screen. (like in emacs multi-tab) – Kryptomatrix Jun 10 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.