Thursday, December 3, 2009

More on Text States

A few people have asked me for more information on text states. An anonymous reader contributed the following in the comments of my previous post on the topic.

Using g+ and g- is very different than using u and ^r.

Try following:
* Create new file
* (in normal mode) Type iOne - Esc
* Type oTwo - Esc
* Type oThree - Esc
* Type oFour - Esc
* Type oFive - Esc
* Type 2u
* Type oSix - Esc
* Type oSeven - Esc

Now you have an undo tree with 2 branches. Typing u only goes up the last branch. Using g- goes up by time - branch doesn't matter here.

Have a look in :help usr_32.txt for good explanation of using the undo tree.

Thanks to whomever contributed the tip!

4 comments:

Anonymous said...

I am glad to see that my tip was helpful, Travis.

Anonymous said...

here is a diagram illustrating the example from :help undo-branches

It should hopefully make understanding that example a little easier.

Anonymous said...

This plugin certainly helps navigating undo-branches :).

Lwolverine said...

hey can u please help me how to compress blogger blog..\

this is my
blog

http://www.humortechblog.com

it has size of about 232kb nw.. i hate this //..realy need some help to decrease its size...

p.s my widgets are working fine and other things are good...jst the size...quick help would be really appreciated

email me @ sahlyo@gmail.com pls asap thanx alot