|
From: | Luke Hoersten |
Subject: | Re: Tabs for Indent and Spaces for Align |
Date: | Wed, 22 Oct 2008 13:27:17 -0500 |
;; use only spaces for alignment
(defun align-with-spaces (beg end)
"Align selected using only spaces for whitespace."
(interactive "r")
(let (tabs-mode (indent-tabs-mode))
(setq indent-tabs-mode nil)
(align beg end)
(setq indent-tabs-mode tabs-mode)))
I use only tabs for indenting while programming with 'indent-tabs-mode'.
Also while programming I use 'align' to line up variables etc. Align uses tabs and spaces to align to tab-stops and I just want it to use spaces.
"align
lines up text in selected region, using whitespaces (or tabs) as the column delimiter"
-- http://www.emacswiki.org/emacs/AlignCommands
I'm looking for a way to use only tabs for indentation while using only spaces for alignment.On Wed, Oct 22, 2008 at 8:40 AM, Nikolaj Schumacher <me@nschum.de> wrote:
"Luke Hoersten" <luke@hoersten.org> wrote:I don't quite understand when you want to use either. Do you want to
> I've been Googling around for quite some time and have been unable to find a
> way to use tabs for indentation and spaces for alignment ('M-x align'). I
> know how to set emacs to use either spaces or tabs. I've got tabs only right
> now for indentation (for work standards) but I don't want to use the mix tab
> + spaces for alignment.
use tabs when programming and spaces when writing text?
regards,
Nikolaj Schumacher
[Prev in Thread] | Current Thread | [Next in Thread] |