Thursday, June 23, 2011

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

Hi,

I just started using Vim (about 3 days old), and I am very optimistic about
it's potential.

Unfortunately, I have spent the last day searching for a solution to my
issue, and my optimism is becoming frustration :/

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?

Here is the background info you are undoubtedly curious about :)

1. I'm using Gvim and the Vim version is 7.3.35 and I on Ubunut 11.04
2. I am using Dvorak keyboard, and want to remap the "holy" hjkl to htcn
3. I performed mkv command to get my .vimrc, and have been editing from
there (below is my .vimrc file)

Thanks in advance for any advice you can provide,
The Last Airbender


"
-------------------------------------------------------------------------------------------
" .vimrc
"
-------------------------------------------------------------------------------------------
version 6.0
if &cp | set nocp | endif
let s:cpo_save=&cpo
set cpo&vim
map! <S-Insert> <MiddleMouse>
nmap gx <Plug>NetrwBrowseX
nnoremap <silent> <Plug>NetrwBrowseX :call
netrw#NetrwBrowseX(expand(" <cWORD>"),0)

map <S-Insert> <MiddleMouse>
let &cpo=s:cpo_save
unlet s:cpo_save
set backspace=indent,eol,start
set fileencodings=ucs-bom,utf-8,default,latin1
set helplang=en
set history=50
set nomodeline
set mouse=a
set printoptions=paper:letter
set ruler
set
runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim73,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
set
suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
set termencoding=utf-8
set window=21
" vim: set ft=vim :

" -----------------------------------------------------------------
" Custom Settings
" -----------------------------------------------------------------
colors wambat
set lines=45
set columns=150
set number

" -----------------------------------------------------------------
" Custom Key Bindings
" -----------------------------------------------------------------

" Dvorak it!
nnoremap k c
nnoremap c k
nnoremap t j
nnoremap n l
nnoremap s :
nnoremap S :
nnoremap l n
nnoremap L N
" Added benefits
nnoremap - $
nnoremap _ ^
nnoremap N <C-w><C-w>
nnoremap H 8<Down>
nnoremap T 8<Up>
nnoremap D <C-w><C-r>

" -----------------------------------------------------------------
" Plug-in Management
"------------------------------------------------------------------
set nocompatible " be iMproved
filetype off " required!

set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'

" My Bundles here:
"
" original repos on github
Bundle 'tpope/vim-surround'
Bundle 'tpope/vim-rails'
Bundle 'scrooloose/nerdtree'
" vim-scripts repos
"Bundle 'L9'
"Bundle 'FuzzyFinder'
"Bundle 'rails.vim'
" non github repos
"Bundle 'git://git.wincent.com/command-t.git'
" ...

filetype plugin indent on " required!
"
" Brief help
"
" :BundleInstall - install bundles (won't update installed)
" :BundleInstall! - update if installed
"
" :Bundles foo - search for foo
" :Bundles! foo - refresh cached list and search for foo
"
" :BundleClean - confirm removal of unused bundles
" :BundleClean! - remove without confirmation
"
" see :h vundle for more details
" or wiki for FAQ
" Note: comments after Bundle command are not allowed..

--
View this message in context: http://vim.1045645.n5.nabble.com/Why-doesn-t-the-k-key-remap-correctly-tp4518589p4518589.html
Sent from the Vim - General mailing list archive at Nabble.com.

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

Post a Comment