Monday, December 29, 2014

Re: Makefile editing slightly broken

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. 
>
> If I add lines after existing commands it gets the indentation right, perhaps because it copies the indentation of the previous line.
>
>
>
>
>
>
>
> 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.

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment