3

I want to copy some text from my browser and paste it into ansi-term. I am a vim user and I want to give spacemacs a try once again.

Naturally what I did was:

  • Opening ansi-term by typing SPC SPC ansi-term.
  • Switch to normal-state by pressing ESC.
  • Switch to my browser, copy some text
  • Switch back to emacs, press p which seems to be right (the text was pasted)

So I try some alternatives

  • Press enter, and surprised since the command didn't executed
  • Press i to switch to insert mode, and do it again. Yet still didn't work.
  • Press SPC SPC term-paste, now it works

What I expect is, I can simply use evil binding to copy-pasting things in spacemacs and get it work.

Can anybody please show me what's wrong and how to do this correctly?

Thanks

EDIT: I can get it works by switching to line mode. So, after I start ansi-term, I need to press Ctrl c Ctrl j. Still looking for a better way if there is any.

EDIT AGAIN: The official way to do this is <S-Insert> (shift + insert)

3
  • 1
    Is it bound to S-insert by any chance?
    – user12563
    Nov 27, 2017 at 10:00
  • I see that on the docs. But what S exactly is? Capital S or space? I try both, S and space, and I can't get it work. Nov 27, 2017 at 15:26
  • @DoMiNeLa10 Ah, I see. S-insert is shift + insert Nov 28, 2017 at 3:56

2 Answers 2

6

A command to paste into an ansi-term is bound to S-insert (that's shift insert) by default.

runs the command term-paste (found in term-raw-map), which is an interactive compiled Lisp function in ‘term.el’.

It is bound to .

(term-paste)

Insert the last stretch of killed text at point.

0

In the latest version of spacemacs (as of jan 2018), SPC SPC is replaced by SPC :.

So in order to get term-paste working, you have to do SPC : term-paste in ansi-term

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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