News for hackers. Stuff that matters.
Re:An opinionated approach to GNU Make by akdas on Tuesday December 17, 2019 @03:34PM (#21818477)
I have the same setting, but vim automatically sets `noexpandtab` when editing a file named Makefile. I don't have any explicit setting to do that, nor any Makefile-related plugin.
Re:An opinionated approach to GNU Make by alwillis on Tuesday December 17, 2019 @05:52PM (#21819839)
>I have the same setting, but vim automatically sets `noexpandtab` when editing a file named Makefile.

Yes, you can see this in the make filetype plugin in Vim’s $VIMRUNTIME directory, which is usually

    /usr/share/vim/vim81
which contains all of the plugins, syntax definition files, etc. that come with Vim. The file for make is located at

    $VIMRUNTIME/ftplugin/make.vim.
It’s pretty straight forward to override any default behavior you’d like to change; this is a great article on how all of this works [1].

[1]: https://vimways.org/2018/from-vimrc-to-vim/

Re:An opinionated approach to GNU Make by godshatter on Tuesday December 17, 2019 @04:49PM (#21819291)
That's interesting, I didn't know that. I think I might be shooting myself in the foot by saving a session and doing "vim -S" to load it again with expandtab set or something. I load multiple buffers associated with a project and use :b to move from file to file. I know it expands the tab when I move to the Makefile buffer, because I have to kick myself and remember to set noexpandtab when it inevitably puts in spaces. Or maybe putting expandtab in my .vimrc overrides the normal behavior.
Re:An opinionated approach to GNU Make by anoncake on Tuesday December 17, 2019 @05:34PM (#21819676)
I think you need to need to `filetype indent on` and/or `filetype plugin on` in your vimrc.