This question already has an answer here:
I am working on a
js file, using
eslint as my linter with the ale plugin, configured using the
airbnb standard which mandates 2 space indentation.
When I open a new line by hitting
o, the new line is indented with 4 spaces, regardless of the filetype. I have set
tabstop=4, but I want this to change for
js files according the the rules of my linter.
What have I tried
Searching the net, and adding
filetype on and
filetype plugin on to my
How can I set the indentation to automatically suit the current file type?