obtain current visual selection

2015-02-10 Thread Enno
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

Re: obtain current visual selection

2015-02-10 Thread Ben Fritz
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

Re: obtain current visual selection

2015-02-11 Thread Enno
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

Re: obtain current visual selection

2015-02-11 Thread Enno
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

Re: obtain current visual selection

2015-02-11 Thread Ben Fritz
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 > > >

Re: obtain current visual selection

2015-02-11 Thread Enno
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

Re: obtain current visual selection

2015-02-11 Thread Ben Fritz
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

Re: obtain current visual selection

2015-02-11 Thread Enno
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

Re: obtain current visual selection

2015-02-28 Thread Enno
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