You are not logged in.

#1 2013-06-14 01:53:36

hughitt1
Member
Registered: 2010-02-18
Posts: 78
Website

Vim: bind control + enter?

Hello,

Does anyone know if it is possible to bind Control + Enter to a function in the console version of vim?

I've tried a number of variations (e.g. <c-enter>, <c-cr>, etc) as suggested on some other threads discussing the issue, but so far have not had any luck.

Any ideas?
Keith

Offline

#2 2013-06-14 03:15:34

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,794
Website

Re: Vim: bind control + enter?

It's <C-M> for me, but to figure it out for your terminal, at a prompt (outside of vim) type Ctrl-V then Ctrl-Enter, and it will show you how it is read.  It will display a ^? where the ? is a capital letter, translate that into the vimrc as <C-?>.

Last edited by Trilby (2013-06-14 03:17:15)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#3 2013-06-14 09:57:05

hughitt1
Member
Registered: 2010-02-18
Posts: 78
Website

Re: Vim: bind control + enter?

Hi Trilby,

Thanks for the suggestion. So when I try this in Xterm I get the same result as you and mapping to <C-M> works fine.

In terminator, however, the result is the null character, ^@, but mapping to "C-@" does not work.

Offline

Board footer

Powered by FluxBB