On my Mac, I put the following in my .vimrc
to use ii
as the key. Note, I include the :
in the .vimrc file, i'm not sure if you're supposed to but it still works :)
:imap ii <Esc>
I'm now trying to setup Vim on my iPad (see http://applidium.com/en/applications/vim/). Since there's no Esc on the iPad, the developers who ported Vim mapped the Esc key to \, however \ is very inconvenient if you're using the native iPad keyboard (rather than the bluetooth), so I'm trying to remap it again in the .vimrc that I've imported into the iPad via iTunes.
I put this in the .vimrc, thinking I should remap the remap
`:imap ii \`
but it always types two i rather then enter command mode.
What should I put in the .vimrc
to make the Vim enter command mode on the iPad by pressing ii
. I'm not sure if something special has to be done to remap a remap.
the .vimrc
file where ii
mapping still prints ii
rather than escaping
syntax on
set autoindent
set number
set tabstop=4
set shiftwidth=4
set expandtab
set ruler
set number
set incsearch
set ignorecase
set smartcase
let mapleader = "\<space>"
nmap <leader>h <C-W>h
nmap <leader>j <C-W>j
nmap <leader>k <C-W>k
nmap <leader>l <C-W>l
:imap ii <esc>
.exrc
, the:
would be required, but for.vimrc
the:
is optional.