"nmap" issue

22 views
Skip to first unread message

Jerry Dai

unread,
Nov 1, 2019, 1:58:05 PM11/1/19
to vim_use
Hi,
I'm trying to create a mapping to maximize current window. But somehow
it only executed portion of my mapping.
My mapping is:
nmap <Esc>m <C-W>_<C-W>|
Looks like after I press <Esc>m , it only executes <C-W>_ .
And if we change it to:
nmap <Esc>m <C-W>|<C-W>
It give me the following error when I source .vimrc :
Error detected while processing /usr2/jianzhen/.vimrc:
line 500:
E488: Trailing characters: <C-W>_

-- --
Best Regards
Jerry Dai

Tony Mechelynck

unread,
Nov 1, 2019, 2:15:08 PM11/1/19
to vim_use
Used like that, the | charcter is seen as a separator between the :map
command and a following command. You should use <Bar> instead.

Best regards,
Tony.

Jerry Dai

unread,
Nov 1, 2019, 2:21:35 PM11/1/19
to vim_use
That works. Thanks Tony!

-- --
Best Regards
Jerry Dai

> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXtqMC%3Dn6DAM5KmQjd8Obc3QOhu7n7Td1Nwj95GUmmBFVw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages