4 ms·
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 Make
by akdas 7y ago
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.
- godshatter 7y agoThat'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.
- anoncake 7y agoI think you need to need to `filetype indent on` and/or `filetype plugin on` in your vimrc.
- alwillis 7y ago>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/ https://vimways.org/2018/from-vimrc-to-vim/