Tuesday, March 11, 2014

Re: I cannot remap the Enter key ()

On 2014-03-11, Alexey wrote:
> (I believe i posted it here yesterday, but i do not see my
> message, so i am resending.)

I saw it yesterday.

> I am trying to do this:
>
> noremap <CR> :
>
> It does not work for me, the command seems to be just ignored. I
> tested starting Vim with
>
> $ vim -u NONE
>
> so it should not be because of my configuration. When i searched
> with Google, i didn't find people asking this question, it even
> looks like they manage to remap <CR>:
> http://stackoverflow.com/questions/16359878/vim-how-to-map-shift-enter

Starting vim as

$ vim -u NONE

puts it into compatible mode and makes it behave as much as it can
like vi. Vi did not have a :noremap command. Try starting vim in
nocompatible mode like this instead:

$ vim -N -u NONE

See

:help -u
:help -N
:help 'compatible'

> Can anybody please help me or give an idea why i might not be able
> to remap <CR>?

It could be that your configuration has vim in 'compatible' mode.
To find out, execute

:verbose set compatible?

It could also be that your vim doesn't support the :noremap command
for some other reason, such as being the tiny version that doesn't
have many features included. What version are you running and with
what features included? You can find out with

:version

Regards,
Gary

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: