replaced tabs by spaces for some folders with sed script #364

Merged
gaisser merged 3 commits from mueller/first-tabs-to-spaces into development 2021-02-09 14:06:47 +01:00
Owner

I already had mixed up indentation in some other files. Maybe it would be a good idea to use spaces instead of tabs consistently.
Most programming languages use Spaces and there are some other advantages (https://wiki.c2.com/?TabsVersusSpaces).
I used the following sed script to apply the changes per folder:

find . -maxdepth 1 \( -iname *.h -o -iname *.cpp -o -iname *.tpp -o -iname CMakeLists.txt \)  -type f -exec sed -i.orig $'s/\t/    /g' {} +

Or recursively

find . \( -iname \*.h -o -iname \*.cpp -o -iname \*.tpp -o -iname CMakeLists.txt \)  -type f -exec sed -i.orig $'s/\t/    /g' {} +

the -i.orig can be replaced with -i'' to not create backup files.

I already had mixed up indentation in some other files. Maybe it would be a good idea to use spaces instead of tabs consistently. Most programming languages use Spaces and there are some other advantages (https://wiki.c2.com/?TabsVersusSpaces). I used the following sed script to apply the changes per folder: ```sh find . -maxdepth 1 \( -iname *.h -o -iname *.cpp -o -iname *.tpp -o -iname CMakeLists.txt \) -type f -exec sed -i.orig $'s/\t/ /g' {} + ``` Or recursively ```sh find . \( -iname \*.h -o -iname \*.cpp -o -iname \*.tpp -o -iname CMakeLists.txt \) -type f -exec sed -i.orig $'s/\t/ /g' {} + ``` the `-i.orig` can be replaced with `-i''` to not create backup files.
muellerr added the
feature
label 2021-01-28 11:52:53 +01:00
muellerr added 1 commit 2021-01-28 11:52:54 +01:00
muellerr added 1 commit 2021-01-28 11:57:57 +01:00
muellerr added 1 commit 2021-01-28 11:58:29 +01:00
muellerr changed title from replaced tabs by spaces with sed script to replaced tabs by spaces for some folders with sed script 2021-01-28 12:02:23 +01:00
gaisser merged commit bcd51c0725 into development 2021-02-09 14:06:47 +01:00
gaisser deleted branch mueller/first-tabs-to-spaces 2021-02-09 14:06:51 +01:00
gaisser added this to the ASTP 1.0.0 Local pools milestone 2021-02-09 14:10:36 +01:00
Sign in to join this conversation.
No description provided.