LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 01-07-2012, 01:55 AM   #1
temp2012temp
LQ Newbie
 
Registered: Jan 2012
Posts: 11

Rep: Reputation: Disabled
How can I avoid expanding tab into sapces when editing makefile.


After googling,I get to know that if I add
filetype plugin on
into my vimrc,vim will verify different file type.

I search $VIMRUNTIME/filetype.vim and found out:
" Makefile
au BufNewFile,BufRead *[mM]akefile,*.mk,*.mak,*.dsp setf make

Then I looked into $VIMRUNTIME/ftplugin/make.vim and found out:
" Make sure a hard TAB is used, required for most make programs
setlocal noexpandtab softtabstop=0

In coclusion, when editing makefile,vim should not expand tab.But it did.I don't know why. All I want is to avoid expanding tab into sapces when editing makefile.
Any help will be appreciated!


Here is my vimrc:

set nocompatible
syntax on
set expandtab
set tabstop=4
set shiftwidth=4
set autoindent
set cindent
set nu
set diffexpr=MyDiff()
set nobackup
filetype plugin on
 
Old 01-07-2012, 02:16 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I avoid expanding tab into sapces when editing makefile. temp2012temp Linux - Software 1 01-07-2012 02:47 AM
[SOLVED] how to avoid using expandtab in vim when editing makefile temp2012temp Linux - Newbie 3 01-07-2012 02:45 AM
LXer: Avoid latency while editing remote files using bcvi LXer Syndicated Linux News 0 07-11-2008 11:11 PM
editing a makefile scotoma Linux - Newbie 2 10-03-2004 01:50 PM
editing makefile ahjamm Linux - Software 2 10-25-2003 11:59 AM


All times are GMT -5. The time now is 06:58 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration