Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Vim: consider different default mappings, which do not overlap with default maps #36

Open
blueyed opened this Issue · 5 comments

3 participants

@blueyed

Both Ctrl-e and Ctrl-n have default meanings already, and therefore should not get remapped by default:

CTRL-E      Insert the character which is below the cursor.  {not in Vi}
CTRL-N      Find next match for words that start with the
        keyword in front of the cursor, looking in places
        specified with the 'complete' option.  The found
        keyword is inserted in front of the cursor.

While it is quite easy to configure this via g:sparkupExecuteMapping and g:sparkupNextMapping, that does not mean that the defaults might not get improved.

I have no particular suggestion myself, but maybe just something using <Leader> as prefix?

This is related to issue #35.

@bruno-

+1 on this.
I was having issues with both C-e and C-n not working in html filetype files. It took me a couple of weeks before I realized sparkup remapped them. These are not really obscure keys, especially C-n

@sporkbox
Collaborator

@blueyed You make good points on the C-n mapping. C-e doesn't seem to do anything in Insert mode for me with a plain buffer, so I see no issue with that one.

<Leader> prefixes are designed for user mapping, not plugins, so that's a no-go. Looking through :help, it seems like i_CTRL-F (for "forward") may be good for g:sparkupNextMapping. Of course, this would only apply to Insert mode, not Normal mode. I don't think there's a mapping that would be suitable for use in both modes.

Ideas?

@blueyed

@sporkbox
I was about to quote the help again for i_CTRL-E: you need to use it in a line above another one. It should add the char from below.
It's also used to end insert-mode completion.

i_CTRL-F is used to indent the current line, but it might not be commonly used and is only the default via 'indentkeys' and 'cinkeys'.

@sporkbox
Collaborator

@blueyed Thanks for the clarification. When you first mentioned "under the cursor" I thought you literally meant the character that the cursor was on top of.

Is there really a use-case for i_CTRL-E? It seems neat, but I'm not sure who out there (especially editing HTML) will use it. I'm still open to suggestions; surely there's some mapping we can find that'll work! :)

@blueyed

Is there really a use-case for i_CTRL-E?

Yes. And then there would still be <C-e> during completion, which is more commonly used probably.

I'm still open to suggestions; surely there's some mapping we can find that'll work! :)

:+1:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.