Fortran shift left/right
[Back]
The comment lines are unaffected and the first
5 columns remain in same position.
Fortran shift left
start=$selection_start
end=$selection_end
deselect-all()
i=start
while(get_character(i)!= "\n")
i--
while(i<end-1) {
a=get_character(++i)
if (a!="c" && a!="C" && a!="\n") {
l=0
while(get_character(i+l)!="\n" && l<6)
l++
i=i+l
if (l>5) {
if (get_character(i)==" "){
set_cursor_pos(i)
delete-next-character()
end=end-1
}
}
}
while(get_character(i)!="\n")
i++
}
select(start,end)
set_cursor_pos(end)
Fortran shift right
start=$selection_start
end=$selection_end
deselect-all()
i=start
while(get_character(i)!= "\n")
i--
while(i<end-1) {
a=get_character(++i)
if (a!="c" && a!="C" && a!="\n") {
l=0
while(get_character(i+l)!="\n" && l<6)
l++
i=i+l
if (l>5) {
set_cursor_pos(i)
insert_string(" ")
end+=1
}
}
while(get_character(i)!="\n")
i++
}
select(start,end)
set_cursor_pos(end)
[Back]
Released on Wed, 21 Nov 2001
by
C. Denat
|