vim: remove previous code indentation and convert to another
- by ramgorur
I have a c project with multiple files (more than 100), the codes are written in Whitesmiths style, but I want to change them into K&R style indentation. Is it possible to do using vim in an automated way ?
For example I have a emacs-lisp script to achieve this --
(progn
(find-file "{}")
(mark-whole-buffer)
(setq indent-tabs-mode nil)
(untabify (point-min) (point-max))
(indent-region (point-min) (point-max) nil)
(save-buffer))
I was wondering if there is a similar trick that could be done with vim.