I'd like to have my go files indented with tabs not whitespaces. When I run :set expandtab
then :retab
I get what I want but it automatically switches back to an indentation with whitespaces everytime I save the file.
I am using the vim-go
plugin but I couldn't find anything in the doc/code which could lead to this issue. I have tried changing to setlocal noexpandtab
in ftplugin/go.vim but it didn't work
How can I change this?
Many thanks
Put that in the ~/.vimrc
file to make the settings permanent. Here's a wiki article on this - http://vim.wikia.com/wiki/Indent_with_tabs,_align_with_spaces