On 29.12.14 18:31, Ben Fritz wrote: > On Monday, December 29, 2014 1:32:39 PM UTC-6, Kevin O'Gorman wrote: > > I dunno what happened, I'm still using the same .vimrc I have for years, > > but lately there's > > a glitch when I'm editing a Unix makefile. > > > > When I start to edit the commands for a rule, it uses spaces instead of a > > tab to position > > the command. For makefiles, of course, this is wrong. Vim even knows > > this, and highlights > > the line in red. ... > > What should I look for? What should I fix? > > > > Probably your 'expandtab' option has been set somewhere. You can > figure out where using the command ":verbose set expandtab?" > > Probably, you will need to fix this by creating or adding to an > ftplugin file for makefiles, or use a Filetype autocmd event. Either > way you'll want to "setlocal noexpandtab" for the makefile filetype.
A filetype autocmd sounds quite workable. However, a solution I tend to use is to set "modelines", and then add: # vim:noexpandtab either to the beginning or end of my makefiles. (But then I already have modelines set for other reasons.) Erik -- Remembering is for those who have forgotten. - Chinese proverb -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.