Re: Enable option / disable option

2012-07-31 Thread Benjamin R. Haskell
On Tue, 31 Jul 2012, Dotan Cohen wrote: On Tue, Jul 31, 2012 at 3:24 PM, Benjamin R. Haskell wrote: " h toggles the under-cursor highlighting :map h let g:under_cursor_hl = 1 - get(g:, 'under_cursor_hl', 1) " Use it in the CursorMoved autocmd :autocmd CursorMoved * if get(g:, 'under_cursor_hl

Re: Enable option / disable option

2012-07-31 Thread Dotan Cohen
On Tue, Jul 31, 2012 at 3:24 PM, Benjamin R. Haskell wrote: > " h toggles the under-cursor highlighting > :map h let g:under_cursor_hl = 1 - get(g:, 'under_cursor_hl', 1) > > " Use it in the CursorMoved autocmd > :autocmd CursorMoved * if get(g:, 'under_cursor_hl', 1) | exe printf('match > IncSear

Re: Enable option / disable option

2012-07-31 Thread Dotan Cohen
On Tue, Jul 31, 2012 at 3:23 PM, wrote: > On Tuesday, 31 July 2012 12:51:52 UTC+1, dotancohen wrote: > Here's another way to highlight the word under the cursor > > http://vim.wikia.com/wiki/VimTip1572 > > If you use this plugin, you can simply enable the functionality > > \m > > then use a NumP

Re: Enable option / disable option

2012-07-31 Thread Benjamin R. Haskell
On Tue, 31 Jul 2012, Dotan Cohen wrote: On Superuser I found this nice way to highlight the word under the cursor for the whole page: :autocmd CursorMoved * exe printf('match IncSearch /\V\<%s\>/', escape(expand(''), '/\')) http://superuser.com/questions/255024/vim-highlighting-a-search-term-

Re: Enable option / disable option

2012-07-31 Thread geoffrey . wood
On Tuesday, 31 July 2012 12:51:52 UTC+1, dotancohen wrote: > On Superuser I found this nice way to highlight the word under the > cursor for the whole page: > http://superuser.com/questions/255024/vim-highlighting-a-search-term-without-moving-the-cursor > > I would like to enable / disable this

Enable option / disable option

2012-07-31 Thread Dotan Cohen
On Superuser I found this nice way to highlight the word under the cursor for the whole page: :autocmd CursorMoved * exe printf('match IncSearch /\V\<%s\>/', escape(expand(''), '/\')) http://superuser.com/questions/255024/vim-highlighting-a-search-term-without-moving-the-cursor I would like to en