Saturday, April 2, 2011

Re: Finding the correct map

Hi Tim,

Thanks for your answer, but is not exactly what I am looking for,
because to used that mapping I need go out from the insert mode to the
normal mode and then used shift-left. What I am really looking for is
will be able used shift-left / shift-rigth without exit from the
insert mode.

I am used MacVim and when I select text with the pointer in insert
mode I can see that the mode change from --insert-- to -- (insert)
Visual -- and when I finish to select I return other time to insert
mode.

Cheers,
CARLOS.

On 1 abr, 02:11, Tim Chase <v...@tim.thechases.com> wrote:
> On 03/31/2011 05:01 PM, carlosvillu wrote:
>
> > I came from Textmate and i try to created a map that i was so
> > useful for me. When i edit a file in insert mode, i want can
> > press <shift>Left /<shift>Rigth for select caracter by
> > caracter and <shift><cmd>Left<shift><cmd>Right to select word
> > by word. Really I tried, but I don t make work fine.
>
> Assuming your vim can see that key-sequence (see note below), you
> can use
>
>   :nnoremap <s-left> v<left>
>   :nnoremap <s-right> v<right>
>   :vnoremap <s-left> <left>
>   :vnoremap <s-right> <right>
>
> which should implement the behavior you expect.
>
> -tim
>
> NOTE:  to see if your Vim distinguishes between them, in either
> insert-mode or command-line (":"-prompt) mode, you can type
> control-V followed by shift-left.  Then try the same with
> control-V followed by plain-left and see if Vim sees the same
> key-sequence.  Alternatively in insert-mode, you can prefix the
> key-to-check with control-K to see the vim-key-code representation.
>
>    :help i_CTRL-V
>    :help i_CTRL-K

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