0

I've mapped CTRL+Meta+n to :split | resize 15 | term. This command works when run from Vim, but when I put the command in my .vimrc, on Vim startup, I get the following error:

zsh:1: parse error near '>'

[Process exited 1]

When removing the mapping, Vim starts normally.

3
  • 3
    What exactly did you put in your vimrc? I think you probably want to use <Bar> instead of | in your mapping? See :help map-bar Sep 27 '20 at 10:17
  • Adding <Bar> instead of | worked, thank you! Can you post your comment as an answer so I can accept it? Sep 27 '20 at 11:02
  • 1
    Welcome to Vi and Vim! @MartinTournoij good catch, though I’m at a loss on zsh’s error (unless it’s launching term with the contents of vimrc?)
    – D. Ben Knoble
    Sep 27 '20 at 13:44
1

From the comments:

What exactly did you put in your vimrc? I think you probably want to use <Bar> instead of | in your mapping. See :help map-bar.

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.