[sage-devel] Re: yanking sage doctests in vim

2020-03-12 Thread Simon King
Hi Sébastien, hi Marc, On 2020-03-12, Sébastien Labbé wrote: > You may not be using the good register. You may see what is in the current > registers by writing: > >:registers > > To yank in the register +, you do "+y or "+\Y to yank with Marc's code. The > register + is the clipboard on my mac

[sage-devel] Re: yanking sage doctests in vim

2020-03-12 Thread Sébastien Labbé
On Wednesday, March 11, 2020 at 11:11:57 PM UTC+1, Simon King wrote: > > Hi Marc, > > On Wednesday, March 11, 2020 at 12:50:07 PM UTC+1, Marc Mezzarobba wrote: >> >> Sébastien Labbé wrote: >> > But I am not getting errors, maybe my vim is too old (7.4.1689). I >> > need to update my machine but

Re: [sage-devel] Re: yanking sage doctests in vim

2020-03-12 Thread Dima Pasechnik
vim is very configurable, there could be stuff in ~/.vim/, in ~/.vimrc, in system-wide locations as listed in FILES section of "man vim" output, which can change how it behaves. YMMV. On Thu, Mar 12, 2020 at 11:28 AM Marc Mezzarobba wrote: > > Simon King wrote: > > But when I then go to Sage com

[sage-devel] Re: yanking sage doctests in vim

2020-03-12 Thread Marc Mezzarobba
Simon King wrote: > But when I then go to Sage command line and hit -insert (which > usually inserts what was previously copied), nothing happens (resp. > some text was inserted that I have copied previously). This is with > vim version 8.2.343 > > What am I doing wrong? I don't know. Does y in v

[sage-devel] Re: yanking sage doctests in vim

2020-03-11 Thread Simon King
Hi Marc, On Wednesday, March 11, 2020 at 12:50:07 PM UTC+1, Marc Mezzarobba wrote: > > Sébastien Labbé wrote: > > But I am not getting errors, maybe my vim is too old (7.4.1689). I > > need to update my machine but I am always postponing this to tomorro > > Indeed, it looks like I'm using featu

[sage-devel] Re: yanking sage doctests in vim

2020-03-11 Thread Marc Mezzarobba
Sébastien Labbé wrote: > But I am not getting errors, maybe my vim is too old (7.4.1689). I > need to update my machine but I am always postponing this to tomorro Indeed, it looks like I'm using features that appeared with vim 8. -- Marc -- You received this message because you are subscribed

[sage-devel] Re: yanking sage doctests in vim

2020-03-11 Thread Marc Mezzarobba
Simon King wrote: > sorry, I still don't get what *exactly* one needs to do in order to > achieve *what*. My post was intended mainly for vim users who would be able to figure out on their own what the code does and find it useful for their workflow. I didn't realize anyone else might be interes

[sage-devel] Re: yanking sage doctests in vim

2020-03-10 Thread Sébastien Labbé
On Monday, March 9, 2020 at 4:25:18 PM UTC+1, Marc Mezzarobba wrote: > > Marc Mezzarobba wrote: > > vnoremap Y :call YankSageTest(visualmode(), 1) > uh, there is a '>' missing at the end I get the same errors after adding the missing `>` at the end -- You received this message because you ar

[sage-devel] Re: yanking sage doctests in vim

2020-03-10 Thread Simon King
Hi Marc, sorry, I still don't get what *exactly* one needs to do in order to achieve *what*. In your original mail, you wrote that it is "for copy-pasting examples and doctests to the sage repl". If I understand correctly, repl is abbreviation for read-eval-print-loop. I guess that' what I ca

[sage-devel] Re: yanking sage doctests in vim

2020-03-09 Thread Marc Mezzarobba
Marc Mezzarobba wrote: > vnoremap Y :call YankSageTest(visualmode(), 1)' missing at the end -- Marc -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+un

[sage-devel] Re: yanking sage doctests in vim

2020-03-09 Thread Sébastien Labbé
Ok, I see how to call it, I needed to define some . But I am not getting errors, maybe my vim is too old (7.4.1689). I need to update my machine but I am always postponing this to tomorrow. │Erreur détectée en traitant function YankSageTest :

[sage-devel] Re: yanking sage doctests in vim

2020-03-09 Thread Marc Mezzarobba
Sébastien Labbé wrote: > Should I understand that it filters out the output? Can you tell how > you use it? It only works linewise, and is mapped to Y, which is probably something like \Y depending on your setup. You can use it either by selecting some text in visual mode and typing \Y, or typin

[sage-devel] Re: yanking sage doctests in vim

2020-03-09 Thread Sébastien Labbé
Thanks Marc! Should I understand that it filters out the output? Can you tell how you use it? In vim, I am able to use "+y to yank some block of sage doctest to the register + (i.e., the paste bin). I tried "+Y with your code, but it does not seem to work. Since 2 years with some update of th