Hi,
I have the following code (TCL):
if { 0 } {
set foo bar
if {1} {
puts "by"
if {1} {
puts "hi"
}
}
set foo bar
}
I would like to reindent the file so it look like this:
if { 0 } {
set foo bar
if {1} {
puts "by"
if {1} {
puts "hi"
}
}
set foo bar
}
This is what I currently have relating to indent and stuff in my .vimrc:
set tabstop=4
set shiftwidth=4
set autoindent
set expandtab
I tried to use =G but it makes my text look like this:
if { 0 } {
set foo bar
if {1} {
puts "by"
if {1} {
puts "hi"
}
}
set foo bar
}
It doesn't seem to understand the nested if statements in my code. Is there a
way to do this in Vim?
Any help would be appreciated.
Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---