Re: Terminal-based auto-paste.
On 7/10/06, Sean Reifschneider <[EMAIL PROTECTED]> wrote: On Mon, Jul 10, 2006 at 07:56:13PM +0300, Yakov Lerner wrote: >Vim is special. I believe that being organic extension of >programmer/sysadmin fingers, it deserves special attitude >that other packages. By refusing to build vim from sources you totally close the door for some patch being developed (and included) based on your requirement. Because (1) such patch must first be picked and tested by the person for whom it is made (2) it might be an optional feature which your packager decide to turn off. In which case you never see the feature even if it was included into the vim spcifically for you. So it's not going to happen. I already understand you unacceptance of personal builds. You justify it by "it doesn't help many users". Maybe. Maybe it's so. My experience is different. Some users use pico, some used "visual slick edit", some use nvi. Not everybody use vim to the same depth. I can probably find someone on the developers list for the vast majority of those other 1200 packages who says exactly the same thing about that package. You're right that it's not sysadmin's job to compile things. It's developer's jobs. And developers are accustomed to this. The point that is confused, or missed here, is as follows: The developer who has a problem with package X will *not* ask *you* to build package X. (He might ask you to find the fixed binary package. Or he'll build X from the sources himself (Under his $HOME). I'm absolutely not missing this point. Being a developer and having built myself 50% of various software I was using on Linux.) Pretending that developer Y who has specific problem with package X will demand that you, the sysadmin, will build X for him, is intentionally fogging the things. He will never demand that sysadmin build a package for him. (It's developer's job to build things, again. And of course, truth being "it's developer's job to build things" serves you as justification for your refusal to build things, including vim, at which point, I'm convinced, you make error :-) ) Yakov
Re: Terminal-based auto-paste.
On 2006-07-10, Sean Reifschneider <[EMAIL PROTECTED]> wrote: > On Mon, Jul 10, 2006 at 07:38:02AM +, Yakov Lerner wrote: > >package-maintiners and expect them to fine-tune binary packages > >to your inquiries/needs/wishes. Unless you are package-maintiner > > Having an expert tune the packages for the general cases is probably going > to work much better on average than having the layman try to tune it > themselves. A good package maintainer can make it so that a package fits > nearly everyone's needs. I have submitted a suggestion to the Fedora > packager that they extend the "vim-x11" package to include not only "gvim", > but also "xvim", leaving the stock "vim" package being compiled with > --with-x=no. This way you get the fairly minimal package in "vim-minimal", > and users who want vim on a server without X installed are happy. And > users who want enhanced X capabilties can install "vim-x11" and get > enhanced functionality by calling (or aliasing) gvim or xvim. Since you mention aliasing, I think the simplest solution to this would be: alias vim="gvim -v" That will give you a terminal-mode vim with all the X features that were compiled into your gvim. HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Wireless Division | Spokane, Washington, USA
Re: Terminal-based auto-paste.
On Mon, Jul 10, 2006 at 07:56:13PM +0300, Yakov Lerner wrote: >Vim is special. I believe that being organic extension of >programmer/sysadmin fingers, it deserves special attitude >that other packages. The point you missed, assuming I was being absurd, is that I can probably find someone on the developers list for the vast majority of those other 1200 packages who says exactly the same thing about that package. We can get it fixed in Fedora, and it helps a lot of users. I recommend using packages wherever possible. As compiling --with-x=yes doesn't, in actuality, solve the problem I was having (that mouse support acts differently than other applications), I don't see any justification for building my own, locally-installed vim and tracking updates. Thanks, Sean -- Brooks's Law of Prototypes: Plan to throw one away, you will anyhow. Sean Reifschneider, Member of Technical Staff <[EMAIL PROTECTED]> tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability Back off man. I'm a scientist. http://HackingSociety.org/
Re: Terminal-based auto-paste.
On 7/10/06, Yakov Lerner <[EMAIL PROTECTED]> wrote: I penetrated this barrier once ~ 6 years ago, the barrier between the stock-rpm-vim and self-build-rpm. Correction. I wanted to write: ... the barrier between the stock-rpm-vim and self-build-vim.
Re: Terminal-based auto-paste.
On 7/10/06, Sean Reifschneider <[EMAIL PROTECTED]> wrote: I have submitted a suggestion to the Fedora packager I wish you god luck waiting from Fedora packager. I referred to the possibility of installing vim under $HOME/bin, for one user only, you. (This is possible even if user is root). The other users use stock /usr/bin/vim, but you'll use vim from $HOME/bin/vim. The advantage is that it's built precisely to your taste. Mucking with 1st build takes, maybe, 1/2 hour. Non-first build is seconds of you net time (that if you package it into script as I did; it's one command and then couple of minutes of background work). I don't know exactly how long it takes for changed Fedora package. But I believe there is gain even in you net time. If you know the exercise of (./configure --prefix=$HOME --with-features=huge && make && make install) it's really easy. (It you don't, it's worth learning anyway. For myself, I made a script that downloads the latest vim-src.tgz and builds it all in one invocations exactly with options I like. Rebuild takes 10 seconds of my net time). I never come from this point back to stock-rpm-vim. So, it gives you full control. Quick control. And you don't need to break other users's vim when you install under $HOME/bin. I penetrated this barrier once ~ 6 years ago, the barrier between the stock-rpm-vim and self-build-rpm. I remember my initial hesitation and difficulties, and I understand your hesitation. This conversion, it's worth a mass. Just try it once, and you'll stick with it. I currently have over 1251 packages installed on my system, do you know how long it would take to correctly (let alone optimally) package and build, to say nothing of hunting down and apply updates, for this laptop? You slipped into absurdity here. Nobody suggested that you rebuild 1200 [unrelated] packages because of minor problem with vim rpm. Vim is special. I believe that being organic extension of programmer/sysadmin fingers, it deserves special attitude that other packages. Yakov
Re: Terminal-based auto-paste.
On Mon, Jul 10, 2006 at 07:38:02AM +, Yakov Lerner wrote: >It is so much easier and predictable to build & install vim from >sources youself, (with exactly the features you need), than hunt I understand that some people believe this, but as a large-scale system administrator I disagree. If I avoid the native packaging system, how will I know when there are (possibly security-related) updates available? I currently have over 1251 packages installed on my system, do you know how long it would take to correctly (let alone optimally) package and build, to say nothing of hunting down and apply updates, for this laptop? Factor in, say, 100 machines in various stages of production or test, and you suddenly have to build an empire just to maintain them. >package-maintiners and expect them to fine-tune binary packages >to your inquiries/needs/wishes. Unless you are package-maintiner Having an expert tune the packages for the general cases is probably going to work much better on average than having the layman try to tune it themselves. A good package maintainer can make it so that a package fits nearly everyone's needs. I have submitted a suggestion to the Fedora packager that they extend the "vim-x11" package to include not only "gvim", but also "xvim", leaving the stock "vim" package being compiled with --with-x=no. This way you get the fairly minimal package in "vim-minimal", and users who want vim on a server without X installed are happy. And users who want enhanced X capabilties can install "vim-x11" and get enhanced functionality by calling (or aliasing) gvim or xvim. Seems like a workable solution that will make everyones lives easier. >yourself, why would they follow your preferences rather than, say, >their own preferences ? A packager is doing the packaging as a community service. They rarely do it to their own preferences. If you are a Fedora packager, you almost never get to consider only your own preferences. This is why there is the review process. >Look like the pat of Sean Reifschneider's problem is that No, my problem is that vim --with-x=no works identically to other applications running in X terms. However, it can't make use of the extremely cool automatic "paste" function. Configuring it so you get automatic pasting causes it to act extremely differently than other xterm applications. --with-x=yes or --with-x=no doesn't matter. The only thing that --with-x=yes fixes is that when you ":set mouse=a" in a vim built --with-x=no, the pasted text comes from, I think, the 0 buffer and not the X selection. My understanding of this is that the problem is that when you ":set mouse=a", it send the escape sequence to tell xterm to send mouse events. So, instead of xterm sending the selection when you click the middle mouse button, it sends a "Middle mouse button pressed" message. Thanks, Sean -- I find that a great part of the information I have was acquired by looking up something and finding something else on the way. -- Franklin P. Adams Sean Reifschneider, Member of Technical Staff <[EMAIL PROTECTED]> tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability
Re: Terminal-based auto-paste.
On Mon, Jul 10, 2006 at 09:26:54AM +0200, Nikolai Weibull wrote: >Well tell them to fix that, or you'll never get access to "* or "+ from Vim. As I said in the previous message, I've already opened a bug request with Fedora about it. It wasn't until late today that I also tested it on Ubuntu. However, as it's still acting differently than other applications in xterms in some ways, I think there's still a case for the original suggestion. Thanks, Sean -- If I wrote a file-system, it would have a super-duper block. -- Sean Reifschneider, 2003 Sean Reifschneider, Member of Technical Staff <[EMAIL PROTECTED]> tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability
Re: Terminal-based auto-paste.
On 7/10/06, Nikolai Weibull <[EMAIL PROTECTED]> wrote: On 7/10/06, Sean Reifschneider <[EMAIL PROTECTED]> wrote: >A new feature in vim would make it work extremely well, using the stock >packages as built in Fedora Core and Ubuntu (neither builds --with-x=yes >in the non-gvim version). Well tell them to fix that, or you'll never get access to "* or "+ from Vim. It is so much easier and predictable to build & install vim from sources youself, (with exactly the features you need), than hunt package-maintiners and expect them to fine-tune binary packages to your inquiries/needs/wishes. Unless you are package-maintiner yourself, why would they follow your preferences rather than, say, their own preferences ? Look like the pat of Sean Reifschneider's problem is that he never tried to build vim from the sources despite the fact that it's very easy. Yakov
Re: Terminal-based auto-paste.
On Sat, Jul 08, 2006 at 01:41:26AM +0200, Nikolai Weibull wrote: >But what's the point? Some characters will already have been inserted >and they won't have had 'paste' set. I fail to see how this is a path >to follow. Absolutely, the first N characters of your text may have been pasted incorrectly if they have newlines or the like. On a local machine, N could be as small as 2 (over 100ms that would represent a typing speed of 600cps, which is pretty snappy). Obviously, it couldn't tell the difference between a high priority process gobbling up a bunch of time while you're typing, a laggy network line between you and vim, and probably other things, but it seems like a lot of the time it would work great. Again, this is like what's already what's implemented in other places in vim, so there seems to be some evidence that it's a workable solution. It would be ideal to do read-ahead and if you have a kilobyte of text sitting there ready to read, it's probably a paste, but that gets you into trouble the read-ahead includes ":sh". Of course, some programs do discard type-ahead text, so it wouldn't be unprecedented, but I agree it would be nice not to. Thanks, Sean -- I have never been able to conceive how any rational being could propose happiness to himself from the exercise of power over others. -- Jefferson Sean Reifschneider, Member of Technical Staff <[EMAIL PROTECTED]> tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability
Re: Terminal-based auto-paste.
On 7/10/06, Sean Reifschneider <[EMAIL PROTECTED]> wrote: A new feature in vim would make it work extremely well, using the stock packages as built in Fedora Core and Ubuntu (neither builds --with-x=yes in the non-gvim version). Well tell them to fix that, or you'll never get access to "* or "+ from Vim. nikolai
Re: Terminal-based auto-paste.
On Mon, Jul 10, 2006 at 07:34:12AM +0200, Pierre Habouzit wrote: >> and that's a workable solution. It's still annoying how clicking and >> selecting text causes vim to move my cursor around and requires me to >> press escape when I'm done selecting. > >maybe you could read :he mouse then (and really do it that time). I've read the help for mouse, selection, and all related things I could find for hours over several weeks. This isn't something that I've just immediately said "Hey, someone else can fix it for me", I've spent probably 8 hours over the last month farting around with trying different things, reading the available documentation, searching on google and the vim site, before I ever posted on this list. If you'd have read this thread nearly as carefully as you are expecting me to have read the documentation, you would know that: The available settings in vim aren't cutting it for me. Yes there are workarounds, none idea, few acceptable, but my original point was... A new feature in vim would make it work extremely well, using the stock packages as built in Fedora Core and Ubuntu (neither builds --with-x=yes in the non-gvim version). I never wanted anyone to help me with fixing it. That's why I posted on the dev list, not the users list. I wanted to register and hopefully discuss a feature request idea. So far, nothing has been said that invalidates the original feature request, the mouse in vim still acts differently under an xterm than under non-vim applications. >it's a pain because you're not used to it, but (1) it works like that in >every terminal-mouse-aware application That's the saving grace is that if I get used to shift left drag to select, it works in other applications. If it didn't, and I had to spend cycles on whether I'm in vim or not to do a selection, I would probably just live with :set paste in vim when I need to do a paste. Converting over to shift-left drag is doable. Still, it would be ideal if it just did what all the other applications do in an xterm. >and (2) you can disable mouse in vim if you don't like it. Obviously. Then I lose the goodness of pastes being handled properly, but I've lived with it that way for 20 years, I can probably continue to do so. >hence the read the damn manual thing: You absolutely misunderstood what I said. Read the damn reply. :-) I know that pastetoggle can be used to map F4 to toggle paste. That's why I said I'm not much of a keymapping person and explained that I'd rather type ":set paste", than hunt around for F4. I can use my mouse to paste while remaining on home row, but F4 breaks my flow more. >ui again. if that's not a shortcut, then bit me. Consider yourself bitten. :-P Again, I'm not looking for a shortcut, I have a way that it could just work, but no time to implement it. BTW: The problem with your shortcut above is that it assumes that I didn't type anything in insert mode other than pasting the text. Often, my pattern is that I type out some stuff, then have something to paste, and undo may do significantly more than just the paste. Is it possible for us to go back to that original discussion, about setting paste in non-X mode, and avoid the misplaced winging about RTFM? I understand it can be frustrating when you think someone has not read the basic documentation, but in this case that is absolutely wrong. Admittedly, I don't know that I'd read about pastetoggle until I saw your original suggestion, but if I haven't read the documentation enough then the documentation is _BROKEN_. Thanks, Sean -- People who interview themselves shouldn't criticize writing styles. -- John Bentley, Programming Pearls Sean Reifschneider, Member of Technical Staff <[EMAIL PROTECTED]> tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability
Re: Terminal-based auto-paste.
Le lun 10 juillet 2006 05:57, Sean Reifschneider a écrit : > On Sat, Jul 08, 2006 at 11:57:48PM +0200, Pierre Habouzit wrote: > >'*' works iff your vim is linked against X. > >same is true for shift right mouse button. > […] > However, I have rebuilt the Fedora Core 6 test 1 RPMs --with-x=yes, > and that's a workable solution. It's still annoying how clicking and > selecting text causes vim to move my cursor around and requires me to > press escape when I'm done selecting. maybe you could read :he mouse then (and really do it that time). > But I can try to remember to > shift-select, which works as I'd like. A pain, but workable and > gives me proper pasting. it's a pain because you're not used to it, but (1) it works like that in every terminal-mouse-aware application and (2) you can disable mouse in vim if you don't like it. > >what you are searching for is : > >:he pastetoggle > > Not really, but thanks for the pointer. I'm not much of a key > mapping person. Typing ":set paste" or ":set nopaste" is no terrible > burden, so that's what I used to do when I had to paste indented > text. hence the read the damn manual thing: set pastetoggle= allow you to toggle between paste and nopaste, so maybe you could make an effort and read the pointers people kindly offers you. if you paste by mistake with paste off, you can: ui again. if that's not a shortcut, then bit me. -- ·O· Pierre Habouzit ··O[EMAIL PROTECTED] OOOhttp://www.madism.org pgponaAqzWPd6.pgp Description: PGP signature
Re: Terminal-based auto-paste.
On Sat, Jul 08, 2006 at 11:57:48PM +0200, Pierre Habouzit wrote: >'*' works iff your vim is linked against X. >same is true for shift right mouse button. The ideal solution for me would be to detect more than X characters received during the last, say, 100ms, and turn on paste then. However, I have rebuilt the Fedora Core 6 test 1 RPMs --with-x=yes, and that's a workable solution. It's still annoying how clicking and selecting text causes vim to move my cursor around and requires me to press escape when I'm done selecting. But I can try to remember to shift-select, which works as I'd like. A pain, but workable and gives me proper pasting. I've submitted a but against FC6 core suggesting that they either build the non-gvim version with X enabled, or provide a third option in the vim-x11 package like "xvim", which is text mode but with X enabled. >what you are searching for is : >:he pastetoggle Not really, but thanks for the pointer. I'm not much of a key mapping person. Typing ":set paste" or ":set nopaste" is no terrible burden, so that's what I used to do when I had to paste indented text. Thanks, Sean -- "Having computers is a lot like having kids, except it's not as much of a problem if they die while you're away." -- Sean Reifschneider, 1997 Sean Reifschneider, Member of Technical Staff <[EMAIL PROTECTED]> tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability
Re: Terminal-based auto-paste.
Le ven 7 juillet 2006 06:23, Sean Reifschneider a écrit : > I haven't been very happy with using vim in an xterm with various > settings of "mouse=", "selectmode=" and others. Part of this may be > that the Fedora build is missing some features related to things like > "* doesn't seem to work, and "shift right mouse button" doesn't set > "paste". '*' works iff your vim is linked against X. same is true for shift right mouse button. > What I'm really looking for is that when I paste using the mouse, > that "paste" is set. I really don't want things like selecting text > to move my mouse, selected text goes into a select buffer in a > different dimention, paste pastes text from a select buffer in that > the "evil me" selected in another dimension, etc... :-) In short, > I'd like to have some way for my cut and pastes in vim to work the > same way they do in other xterm applications, but with the "paste" > option set. what you are searching for is : :he pastetoggle -- ·O· Pierre Habouzit ··O[EMAIL PROTECTED] OOOhttp://www.madism.org pgpLOmhIdKPBm.pgp Description: PGP signature
Re: Terminal-based auto-paste.
On 7/8/06, Sean Reifschneider <[EMAIL PROTECTED]> wrote: It's certainly doable to detect that more than N characters have been "typed" in insert mode in the last M milliseconds though, even if you don't have access to the input buffer. Or am I missing something? But what's the point? Some characters will already have been inserted and they won't have had 'paste' set. I fail to see how this is a path to follow. nikolai
Re: Terminal-based auto-paste.
On Sat, Jul 08, 2006 at 01:43:46AM +0300, Yakov Lerner wrote: >empty based on the size of typeahead buffer. I don't want to >disappoint you. But I believe there is no possibility to automatically >do something based on number of character in the input buffer. It's certainly doable to detect that more than N characters have been "typed" in insert mode in the last M milliseconds though, even if you don't have access to the input buffer. Or am I missing something? In fact, it looks like this is already implemented for "timeout" and "timeoutlen", but in that case it's for mapped keys. >It would probably be useful to tell vim to react only to >MiddleMouse and ignore all other mouse events. This might be Interesting idea. I'll have to play with it, but I suspect that it'll still suffer from "pasted data comes from another dimension". This latter problem may be because of a lacking build option in the Fedora build. Thanks, Sean -- The price of freedom is responsibility, but it's a bargain because freedom is priceless. -- Hugh Downs Sean Reifschneider, Member of Technical Staff <[EMAIL PROTECTED]> tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability
Re: Terminal-based auto-paste.
On 7/8/06, Sean Reifschneider <[EMAIL PROTECTED]> wrote: Probably because for it to work in insert mode you would need to do "set mouse=i". set mouse=a is a superset of set mouse=i nikolai
Re: Terminal-based auto-paste.
On 7/7/06, Sean Reifschneider <[EMAIL PROTECTED]> wrote: On Fri, Jul 07, 2006 at 11:35:41AM +0300, Yakov Lerner wrote: >On 7/7/06, Sean Reifschneider <[EMAIL PROTECTED]> wrote: >>What I'm really looking for is that when I paste using the mouse, that >>"paste" is set. > >How about this > >:map :set paste"*p:set nopaste >and similar thing for imap I believe that's what vim does when you do "set mouse". I would like to be able to do that when I do not have "set mouse", based on number of characters in the input buffer, or characters read in the last 100ms or something. It's interesting idea to detect paste from mouse when 'set mouse' is empty based on the size of typeahead buffer. I don't want to disappoint you. But I believe there is no possibility to automatically do something based on number of character in the input buffer. It would probably be useful to tell vim to react only to MiddleMouse and ignore all other mouse events. This might be possible by setting 'set mouse=' to nonempty and then redefining all mouse events except to s. This might lead you to what you want. To see mouse events that you'll need to redefine: :help <*Mouse If you insist on having 'set mouse' empty, then I believe you're left with one of the following: 1) just ':set paste', or 2) :set nocindent indentexpr= indentkeys= nosmartindent= 3) or some mapping like map :set paste! or some one-key mapping to (2) I personally use (2): absolutely no autoindenting. Yakov
Re: Terminal-based auto-paste.
On Sat, Jul 08, 2006 at 12:10:14AM +0200, Nikolai Weibull wrote: >On 7/7/06, Sean Reifschneider <[EMAIL PROTECTED]> wrote: >>On Fri, Jul 07, 2006 at 06:47:55PM +0200, Nikolai Weibull wrote: >>>OK, so here's what you do: >>> >:map :set paste"*p:set nopaste >>> >>>and >>> >>> :inoremap set paste*set nopaste >> >>That doesn't seem to do the job. I'm not quite sure what you're trying to >>accomplish here, so I can't tell where it's going wrong. > >There should be a in the second line as well, of course. Even with "" in the second line, it's not doing anything that I can see. It probably needs "set mouse=" for it to do anything, and as I said originally, "set mouse" totally doesn't work. >Anyway, how about > > set mouse=a ttymouse=xterm > >? That certainly does something on my terminal. I can't get it to >work correctly in insert mode for some reason, but I really don't care >so I'm leaving it at this. Probably because for it to work in insert mode you would need to do "set mouse=i". However, as I explained originally, "set mouse" totally changes the way paste works from other applications in an xterm, including, you know, not pasting the text I've selected but some other text that came from I know not where. So, my original suggestion stands: Make it so that when vim detects a bunch of data arriving quickly, it sets paste. Thanks, Sean -- A computer scientist is someone who, when told to "Go to Hell," sees the "go to," rather than the destination, as harmful. -- Dr. Roger M. Firestone Sean Reifschneider, Member of Technical Staff <[EMAIL PROTECTED]> tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability
Re: Terminal-based auto-paste.
On 7/7/06, Sean Reifschneider <[EMAIL PROTECTED]> wrote: On Fri, Jul 07, 2006 at 06:47:55PM +0200, Nikolai Weibull wrote: >OK, so here's what you do: > >>>:map :set paste"*p:set nopaste > >and > > :inoremap set paste*set nopaste That doesn't seem to do the job. I'm not quite sure what you're trying to accomplish here, so I can't tell where it's going wrong. There should be a in the second line as well, of course. Anyway, how about set mouse=a ttymouse=xterm ? That certainly does something on my terminal. I can't get it to work correctly in insert mode for some reason, but I really don't care so I'm leaving it at this. nikolai
Re: Terminal-based auto-paste.
On Fri, Jul 07, 2006 at 06:47:55PM +0200, Nikolai Weibull wrote: >OK, so here's what you do: > >>>:map :set paste"*p:set nopaste > >and > > :inoremap set paste*set nopaste That doesn't seem to do the job. I'm not quite sure what you're trying to accomplish here, so I can't tell where it's going wrong. Thanks, Sean -- Passionate hatred can give meaning and purpose to an empty life. -- Eric Hoffer Sean Reifschneider, Member of Technical Staff <[EMAIL PROTECTED]> tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability
Re: Terminal-based auto-paste.
On 7/7/06, Sean Reifschneider <[EMAIL PROTECTED]> wrote: On Fri, Jul 07, 2006 at 11:35:41AM +0300, Yakov Lerner wrote: >On 7/7/06, Sean Reifschneider <[EMAIL PROTECTED]> wrote: >>What I'm really looking for is that when I paste using the mouse, that >>"paste" is set. > >How about this > >:map :set paste"*p:set nopaste >and similar thing for imap I believe that's what vim does when you do "set mouse". I would like to be able to do that when I do not have "set mouse", based on number of characters in the input buffer, or characters read in the last 100ms or something. OK, so here's what you do: >:map :set paste"*p:set nopaste and :inoremap set paste*set nopaste nikolai
Re: Terminal-based auto-paste.
On Fri, Jul 07, 2006 at 11:35:41AM +0300, Yakov Lerner wrote: >On 7/7/06, Sean Reifschneider <[EMAIL PROTECTED]> wrote: >>What I'm really looking for is that when I paste using the mouse, that >>"paste" is set. > >How about this > >:map :set paste"*p:set nopaste >and similar thing for imap I believe that's what vim does when you do "set mouse". I would like to be able to do that when I do not have "set mouse", based on number of characters in the input buffer, or characters read in the last 100ms or something. Thanks, Sean -- Canadian phone sex: What kind of hockey jersey are you wearing? Sean Reifschneider, Member of Technical Staff <[EMAIL PROTECTED]> tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability Back off man. I'm a scientist. http://HackingSociety.org/
Re: Terminal-based auto-paste.
On 7/7/06, Sean Reifschneider <[EMAIL PROTECTED]> wrote: What I'm really looking for is that when I paste using the mouse, that "paste" is set. How about this :map :set paste"*p:set nopaste and similar thing for imap -- untested Yakov