LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-15-2010, 06:04 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
Vi/vim: undoing after a mistake has made vi cancel my changes to the buffer.


Hi: perhaps I've been typing for 20m and, in command mode, I accidentally press a key that undoes all of my work. What would be one of the more elementary undo commands? Regards.
 
Old 12-15-2010, 06:31 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,657
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
u

Lower case u undoes last change

From the Vi Cheat Sheet.

dl the .pdf here...

http://www.kcomputing.com/vi.html

Hope this helps, Regards Glenn
 
1 members found this post helpful.
Old 12-15-2010, 06:39 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
It's been very kind of you, Glenn. Greetings,

Enrique.
 
Old 12-16-2010, 02:48 AM   #4
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Hi stf92,

<CTRL>+<r> = redo, this means the "undo" are undone.

One can also leave vim immediately without saving with :q! or ZZ

Markus
 
Old 12-16-2010, 03:08 AM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
I see. About :q! I already knew. Also about :qa and :qa! (quit all files). It's a great thing that vim's help files, whose location vim has the kindness of pointing out, are plain ascii text files, by the way. Ajd one can even use grep to skim through them. Thank you, Markus.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] undoing a mistake on the command line... oznola Linux - Newbie 2 05-15-2010 08:17 AM
I have made a mistake. Don't know what to do? muasif80 Linux - Newbie 13 10-06-2008 06:36 PM
I made a mistake :( Megatog615 Slackware 11 04-15-2006 01:22 AM
I made a mistake! Need help now jcksrobbins Mandriva 8 08-30-2003 10:17 PM
I made a mistake need help here ikw38 Linux - Networking 4 06-16-2003 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration