3

How can I run the vim command ":retab" using a shell script to all the files in the current dir?

1 Answer 1

6

I found something that could help you

for F in *.{c,h}pp ; do vim -c ":retab" -c ":wq" "$F" ; done

This should do what you'd like ;) maybe you'll need to change the for loop condition to your needs

Sign up to request clarification or add additional context in comments.

1 Comment

Glad I could help, don't forget to mark the answer that the thread is solved ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.