From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jai Dayal Newsgroups: gmane.emacs.help Subject: Re: Need Help: insert tab(8 characters) for every tabstroke Date: Mon, 8 Aug 2011 15:41:19 -0600 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=002618876fb2e96a6d04aa054fe7 X-Trace: dough.gmane.org 1312839718 4254 80.91.229.12 (8 Aug 2011 21:41:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 8 Aug 2011 21:41:58 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: amit mehta Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 08 23:41:53 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QqXZz-0006kG-Qa for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Aug 2011 23:41:47 +0200 Original-Received: from localhost ([::1]:42686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqXZz-0001yh-9R for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Aug 2011 17:41:47 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:50476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqXZu-0001yb-Bo for help-gnu-emacs@gnu.org; Mon, 08 Aug 2011 17:41:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqXZs-0004Wq-TN for help-gnu-emacs@gnu.org; Mon, 08 Aug 2011 17:41:42 -0400 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:47464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqXZs-0004Un-Nh for help-gnu-emacs@gnu.org; Mon, 08 Aug 2011 17:41:40 -0400 Original-Received: by wwf10 with SMTP id 10so2710237wwf.30 for ; Mon, 08 Aug 2011 14:41:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=e1xH8HC8KjRM5Pd46pzhsZB0F1fUebQkVCoWga9CRGA=; b=Qleoqvh413vFDP1d5yqqYx4IMcUNXW1uvnREULBHcSe280nbVLMt6Ntx+k8UOMXT8A QdOs0tCSyh+2zDIAFJ5W/YduaHSsgudQOgQmhvyXilgojRbb3McWwAGA0SXZec5JAnV5 9tu3UjT9WOuEB5p4M+PbZcFlc4+KohoEcFRo0= Original-Received: by 10.216.120.147 with SMTP id p19mr591812weh.75.1312839699097; Mon, 08 Aug 2011 14:41:39 -0700 (PDT) Original-Received: by 10.216.37.197 with HTTP; Mon, 8 Aug 2011 14:41:19 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.49 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81909 Archived-At: --002618876fb2e96a6d04aa054fe7 Content-Type: text/plain; charset=ISO-8859-1 Try fiddling with c-set-style http://www.phys.ufl.edu/docs/emacs/emacs_254.html Here's a list of built in c-styles http://www.delorie.com/gnu/docs/emacs/cc-mode_24.html On Mon, Aug 8, 2011 at 8:05 AM, amit mehta wrote: > I'm a complete n00b and hence please don't shower your wrath upon me. > I'm finding it little difficult to use TABS in my 'C' programs. I've been a > vim > user till last week and have slowly started to migrate towards mighty > emacs. > In vim, I usually indent my code with tabs, where each tab stroke replaces > the > cursor by 8 columns, but in an emacs buffer, a tab stroke doesn't work this > way by default. I did some text search and based on that, have added the > following line under $HOME/.emacs: > > (setq indent-tabs-mode t) > > but this doesn't work(i mean, hitting the TAB key on my keyboard doesn't > move forward the cursor to 8 columns to the right), so every time i need a > TAB, > I've to use C-q . this is overkill. > > Then I tried putting just this entry in $HOME/.emacs, but this too doesn't > work > (setq default-tab-width 8); > > > Please help. > > -amit > > --002618876fb2e96a6d04aa054fe7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Try fiddling with c-set-style

http://www.phys.ufl.edu/docs/emacs/emacs_254.html

Here's a list of built in c-styles

http://www.delorie.com/gnu/d= ocs/emacs/cc-mode_24.html

On Mon, Aug 8, 2011 at 8:05 AM, amit mehta <= span dir=3D"ltr"><gmate.amit@gma= il.com> wrote:
I'm a complete n00b and hence please don't shower your wrath upon m= e.
I'm finding it little difficult to use TABS in my 'C' programs.= I've been a vim
user till last week and have slowly started to migrate towards mighty emacs= .
In vim, I usually indent my code with tabs, where each tab stroke replaces = the
cursor by 8 columns, but in an emacs buffer, a tab stroke doesn't work = this
way by default. I did some text search and based on that, have added the following line under $HOME/.emacs:

(setq indent-tabs-mode t)

but this doesn't work(i mean, hitting the TAB key on my keyboard doesn&= #39;t
move forward the cursor to 8 columns to the right), so every time i need a = TAB,
I've to use C-q <tab>. this is overkill.

Then I tried putting just this entry in $HOME/.emacs, but this too doesn= 9;t work
(setq default-tab-width 8);


Please help.

-amit


--002618876fb2e96a6d04aa054fe7--