2

Recently I found out that vim has added the :terminal command which opens a terminal buffer within vim, however I see no way to enter normal mode so that I can move around and copy things. Neovim has it as \n. Is there an equivalent in vim which lets me switch to normal mode?

2

You can use Ctrl-W N to enter normal mode from the terminal. (That's Ctrl-W Shift+N, for an uppercase N).

It is also possible to use Ctrl-\ Ctrl-N, which might be easier to type (thanks @D.BenKnoble for the comment.)

Thanks @ChristianBrabandt for the tip on :help terminal-use.

| improve this answer | |
  • 2
    Also <C-\><C-n>, which i find easier to type. – D. Ben Knoble Jul 17 '19 at 12:45
  • Please don't add "thank you" as an answer. Instead, accept the answer that you found most helpful. - From Review – jamessan Jul 23 '19 at 12:02
  • 1
    He wrote it as a comment. Can I accept a comment as an answer? – ivan Jul 23 '19 at 14:14
  • I edited this answer to make it more clear. I hope it looks better now. ivan, let me know if you disagree with the edits. @jamessan, please take another look. – filbranden Jul 23 '19 at 16:23
  • No, you can't accept a comment as an answer, so you can either reply in a comment that the tip helped and ask the person to make an answer, make your own answer based on their comment, or leave things as is. The answer as it exists now is much more useful than earlier "thanks" version. – jamessan Jul 23 '19 at 23:27

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