LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 09-20-2002, 07:08 AM   #1
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 346
Blog Entries: 2

Rep: Reputation: 34
Vim not putting tabs in Makefile


Hi,

I was making a small Makefile and I got this error.

Makefile:14: *** missing separator. Stop.

I tried all that I knew and finally found that a tab was put as some spaces by vim. I opened it in pico and inserted a tab and eveything worked fine. Does anyone know how to tell vim to put a tab and not that many spaces?

--Sarin

PS: On a second thought, this should have gone to software or general section . Lets hope acid won't see this .

Last edited by sarin; 09-20-2002 at 07:28 AM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-20-2002, 10:16 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 21,610
Blog Entries: 47

Rep: Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413
If I'm right it's "noexpandtab" or "et" (in vim type ":help et").
In your ~/.vimrc or other resource, add line (w/o quotes):
"set noexpandtab". Don't forget to source it or make an alias or script for it like:alias vim='vim -s<resource> $@'.

I'd say this definately is programming related, tho everyone should benefit from getting to know Vi (better)...
 
1 members found this post helpful.
Old 09-21-2002, 12:37 AM   #3
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 346
Blog Entries: 2

Original Poster
Rep: Reputation: 34
Thanks, It worked.
--Sarin
 
Old 11-18-2011, 08:38 AM   #4
tarkalak
LQ Newbie
 
Registered: Nov 2011
Posts: 1

Rep: Reputation: Disabled
ather way

Add this to .vimrc
It will tell vim to not expand tabs for make regardless of your tab settings.

"This is for setting Makefiles with tabs not spaces
autocmd FileType make setlocal noexpandtab
 
2 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
encryption with Vim (vim -x) mikshaw Linux - Software 2 03-07-2007 09:00 AM
How to modify makefile.in or makefile.am QiangWan Linux - Newbie 1 05-17-2005 11:07 AM
how to get (makefile -f makefile )output into the textview widget in Pygtk sailu_mvn Programming 3 02-28-2005 03:57 AM
vim and makefile melinda_sayang Linux - General 7 06-10-2004 12:16 AM
generate Makefile from Makefile.in without calling ./configure ? chris78 Programming 2 05-02-2004 12:23 PM


All times are GMT -5. The time now is 06:04 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration