Re: Makefile indentation with spaces for line continuation

2006-06-18 Thread John Orr
Thanks Gerald, and others - think I might settle for a) keeping expandtab enabled, b) remap to insert a real tab, ie, imap ^Q^I (^Q instead of ^V since for better and worse I use mswin.vim on windows) c) "set list" to be able to see the tab characters, thus also setting listchars like set li

Re: Makefile indentation with spaces for line continuation

2006-06-16 Thread Gerald Lai
On Fri, 16 Jun 2006, John Orr wrote: [snip] Another alternative might be to enable expandtab (to get the spaces) and enter the tab characters explicitly - is there any easy way of inserting a tab character when expandtab is enabled? Yes. In Insert mode, you could either (a) hit Ctrl-v follo

Re: Makefile indentation with spaces for line continuation

2006-06-16 Thread Russell Bateman
I was unable to figure out how to do that. As the last line of my Makefile.am I always put: # vim: set tabstop=4 shiftwidth=4 noexpandtab: since, by default, these guys around me (I'm the new guy) like expandtab which, as you know, is problematic for makefiles. Best, Russ John Orr wrote:

Re: Makefile indentation with spaces for line continuation

2006-06-16 Thread John Orr
Thanks Eric. I don't know that I explained myself that well - if the code is this: foo.o : foo.c the command to build foo.o starts here but \ the command is long then vim's syntax highlighting will flag an error if the backslash is lost, because this is invalid: foo.o : foo.c the command

Re: Makefile indentation with spaces for line continuation

2006-06-15 Thread Eric Arnold
If you want to flag errors, why not use highlighting? Actually, the makefile syntax I'm seeing already highlights correct backslashes. So, in general, you know there is an error if the code/text isn't colored right. I don't see a way to tell Vim to indent with tabs sometimes and not others. On

Makefile indentation with spaces for line continuation

2006-06-15 Thread John Orr
Hi, I'm currently implementing a make system with GNU Make and have been trying for a while to work out how to get the indentation working as I would like it to. I believe it is reasonably standard when editing makefiles to set noexpandtab such that tabs are inserted when you start the commands