LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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, 07:04 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,485

Rep: Reputation: 51
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, 07:31 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Posts: 3,366
Blog Entries: 33

Rep: Reputation: 216Reputation: 216Reputation: 216
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, 07:39 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,485

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

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

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
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, 04:08 AM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,485

Original Poster
Rep: Reputation: 51
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09:17 AM
I have made a mistake. Don't know what to do? muasif80 Linux - Newbie 13 10-06-2008 07:36 PM
I made a mistake :( Megatog615 Slackware 11 04-15-2006 02:22 AM
I made a mistake! Need help now jcksrobbins Mandriva 8 08-30-2003 11:17 PM
I made a mistake need help here ikw38 Linux - Networking 4 06-16-2003 02:06 PM


All times are GMT -5. The time now is 05:03 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration