pug, and python are both indent-sensitive languages. I believe that if you have your editor correctly configured this can serve as an advantage, but if it is not correctly configured it's quite a bit of a nuisance. Are there any settings I should have in my vim to make it easy to indent with the correct number of spaces each time I press tab to indent?

  • 4
    For supported fletypes: filetype plugin indent on. That should take care of most nuisances. Aug 22, 2016 at 17:02
  • 2
    This fresh vim issue could be useful.
    – mMontu
    Aug 22, 2016 at 17:24

1 Answer 1


I think expandtab is what you are looking for. It will make tab insert a number of spaces (defined by other options) instead of an actual tab.

See: :h expandtab, :h shiftwidth, :h tabstop, :h softtabstop, and :h filetype-indent. These are all that settings that affect tabs/indentation that I know of.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.