tisa - Tab Indent Space Align Code
A program that will correct both indentation and alignment.
Status: Planning
Brought to you by:
hlovdal
File | Date | Author | Commit |
---|---|---|---|
doc | 2013-01-27 |
![]() |
[a7ee63] Added GPLv3 document |
test | 2013-01-27 |
![]() |
[33d0bf] vim settings |
.gitignore | 2013-01-27 |
![]() |
[bb60a4] .gitignore: vim swap files |
README | 2013-01-27 |
![]() |
[2acbb0] Added README file |
changelog.txt | 2013-01-27 |
![]() |
[ef8441] Added changelog file |
git-resolve.sh | 2013-01-27 |
![]() |
[f3ae18] git-resolve.sh |
tisa.pl | 2013-01-27 |
![]() |
[9a9eb5] Added --version option |
_______ _____ _____ |__ __|_ _|/ ____| /\ | | | | | (___ / \ | | | | \___ \ / /\ \ | | _| |_ ____) / ____ \ |_| |_____|_____/_/ \_\ tab indent - space align This program will correct source code so that tabs that incorrectly are used for alignment are replaced with a correct number og spaces as well as replacing spaces that are used for indentation with tabs. Example: Let's say the following is the input (where tabs are written as <-----> (or shorter)) int main(int argc, char *argv[]) { int<-><------>i; const int *<->p; puts("Hello world"); return 0; } Here tabs are used to align the comments and that is incorrect since the source code then looks wrong if viewed with a different tab setting than the origial editor. Also forcing a fixed number of spaces for indentation is wrong; each editor should be able to view the source code with his/her personal preference. Running the above program through tisa.pl would give the following result (again with tabs written as <------>): int main(int argc, char *argv[]) { <------>int i; <------>const int * p; <------>puts("Hello world"); <------>return 0; } There is no specific installation needed, just copy tisa.pl to somewhere in your $PATH.