Re: [arch-general] Vim with X
The simpliest way is to select a text, and Maj+MiddleClick 2011/11/17 Leonid Isaev > On (11/17/11 21:32), Manolo Martínez wrote: > -~> On 11/17/11 at 09:08pm, Bastien Dejean wrote: > -~> > Manolo Martínez a écrit : > -~> > > -~> > > As it is now, the standalone vim cannot copy to and from the X > clipboard. > -~> > > -~> > I wrote the following functions to circumvent the problem: > -~> > -~> That is a very nice idea. Thanks for the suggestion. It'd be > interesting to know how > -~> many vim arch users resort to this or other neat tricks to communicate > with the > -~> X clipboard. > -~> > -~> Manolo > > Meh, I generally prefer gViM because of a better font support, building it > directly from hg tree. > > -- > Leonid Isaev > GnuPG key ID: 164B5A6D > Key fingerprint: C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D >
Re: [arch-general] Vim with X
On (11/17/11 21:32), Manolo Martínez wrote: -~> On 11/17/11 at 09:08pm, Bastien Dejean wrote: -~> > Manolo Martínez a écrit : -~> > -~> > > As it is now, the standalone vim cannot copy to and from the X clipboard. -~> > -~> > I wrote the following functions to circumvent the problem: -~> -~> That is a very nice idea. Thanks for the suggestion. It'd be interesting to know how -~> many vim arch users resort to this or other neat tricks to communicate with the -~> X clipboard. -~> -~> Manolo Meh, I generally prefer gViM because of a better font support, building it directly from hg tree. -- Leonid Isaev GnuPG key ID: 164B5A6D Key fingerprint: C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D pgpzK5gm4x1rQ.pgp Description: PGP signature
Re: [arch-general] Vim with X
On 11/17/11 at 09:08pm, Bastien Dejean wrote: > Manolo Martínez a écrit : > > > As it is now, the standalone vim cannot copy to and from the X clipboard. > > I wrote the following functions to circumvent the problem: That is a very nice idea. Thanks for the suggestion. It'd be interesting to know how many vim arch users resort to this or other neat tricks to communicate with the X clipboard. Manolo
Re: [arch-general] Vim with X
Bastien Dejean a écrit : > nmap gp :call Paste(1, 0) Sorry, obviously I meant 'Paste(0, 0)'. -- Bastien
Re: [arch-general] Vim with X
Manolo Martínez a écrit : > As it is now, the standalone vim cannot copy to and from the X clipboard. I wrote the following functions to circumvent the problem: function! Yank(...) if a:0 let response = system("xsel -pi", a:1) else let response = system("xsel -pi", @") endif endfunction function! YankClip(...) if a:0 let response = system("xsel -bi", a:1) else let response = system("xsel -bi", @") endif endfunction function! Paste(paste_before, use_primary) let at_q = @q if a:use_primary let @q = system("xsel -po") else let @q = system("xsel -bo") endif if a:paste_before normal! "qP else normal! "qp endif let @q = at_q endfunction Here's the bindings I use: vmap y y:call Yank() vmap gy y:call YankClip() nmap yy yy:call Yank() nmap p :call Paste(0, 1) nmap P :call Paste(1, 1) nmap gp :call Paste(1, 0) nmap gP :call Paste(1, 0) Greetings, -- Bastien
Re: [arch-general] Vim with X
On 11/16/11 at 07:09pm, Ray Rashif wrote: > Since recently, I've been using my own build of vim. I realised I > could do with some convenience after all these years and set up > omni-completion with supertab context for python. If you build in > python3 interpreter the completion does not work, so I have to rebuild > with only python2. I tried enabling X while I was at it but the > yanking to clipboard did not work as far as KDE's Klipper is > concerned. I use pathogen so updating vim or any of its plugins is not > a concern, and thus have vim ignored in pacman. > > You can do the same. > Yep, I'll give that a try. Thanks for the suggestion! M
Re: [arch-general] Vim with X
On 16 November 2011 17:31, Manolo Martínez wrote: > On 11/16/11 at 08:44am, Jason Melton wrote: >> On Tue, Nov 15, 2011 at 11:00 PM, Manolo Martínez >> wrote: >> > don't want gvim, but we find copying and pasting to and from the clipboard >> > useful. >> > >> > If you install gvim, you can still run "vim" in an emulator and you get >> the compile flags that gvim used. Which, relevant to this question include >> "+xterm_clipboard". gvim is not "gvim only, it's gvim AND vim. >> >> You can then "set clipboard=unnamedplus" (or just "unnamed", or not at >> all, depending on your preference) and go to town. > > Yes, I know. But gvim pulls in ruby and lua (does that even make sense? I > swear > that's what pacman asks to do), and that's a bit too much for clipboard > support. > > I was assuming (unwarrantedly, it appears) that my profile of use of vim (in a > terminal emulator, but relying on the x clipboard) was fairly standard. I > stand > corrected now. > > Manolo > -- > Since recently, I've been using my own build of vim. I realised I could do with some convenience after all these years and set up omni-completion with supertab context for python. If you build in python3 interpreter the completion does not work, so I have to rebuild with only python2. I tried enabling X while I was at it but the yanking to clipboard did not work as far as KDE's Klipper is concerned. I use pathogen so updating vim or any of its plugins is not a concern, and thus have vim ignored in pacman. You can do the same. -- GPG/PGP ID: C0711BF1
Re: [arch-general] Vim with X
On 11/16/11 at 08:44am, Jason Melton wrote: > On Tue, Nov 15, 2011 at 11:00 PM, Manolo Martínez > wrote: > > don't want gvim, but we find copying and pasting to and from the clipboard > > useful. > > > > If you install gvim, you can still run "vim" in an emulator and you get > the compile flags that gvim used. Which, relevant to this question include > "+xterm_clipboard". gvim is not "gvim only, it's gvim AND vim. > > You can then "set clipboard=unnamedplus" (or just "unnamed", or not at > all, depending on your preference) and go to town. Yes, I know. But gvim pulls in ruby and lua (does that even make sense? I swear that's what pacman asks to do), and that's a bit too much for clipboard support. I was assuming (unwarrantedly, it appears) that my profile of use of vim (in a terminal emulator, but relying on the x clipboard) was fairly standard. I stand corrected now. Manolo --
Re: [arch-general] Vim with X
On Tue, Nov 15, 2011 at 11:00 PM, Manolo Martínez wrote: > But I think many people > -- at any rate, I'm one of them -- use vim in a terminal emulator in X. We > don't want gvim, but we find copying and pasting to and from the clipboard > useful. > > If you install gvim, you can still run "vim" in an emulator and you get the compile flags that gvim used. Which, relevant to this question include "+xterm_clipboard". gvim is not "gvim only, it's gvim AND vim. You can then "set clipboard=unnamedplus" (or just "unnamed", or not at all, depending on your preference) and go to town.
Re: [arch-general] Vim with X
On 11/15/11 at 05:46pm, Taylor Hedberg wrote: > John K Pate, Tue 2011-11-15 @ 22:09:57+: > > ctrl-ins, shift-ins, middle-click should all still work. At least they > > do for me, and I don't have gvim installed. Or do I have something > > else installed that makes them work? > > He was probably referring to Vim's ability to yank text into its * and + > registers, which represent the X11 primary selection and clipboard, > respectively, using commands like "+yy. This doesn't work unless you > have installed gVim. Yes, sorry, that's what I meant. M --
Re: [arch-general] Vim with X
John K Pate, Tue 2011-11-15 @ 22:09:57+: > ctrl-ins, shift-ins, middle-click should all still work. At least they > do for me, and I don't have gvim installed. Or do I have something > else installed that makes them work? He was probably referring to Vim's ability to yank text into its * and + registers, which represent the X11 primary selection and clipboard, respectively, using commands like "+yy. This doesn't work unless you have installed gVim. pgpkiHflGnl7F.pgp Description: PGP signature
Re: [arch-general] Vim with X
On Tue, Nov 15, 2011 at 10:09:57PM +, John K Pate wrote: > ctrl-ins, shift-ins, middle-click should all still work. At least they > do for me, and I don't have gvim installed. Or do I have something else > installed that makes them work? Same here. -- FA Vor uns liegt ein weites Tal, die Sonne scheint - ein Glitzerstrahl.
Re: [arch-general] Vim with X
On Tue, 2011-11-15 at 22:58 +0100, Manolo Martínez wrote: > On 11/15/11 at 11:57pm, Ray Rashif wrote: > > On 15 November 2011 22:00, Manolo Martínez wrote: > > The policy had already been revised when the split was made to have > > vim and gvim. Vim had to become lightweight as many people were > > complaining about its bulk. > > > > > Thanks for the explanation, Ray. I guess I should learn to make do without > copying among X programs, as those people doubtlessly do. ctrl-ins, shift-ins, middle-click should all still work. At least they do for me, and I don't have gvim installed. Or do I have something else installed that makes them work? John == http://homepages.inf.ed.ac.uk/s0930006/ -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
Re: [arch-general] Vim with X
On 11/15/11 at 11:57pm, Ray Rashif wrote: > On 15 November 2011 22:00, Manolo Martínez wrote: > The policy had already been revised when the split was made to have > vim and gvim. Vim had to become lightweight as many people were > complaining about its bulk. > > Thanks for the explanation, Ray. I guess I should learn to make do without copying among X programs, as those people doubtlessly do. Manolo
Re: [arch-general] Vim with X
On 15 November 2011 22:00, Manolo Martínez wrote: > Hello everyone, > > As it is now, the standalone vim cannot copy to and from the X clipboard. For > a > vim that does this, one needs to install gvim, which pulls a number of > dependencies that you don't really need if you don't use the GUI. > > I guess the rationale for this is that people using vim in console have no use > for X support, and the rest will be happy to use gvim. But I think many people > -- at any rate, I'm one of them -- use vim in a terminal emulator in X. We > don't want gvim, but we find copying and pasting to and from the clipboard > useful. > > Any chance that the policy on compile flags to use for vim could be revised? > > Thanks > Manolo > > -- > The policy had already been revised when the split was made to have vim and gvim. Vim had to become lightweight as many people were complaining about its bulk. -- GPG/PGP ID: C0711BF1
Re: [arch-general] Vim with X
On 11/15/11 at 03:09pm, Jelle van der Waa wrote: > >Any chance that the policy on compile flags to use for vim could be revised? > > > >Thanks > >Manolo > > > You could search the archives, why this happend, else just use ABS. > Thanks for your reply, Jelle. I am using ABS atm. I (or rather a certain prominent search engine) couldn't find any thread related to this topic in the archives. Do you happen to remember about when was it covered in the list? Thanks Manolo > -- > Jelle van der Waa --
Re: [arch-general] Vim with X
On 15/11/11 15:00, Manolo Martínez wrote: Hello everyone, As it is now, the standalone vim cannot copy to and from the X clipboard. For a vim that does this, one needs to install gvim, which pulls a number of dependencies that you don't really need if you don't use the GUI. I guess the rationale for this is that people using vim in console have no use for X support, and the rest will be happy to use gvim. But I think many people -- at any rate, I'm one of them -- use vim in a terminal emulator in X. We don't want gvim, but we find copying and pasting to and from the clipboard useful. Any chance that the policy on compile flags to use for vim could be revised? Thanks Manolo You could search the archives, why this happend, else just use ABS. -- Jelle van der Waa