Monday, September 27, 2010

Re: i_CTRL-A + i_CTRL-E as home + end

inoremap <C-h> <left>
inoremap <C-l> <Right>
inoremap <C-j> <C-o>gj
inoremap <C-k> <C-o>gk
inoremap <M-h> <C-o>b
inoremap <M-l> <C-o>w
inoremap <C-a> <Home>
inoremap <C-e> <End>

nnoremap <leader>o <C-W>w
nnoremap <C-j> <C-W>j
nnoremap <C-k> <C-W>k
nnoremap <C-h> <C-W>h
nnoremap <C-l> <C-W>l
nnoremap <M-j> mz:m+<CR>`z==
nnoremap <M-k> mz:m-2<CR>`z==
inoremap <M-j> <Esc>:m+<CR>==gi
inoremap <M-k> <Esc>:m-2<CR>==gi
vnoremap <M-j> :m'>+<CR>gv=gv
vnoremap <M-k> :m'<-2<CR>gv=gv

I use these.

2010/9/28 <meino.cramer@gmx.de>:
> Sven Guckes <guckes@guckes.net> [10-09-28 05:24]:
>> * <meino.cramer@gmx.de> [2010-09-28 02:08]:
>> > What happens to CTRL-A and CTRL-E at input mode ?
>>
>> see here:
>>
>>   :help i_CTRL-A  -> Insert previously inserted text.
>>   :help i_CTRL-E  -> Insert the character which is below the cursor.
>>
>> you may want these to behave like <home> and <end>:
>>
>>   :imap <c-a> <c-o>0
>>   :imap <c-e> <c-o>$
>>
>> enjoy!
>>
>> Sven
>>
>> --
>> 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
>>
>
> Hi all! :)
>
> Thank you all very much for the great help!!!
>
> Best regards
> mcc
>
> --
> 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 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