Tuesday, September 6, 2011

Re: How to emphesize or color a few key words on the fly

On Sep 6, 6:45 am, yosi izaq <izaq...@gmail.com> wrote:
> On Mon, Sep 5, 2011 at 10:30 PM, yosi izaq  wrote:
> > On Mon, Sep 5, 2011 at 7:05 PM, Elias Diem wrote:
>
> >> Probably this helps you
>
> >>http://vim.wikia.com/wiki/Highlight_multiple_words
>
> >> Elias
>
> > Indeed. Thank you!
>
> Short Q. plz. It so turns out that my two main keyboards are, albeit
> fancy and expensive, devoid of a keypad, My rudimentary understanding
> of VIM script language is not sufficient to circumvent that. I'd
> greatly appreciate any suggestion how to adapt to no-keypad keyboards.
>

Yikes, that is hard to find!

I think you'll need to modify this code:

for i in range(1, 9)
execute 'vnoremap <silent> <k'.i.'> :<C-U>call
<SID>DoHighlight('.i.', 1, v:count)<CR>'
execute 'nnoremap <silent> <k'.i.'> :<C-U>call
<SID>DoHighlight('.i.', 2, v:count)<CR>'
endfor

Change "<k'.i.'>" in these to "<Leader>'.i.'" or "<F10>'.i.'" or
whatever prefix you want to press before a normal numeric key to
trigger the desired highlight mapping.

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