From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: amit mehta Newsgroups: gmane.emacs.help Subject: Re: Need Help: insert tab(8 characters) for every tabstroke Date: Tue, 9 Aug 2011 10:26:08 +0530 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1312865781 10982 80.91.229.12 (9 Aug 2011 04:56:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 9 Aug 2011 04:56:21 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Jai Dayal Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 09 06:56:17 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 1QqeMS-0005SU-BY for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Aug 2011 06:56:16 +0200 Original-Received: from localhost ([::1]:35019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqeMS-0003xY-0Y for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Aug 2011 00:56:16 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqeMM-0003x5-W0 for help-gnu-emacs@gnu.org; Tue, 09 Aug 2011 00:56:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqeML-0001AI-Fc for help-gnu-emacs@gnu.org; Tue, 09 Aug 2011 00:56:10 -0400 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:62445) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqeML-00019q-BF for help-gnu-emacs@gnu.org; Tue, 09 Aug 2011 00:56:09 -0400 Original-Received: by wwf10 with SMTP id 10so2881148wwf.30 for ; Mon, 08 Aug 2011 21:56:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=22i0GSU1S9EGng48XMKyJG1zgP8bbJnHCLWf27LnP4w=; b=pi0pqK8vMudZQaQl3lRNhEbRQ9U0AJTwyxq8C2hE2vHTadvkgWcObE664zt8fkQprT dDsT6hK0+Nl5anHMXBm4PZGuowkB2XgvszBzDVzgFxGJltarjfJMIfiaY15TwMCIxKPG aETpSH6KSX5Yb6NK/UZXHx/0Ly6Hu5Qzr6TXY= Original-Received: by 10.216.74.7 with SMTP id w7mr5219601wed.37.1312865768343; Mon, 08 Aug 2011 21:56:08 -0700 (PDT) Original-Received: by 10.216.168.200 with HTTP; Mon, 8 Aug 2011 21:56:08 -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:81915 Archived-At: On Tue, Aug 9, 2011 at 3:11 AM, Jai Dayal wrote: > 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 >> > > Thank you very much. This one very much solved my issue: http://www.delorie.com/gnu/docs/emacs/cc-mode_39.html -amit