I like format all my code using tab instead of space, but I just want to convert spaces to tabs at the beginning of each lines.
Can tabify just convert space to tabs at the beging of lines?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The documentation for
tabifymentions a suitable value for operating on line-leading whitespace only. I used it to write this function which I find handy, but you could just set it in your init file and forego a separate function: