Forum OpenACS Q&A: offtopic: vim question...

Collapse
Posted by David Kuczek on
I have three quick question using vim:

1. How can I reverse changes that I have undone with "u"? For example
when I have undone changes accidentally and want them to reappear...

2. How can I move a block of text x spaces to the left or right (indent)?

3. Is there a setting that auto indents tcl and html code?

Thanks

Collapse
Posted by José Agustín Válgoma Solanas on
1.- Undo/redo (answer to your first question):
Undo/Redo commands
N  u            undo N last changes
N  CTRL-R       redo N last undone changes
   U            restore last changed line
Collapse
Posted by Roberto Mello on
2. Select the block of text with "V" and your arrows (or direction keys) and hit "=". ("=" in one line will indent that line)

3. Uncomment "set autoindent" in your /usr/share/vim/vimrc (or in your ~/.vimrc). You can test before modifying by doing ":set autoindent".