Thursday, June 23, 2011

Re: Why doesn't the "k" key remap correctly?

On Jun 23, 1:47 pm, The Last Airbender <aang.a...@yahoo.de> wrote:
>
> I am trying to remap the "k" key, so that up is accessible differently.
> What end up happening is, upon remapping, my new up key (when pressed)
> performs an "up" and moves one to the right.  Additionally, when the cursor
> reaches a blank line between two lines it will not go up any further unless
> I use the arrow keys.  I have remapped the left, right, and down too, and
> those work fine.
>
> So what am I doing wrong?
>

Nothing that I can tell, but I will say that I think your attempt is
misguided. I've been using Vim with the Dvorak layout for 4 years now,
without any mappings which I can say are a result of my keyboard
layout, and find it to be no problem at all. That said...


> version 6.0

This is not something which should be in your .vimrc...I'd remove it.

> set nomodeline

Do you have a specific reason for disabling modelines? They can be
very useful, and don't really have any known security risks anymore.

> " vim: set ft=vim :

For example, this is a modeline which tells Vim to always load this
file with filetype, "vim".

> " Dvorak it!
> nnoremap k c
> nnoremap c k
> nnoremap t j
> nnoremap n l

I see nothing wrong here. After loading Vim, try ":verbose map c" to
see what the key is actually mapped to, and from where.

Also try without your plugins to see if anything changes.

As for usefulness...What about mapping the shifted versions of these,
also (you get shifted N later, but none of the others)?

> nnoremap s :
> nnoremap S :

Ok, these two commands aren't THAT useful, but you are losing
features.

> nnoremap _ ^

This one is not necessary, it's already mostly synonymous.

> nnoremap N <C-w><C-w>
> nnoremap H 8<Down>

Now you've lost the functionality of the shifted L and H keys, which
jump to the bottom/top of the screen. Very useful from time to time.

> nnoremap T 8<Up>

You've completely mapped away the t and T commands, which are VERY
useful, for things like cT. (change text from current position until
just after the previous '.' character) or d3t) (delete from current
cursor until just before the 3rd ')' character from here).

> nnoremap D <C-w><C-r>
>

This removes the "delete from cursor until end of line" feature. Also
very useful.

--
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

No comments: