I use do auto indenting follow lines that begin with python keywords in Vim using this command.
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,...
Is there a way to do a “smartoutdent” for keywords like return or break?
Thanks.
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.
I use:
and it automatically back-indents after statements such as
return,breakandcontinue.I’m not sure if all are necessary, or if it meets your requirements of “smartoutdent”, but perhaps it will help.