Hi hermitte!
On Di, 10 Nov 2015, [email protected] wrote:
> Hello,
>
> I've observed something odd when I'm editing markdown files (with gvim
> 7.3-429 as well as gvim 7.4-908).
> The following mapping
>
> function! F()
> call search("!")
> return "\<c-\>\<c-n>lv2|o\<c-g>"
> endfunction
> inoremap £ <c-r>=F()<cr>
>
>
> does odd things.
>
> Let's say I've copy-pasted the text from the mapping to the markdown buffer
> and that I hit £ in insert mode before the first line. Instead of selecting
> the second line from the second character till the !, this part is replaced
> with the "g" character, and the screen blinks.
>
> If I remove the last part of the string returned (i.e. \<c-g>). Everything is
> "perfect": I get a visual selection -- except I'd like to end up with a
> SELECT-mode selection.
>
> Of course, I've tried "vmap <c-g>" and as expected, there is no mapping here.
>
>
> After further investigations, I've found out the culprit line in vim-airline.
> On CursorMove, CursorMoveI,
>
> :exe "silent normal! g\<c-g>"
>
> is executed.
You should report this to vim-airline.
> For reasons I'm not sure to completely understand, this line works fine in
> visual mode, but not in select mode.
> If I put this line behind a "if mode() =~? 's' | return", I have my
> workaround.
>
> Could we have a countword() function that would avoid such dirty tricks?
I'll look into this.
Best,
Christian
--
Ein Kaufmann macht durch allzu großes Rühmen die Ware, die ihm feil
ist, nur verdächtig.
-- Quintus Flaccus Horaz (65-8 v.Chr.)
--
--
You received this message from the "vim_dev" 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 because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.