Re: vim question...
On 6/15/09, Gary Kline kl...@thought.org wrote: the main reason i don't use vim is because of its [u]ndo command. as most of you can understand, there are a whole slew of times when i need to undo something. too often in vim, hitting 'u' --- sometimes once accidentally --- has resulted in a small disaster. [[i have too many current/recent copies of my working files to do TOO much damage!]] Anyway, is there a means of setting the undo key to mimic vi/nvi? From vim help: 2. Two ways of undo *undo-two-ways* How undo and redo commands work depends on the 'u' flag in 'cpoptions'. There is the Vim way ('u' excluded) and the vi-compatible way ('u' included). In the Vim way, uu undoes two changes. In the Vi-compatible way, uu does nothing (undoes an undo). 'u' excluded, the Vim way: You can go back in time with the undo command. You can then go forward again with the redo command. If you make a new change after the undo command, the redo will not be possible anymore. 'u' included, the Vi-compatible way: The undo command undoes the previous change, and also the previous undo command. The redo command repeats the previous undo command. It does NOT repeat a change command, use . for that. ExamplesVim way Vi-compatible way ~ uutwo times undo no-op u CTRL-R no-op two times undo Rationale: Nvi uses the . command instead of CTRL-R. Unfortunately, this is not Vi compatible. For example dwdwu. in Vi deletes two words, in Nvi it does nothing. Anyway this topic is offtopic. -- Paul ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
On Sun, 14 Jun 2009 19:46:45 -0700, Gary Kline kl...@thought.org wrote: the main reason i don't use vim is because of its [u]ndo command. as most of you can understand, there are a whole slew of times when i need to undo something. too often in vim, hitting 'u' --- sometimes once accidentally --- has resulted in a small disaster. [[i have too many current/recent copies of my working files to do TOO much damage!]] Anyway, is there a means of setting the undo key to mimic vi/nvi? Hi Gary, If you accidentally type 'u' in vim, you can redo it by ^R. There is also the set compatible option, but it isn't exactly compatible with the nvi behavior. In nvi, typing 'u' can undo the last operation. Then repeating the undo command with '.' keeps undoing changes until the buffer is reverted to its original state. In vim, with set compatible enabled, typing 'u' repeatedly toggles between the last two states of the buffer. In compatible mode I am not sure of how to undo multiple changes. In set nocompatible mode, typing 'u' repeatedly undoes multiple changes, and typing '^R' multiple times redoes them. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
On Sun, Jun 14, 2009 at 10:51:06PM -0600, Chad Perrin wrote: On Sun, Jun 14, 2009 at 09:18:42PM -0700, Michael K. Smith wrote: On 6/14/09 7:46 PM, Gary Kline kl...@thought.org wrote: the main reason i don't use vim is because of its [u]ndo command. as most of you can understand, there are a whole slew of times when i need to undo something. too often in vim, hitting 'u' --- sometimes once accidentally --- has resulted in a small disaster. [[i have too many current/recent copies of my working files to do TOO much damage!]] Anyway, is there a means of setting the undo key to mimic vi/nvi? If you undo something and it was a mistake, just use the period (.). It's probably better to get in the habit of using :redo than the period to undo an undo, since :redo (or :red for not-very-short) can advance through several levels of undos, but the period can only repeat one single thing over and over again. If you're six levels back in undos, and you want to undo all six levels, but you use the period once, I think that'd wipe out all those levels of undo so they aren't recoverable. Yeah, see, this is exactly my problem. UAually, i just hit 'u' once, check my code, continue. But then I think there may be cap-u ['U'] ... or maybe not. It's only happened three or four times, but that was enough to keep me away from vim! You say that :red can undo 'several' levels without having me dig thru the vim docs, does :reo take an arg, like maybe :redo 5 ? bleah. bill joy had the better idea back in the late 70's with the original vi [IMHO] :_) I haven't directly tested that recently, but that's how I recall it working back when I first learned about multiple undo/redo levels for Vim, lo these many moons ago when the world was young and dinosaurs roamed the Earth. man, i hear THAT! -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] Quoth H. L. Mencken: Democracy is the theory that the common people know what they want and deserve to get it good and hard. -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org For FBSD list: http://transfinite.thought.org/slicejourney.php The 4.98a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
On Mon, Jun 15, 2009 at 09:24:57AM +0200, Paul B. Mahol wrote: On 6/15/09, Gary Kline kl...@thought.org wrote: the main reason i don't use vim is because of its [u]ndo command. as most of you can understand, there are a whole slew of times when i need to undo something. too often in vim, hitting 'u' --- sometimes once accidentally --- has resulted in a small disaster. [[i have too many current/recent copies of my working files to do TOO much damage!]] Anyway, is there a means of setting the undo key to mimic vi/nvi? From vim help: 2. Two ways of undo *undo-two-ways* How undo and redo commands work depends on the 'u' flag in 'cpoptions'. There is the Vim way ('u' excluded) and the vi-compatible way ('u' included). In the Vim way, uu undoes two changes. In the Vi-compatible way, uu does nothing (undoes an undo). 'u' excluded, the Vim way: You can go back in time with the undo command. You can then go forward again with the redo command. If you make a new change after the undo command, the redo will not be possible anymore. 'u' included, the Vi-compatible way: The undo command undoes the previous change, and also the previous undo command. The redo command repeats the previous undo command. It does NOT repeat a change command, use . for that. ExamplesVim way Vi-compatible way ~ uutwo times undo no-op u CTRL-R no-op two times undo Rationale: Nvi uses the . command instead of CTRL-R. Unfortunately, this is not Vi compatible. For example dwdwu. in Vi deletes two words, in Nvi it does nothing. strange, but i just tested dwdw in the nvi that keith bostic gave us. it deletes 2 words. and if you type '.', it repeats the dw by deleting each word. no sense in getting into any 'religious war' over vim vs nvi. it may be what you're used to. i've been using vi for over 30 years and am used to its ease ... and its quirks. gary Anyway this topic is offtopic. -- Paul -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org For FBSD list: http://transfinite.thought.org/slicejourney.php The 4.98a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
On Mon, Jun 15, 2009 at 07:12:01PM +0300, Giorgos Keramidas wrote: On Sun, 14 Jun 2009 19:46:45 -0700, Gary Kline kl...@thought.org wrote: the main reason i don't use vim is because of its [u]ndo command. as most of you can understand, there are a whole slew of times when i need to undo something. too often in vim, hitting 'u' --- sometimes once accidentally --- has resulted in a small disaster. [[i have too many current/recent copies of my working files to do TOO much damage!]] Anyway, is there a means of setting the undo key to mimic vi/nvi? Hi Gary, If you accidentally type 'u' in vim, you can redo it by ^R. There is also the set compatible option, but it isn't exactly compatible with the nvi behavior. In nvi, typing 'u' can undo the last operation. Then repeating the undo command with '.' keeps undoing changes until the buffer is reverted to its original state. Thank you, Giorgos. THIS is what I wanted to know:: In vim, with set compatible enabled, typing 'u' repeatedly toggles between the last two states of the buffer. In compatible mode I am not sure of how to undo multiple changes. In set nocompatible mode, typing 'u' repeatedly undoes multiple changes, and typing '^R' multiple times redoes them. I've saved this to my vimHelp file. gary -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org For FBSD list: http://transfinite.thought.org/slicejourney.php The 4.98a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
On Monday 15 June 2009 12:45:54 Gary Kline wrote: On Mon, Jun 15, 2009 at 07:12:01PM +0300, Giorgos Keramidas wrote: In vim, with set compatible enabled, typing 'u' repeatedly toggles between the last two states of the buffer. In compatible mode I am not sure of how to undo multiple changes. In set nocompatible mode, typing 'u' repeatedly undoes multiple changes, and typing '^R' multiple times redoes them. I've saved this to my vimHelp file. Really, when using new software it's not a bad thing to get familiar with it. This is covered in lesson 2.7 from the vim tutorial, accessible by typing vimtutor in a terminal near you. Running vim in compatible mode, you might as well run vi as it has roughly the same quirks. You won't get the Improved part, when you don't investigate what the software is capable of. The vimtutor is excellent for this and you may still decide that your fingers are too old to get used to the improved stuff, like I'm incapable of learning emacs. -- Mel ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
On Mon, Jun 15, 2009 at 01:14:44PM -0800, Mel Flynn wrote: On Monday 15 June 2009 12:45:54 Gary Kline wrote: On Mon, Jun 15, 2009 at 07:12:01PM +0300, Giorgos Keramidas wrote: In vim, with set compatible enabled, typing 'u' repeatedly toggles between the last two states of the buffer. In compatible mode I am not sure of how to undo multiple changes. In set nocompatible mode, typing 'u' repeatedly undoes multiple changes, and typing '^R' multiple times redoes them. I've saved this to my vimHelp file. Really, when using new software it's not a bad thing to get familiar with it. This is covered in lesson 2.7 from the vim tutorial, accessible by typing vimtutor in a terminal near you. Running vim in compatible mode, you might as well run vi as it has roughly the same quirks. You won't get the Improved part, when you don't investigate what the software is capable of. The vimtutor is excellent for this and you may still decide that your fingers are too old to get used to the improved stuff, like I'm incapable of learning emacs. i first used vim in the mid 90's -- guessing, but your point is well taken. gary PS: if gvim ever evolves into a word-processor, life will be *perfect* ;-) -- Mel -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org For FBSD list: http://transfinite.thought.org/slicejourney.php The 4.98a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
On 6/15/09, Gary Kline kl...@thought.org wrote: On Mon, Jun 15, 2009 at 09:24:57AM +0200, Paul B. Mahol wrote: On 6/15/09, Gary Kline kl...@thought.org wrote: the main reason i don't use vim is because of its [u]ndo command. as most of you can understand, there are a whole slew of times when i need to undo something. too often in vim, hitting 'u' --- sometimes once accidentally --- has resulted in a small disaster. [[i have too many current/recent copies of my working files to do TOO much damage!]] Anyway, is there a means of setting the undo key to mimic vi/nvi? From vim help: 2. Two ways of undo *undo-two-ways* How undo and redo commands work depends on the 'u' flag in 'cpoptions'. There is the Vim way ('u' excluded) and the vi-compatible way ('u' included). In the Vim way, uu undoes two changes. In the Vi-compatible way, uu does nothing (undoes an undo). 'u' excluded, the Vim way: You can go back in time with the undo command. You can then go forward again with the redo command. If you make a new change after the undo command, the redo will not be possible anymore. 'u' included, the Vi-compatible way: The undo command undoes the previous change, and also the previous undo command. The redo command repeats the previous undo command. It does NOT repeat a change command, use . for that. ExamplesVim way Vi-compatible way ~ uutwo times undo no-op u CTRL-R no-op two times undo Rationale: Nvi uses the . command instead of CTRL-R. Unfortunately, this is not Vi compatible. For example dwdwu. in Vi deletes two words, in Nvi it does nothing. strange, but i just tested dwdw in the nvi that keith bostic gave us. it deletes 2 words. and if you type '.', it repeats the dw by deleting each word. no sense in getting into any 'religious war' over vim vs nvi. it may be what you're used to. i've been using vi for over 30 years and am used to its ease ... and its quirks. Nvi is not Vi, and Vim is not Nvi clone. gary Anyway this topic is offtopic. -- Paul -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org For FBSD list: http://transfinite.thought.org/slicejourney.php The 4.98a release of Jottings: http://jottings.thought.org/index.php -- Paul ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
On Mon, 15 Jun 2009 14:22:48 -0700, Gary Kline kl...@thought.org wrote: PS: if gvim ever evolves into a word-processor, life will be *perfect* ;-) If you load a LaTeX file in gvim, it will get ahead of a word processor and evolve into a typesetting system. :-) -- Polytropon From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
On Tue, Jun 16, 2009 at 12:01:17AM +0200, Polytropon wrote: On Mon, 15 Jun 2009 14:22:48 -0700, Gary Kline kl...@thought.org wrote: PS: if gvim ever evolves into a word-processor, life will be *perfect* ;-) If you load a LaTeX file in gvim, it will get ahead of a word processor and evolve into a typesetting system. :-) how about if i use times-roman at 18pt? the last time i tried to set up gvim with proportional fonts, bzzzt, poor results. gary ps: man, good thing i left in all the TeX stuff in my ascii-to-markup stuff. if you're interested in hanving an ascii or iso_8859-1 textfile be turned into LaTeX, the skeleton is there. if you have time, please have a look. -- Polytropon From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org For FBSD list: http://transfinite.thought.org/slicejourney.php The 4.98a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
On Mon, Jun 15, 2009 at 01:00:30PM -0700, Gary Kline wrote: Yeah, see, this is exactly my problem. UAually, i just hit 'u' once, check my code, continue. But then I think there may be cap-u ['U'] ... or maybe not. It's only happened three or four times, but that was enough to keep me away from vim! U executes a number of undos in one shot. I've never felt the need to use it, though, so I'm not very familiar with how it works. You say that :red can undo 'several' levels without having me dig thru the vim docs, does :reo take an arg, like maybe :redo 5 ? That won't work. Ctrl-R is a synonym for :redo, though, and if you precede Ctrl-R with a number, it'll undo that many changes. bleah. bill joy had the better idea back in the late 70's with the original vi [IMHO] :_) I feel like the original vi is insufficient for my needs, but that Vim's development doesn't exactly match my preferences. FreeBSD's nvi seems to have moved in exactly the right direction from the original vi, but not far enough for my needs. As a result, I'm pretty much stuck with Vim for now. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] Quoth Yasir Arafat on religious wars: You're basically killing each other to see who's got the better imaginary friend. pgpOmWEpB5aK8.pgp Description: PGP signature
Re: vim question...
On Mon, Jun 15, 2009 at 11:41:34PM +0200, Paul B. Mahol wrote: Nvi is not Vi, and Vim is not Nvi clone. I thought that was self-evident. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] Quoth Steve McConnell: Good code is its own best documentation. As you're about to add a comment, ask yourself, 'How can I improve the code so that this comment isn't needed?' pgphTqXa39Off.pgp Description: PGP signature
Re: vim question...
On Mon, Jun 15, 2009 at 05:44:04PM -0600, Chad Perrin wrote: On Mon, Jun 15, 2009 at 01:00:30PM -0700, Gary Kline wrote: I feel like the original vi is insufficient for my needs, but that Vim's development doesn't exactly match my preferences. FreeBSD's nvi seems to have moved in exactly the right direction from the original vi, but not far enough for my needs. As a result, I'm pretty much stuck with Vim for now. the one extension that nvi has--and the only feature added was :wn; joy's original didn't have this. as for vim, from what i can glean from the docs, it does everything but pay its own taxes. ---the important thing is that we don't get into a spitball-throwing contest over which editor is better! gary -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] Quoth Yasir Arafat on religious wars: You're basically killing each other to see who's got the better imaginary friend. -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org For FBSD list: http://transfinite.thought.org/slicejourney.php The 4.98a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
vim question...
the main reason i don't use vim is because of its [u]ndo command. as most of you can understand, there are a whole slew of times when i need to undo something. too often in vim, hitting 'u' --- sometimes once accidentally --- has resulted in a small disaster. [[i have too many current/recent copies of my working files to do TOO much damage!]] Anyway, is there a means of setting the undo key to mimic vi/nvi? thanks, gary -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org For FBSD list: http://transfinite.thought.org/slicejourney.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
Hi, Gary On Sun, Jun 14, 2009 at 10:46 PM, Gary Klinekl...@thought.org wrote: the main reason i don't use vim is because of its [u]ndo command. as most of you can understand, there are a whole slew of times when i need to undo something. too often in vim, hitting 'u' --- sometimes once accidentally --- has resulted in a small disaster. [[i have too many current/recent copies of my working files to do TOO much damage!]] Anyway, is there a means of setting the undo key to mimic vi/nvi? thanks, gary I don't know what the keybindings for [u]ndo in Vim versus Vi/Nvi are, but there was a recent thread about Vi keybindings for .vimrc. Perhaps that'll provide some insight. Cheers. -- Glen Barber ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
On Sun, Jun 14, 2009 at 11:00:59PM -0400, Glen Barber wrote: Hi, Gary On Sun, Jun 14, 2009 at 10:46 PM, Gary Klinekl...@thought.org wrote: the main reason i don't use vim is because of its [u]ndo command. as most of you can understand, there are a whole slew of times when i need to undo something. too often in vim, hitting 'u' --- sometimes once accidentally --- has resulted in a small disaster. [[i have too many current/recent copies of my working files to do TOO much damage!]] Anyway, is there a means of setting the undo key to mimic vi/nvi? thanks, gary I don't know what the keybindings for [u]ndo in Vim versus Vi/Nvi are, but there was a recent thread about Vi keybindings for .vimrc. Perhaps that'll provide some insight. Cheers. -- Glen Barber hi glenn, yeah, i read the recent posts about the key binding and vim; that's what brought my question to the fore. i did read on the evolution list that a gvim plugin may happen. the main reason i use mutt is that my fingers know vi. unfortunately, there're too many things in email now that require a gui reader. be nice to be able to read in evo and if i had to reply, use gvim. gary -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org For FBSD list: http://transfinite.thought.org/slicejourney.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
On Sun, Jun 14, 2009 at 11:18 PM, Gary Klinekl...@thought.org wrote: hi glenn, One 'n'. :) yeah, i read the recent posts about the key binding and vim; that's what brought my question to the fore. i did read on the evolution list that a gvim plugin may happen. the main reason i use mutt is that my fingers know vi. unfortunately, there're too I use mutt because it sucks less, quoting the author. many things in email now that require a gui reader. be nice to be able to read in evo and if i had to reply, use gvim. Hmm Well, for what it's worth, I didn't even know *vi* had an 'undo' option. I thought that was what 'q!' was for. :) I'm as interested as you are now. -- Glen Barber ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
On Sun, Jun 14, 2009 at 11:24:29PM -0400, Glen Barber wrote: On Sun, Jun 14, 2009 at 11:18 PM, Gary Klinekl...@thought.org wrote: hi glenn, One 'n'. :) gotcha! and see, this is a case of my occasionally typing 1 key. in vim, typing 'uu' can cause a truckload of code or whatever to vanish. ... [ ... ] use mutt is that my fingers know vi. unfortunately, there're too I use mutt because it sucks less, quoting the author. be nice if there were a quasi-gui version of mutt many things in email now that require a gui reader. be nice to be able to read in evo and if i had to reply, use gvim. Hmm Well, for what it's worth, I didn't even know *vi* had an 'undo' option. I thought that was what 'q!' was for. :) that's almost funny; i have had to use q! all to often if i forget and use vim. it does indeed have some nice features. but if you have to reply using a gui mailer and your typing isn't flawlwss, it's keyboard - mouse. I'm as interested as you are now. -- Glen Barber -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org For FBSD list: http://transfinite.thought.org/slicejourney.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
On 6/14/09 7:46 PM, Gary Kline kl...@thought.org wrote: the main reason i don't use vim is because of its [u]ndo command. as most of you can understand, there are a whole slew of times when i need to undo something. too often in vim, hitting 'u' --- sometimes once accidentally --- has resulted in a small disaster. [[i have too many current/recent copies of my working files to do TOO much damage!]] Anyway, is there a means of setting the undo key to mimic vi/nvi? thanks, gary If you undo something and it was a mistake, just use the period (.). Mike ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: vim question...
On Sun, Jun 14, 2009 at 09:18:42PM -0700, Michael K. Smith wrote: On 6/14/09 7:46 PM, Gary Kline kl...@thought.org wrote: the main reason i don't use vim is because of its [u]ndo command. as most of you can understand, there are a whole slew of times when i need to undo something. too often in vim, hitting 'u' --- sometimes once accidentally --- has resulted in a small disaster. [[i have too many current/recent copies of my working files to do TOO much damage!]] Anyway, is there a means of setting the undo key to mimic vi/nvi? If you undo something and it was a mistake, just use the period (.). It's probably better to get in the habit of using :redo than the period to undo an undo, since :redo (or :red for not-very-short) can advance through several levels of undos, but the period can only repeat one single thing over and over again. If you're six levels back in undos, and you want to undo all six levels, but you use the period once, I think that'd wipe out all those levels of undo so they aren't recoverable. I haven't directly tested that recently, but that's how I recall it working back when I first learned about multiple undo/redo levels for Vim, lo these many moons ago when the world was young and dinosaurs roamed the Earth. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] Quoth H. L. Mencken: Democracy is the theory that the common people know what they want and deserve to get it good and hard. pgpUEQPgDuua5.pgp Description: PGP signature
Re: vim question...
On Sun, Jun 14, 2009 at 11:51 PM, Gary Klinekl...@thought.org wrote: On Sun, Jun 14, 2009 at 11:24:29PM -0400, Glen Barber wrote: On Sun, Jun 14, 2009 at 11:18 PM, Gary Klinekl...@thought.org wrote: hi glenn, One 'n'. :) gotcha! and see, this is a case of my occasionally typing 1 key. in vim, typing 'uu' can cause a truckload of code or whatever to vanish. ... Agreed. :) [ ... ] use mutt is that my fingers know vi. unfortunately, there're too I use mutt because it sucks less, quoting the author. be nice if there were a quasi-gui version of mutt Interesting idea many things in email now that require a gui reader. be nice to be able to read in evo and if i had to reply, use gvim. Hmm Well, for what it's worth, I didn't even know *vi* had an 'undo' option. I thought that was what 'q!' was for. :) that's almost funny; i have had to use q! all to often if i forget and use vim. it does indeed have some nice features. but if you have to reply using a gui mailer and your typing isn't flawlwss, it's keyboard - mouse. I've found that 'q!' is now muscle-memory to me. When I'm actually in front of a GUI, the Gmail/Firefox spellcheck tends to find most of my typographical mistakes, though unfortunately, not my logic mistakes. :) -- Glen Barber ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org