Hello,
There is a thread on StackOverflow labelled
"How to get visually selected text in VimScript"
The naive and stable approach would be
let old_reg = @v
normal! gv"vy
let raw_search = @v
let @v = old_reg
return raw_search
but that only works if `set nosecure`. If `set secure` then
On Tuesday, February 10, 2015 at 2:22:35 AM UTC-6, Enno wrote:
> Hello,
>
> There is a thread on StackOverflow labelled
>
> "How to get visually selected text in VimScript"
>
> The naive and stable approach would be
>
> let old_reg = @v
> normal! gv"vy
> let raw_search = @v
> let @v = o
Le mardi 10 février 2015 09:22:35 UTC+1, Enno a écrit :
> Hello,
>
> There is a thread on StackOverflow labelled
>
> "How to get visually selected text in VimScript"
>
> The naive and stable approach would be
>
> let old_reg = @v
> normal! gv"vy
> let raw_search = @v
> let @v = old_reg
Le mardi 10 février 2015 09:22:35 UTC+1, Enno a écrit :
> Hello,
>
> There is a thread on StackOverflow labelled
>
> "How to get visually selected text in VimScript"
>
> The naive and stable approach would be
>
> let old_reg = @v
> normal! gv"vy
> let raw_search = @v
> let @v = old_reg
On Wednesday, February 11, 2015 at 3:26:14 AM UTC-6, Enno wrote:
> Le mardi 10 février 2015 09:22:35 UTC+1, Enno a écrit :
> > Hello,
> >
> > There is a thread on StackOverflow labelled
> >
> > "How to get visually selected text in VimScript"
> >
> > The naive and stable approach would be
> >
>
Le mercredi 11 février 2015 17:13:12 UTC+1, Ben Fritz a écrit :
> On Wednesday, February 11, 2015 at 3:26:14 AM UTC-6, Enno wrote:
> > Le mardi 10 février 2015 09:22:35 UTC+1, Enno a écrit :
> > > Hello,
> > >
> > > There is a thread on StackOverflow labelled
> > >
> > > "How to get visually sele
On Wednesday, February 11, 2015 at 11:58:24 AM UTC-6, Enno wrote:
> > Actually, the problem has nothing to do with the 'secure' option. Setting
> > nosecure gives the same result, if I correct your mapping:
> >
> > xnoremap * "\/".GetVis()."\"
> >
> > The problem is not 'secure' but rather the
Le mardi 10 février 2015 09:22:35 UTC+1, Enno a écrit :
> Hello,
>
> There is a thread on StackOverflow labelled
>
> "How to get visually selected text in VimScript"
>
> The naive and stable approach would be
>
> let old_reg = @v
> normal! gv"vy
> let raw_search = @v
> let @v = old_reg
Le mercredi 11 février 2015 21:54:54 UTC+1, Enno a écrit :
> Le mardi 10 février 2015 09:22:35 UTC+1, Enno a écrit :
> > Hello,
> >
> > There is a thread on StackOverflow labelled
> >
> > "How to get visually selected text in VimScript"
> >
> > The naive and stable approach would be
> >
> > l