General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Traveller
Mastery Learning
comments
Comments by "Traveller" (@traveller23e) on "Linus Torvalds: TABS vs SPACES Debate in Kernel Development" video.
@AlexanderNecheff Taking a look at `:h =` I just found something interesting: ``` ={motion} Filter {motion} lines through the external program given with the 'equalprg' option. When the 'equalprg' option is empty (this is the default), use the internal formatting function |C-indenting| and |'lisp'|. But when 'indentexpr' is not empty, it will be used instead |indent-expression|. When Vim was compiled without internal formatting then the "indent" program is used as a last resort. ``` Not sure how exactly that go-fmt command is called, but it may work just by setting it to equalprg in your config somewhere. The same should be true for any other autoformatters. It appears there are ways to have a project-specific vimrc (in case settings based on language aren't enough), but it does carry with it a security risk as if you do a git clone of a repo with such a file there's potential to execute malicious code.
1
Remember not to exceed 80 characters though, so choose your function names carefully.
1
most text editors are configurable though, and that's sort of the point. Different devs can choose whatever width they like.
1