Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Apr 2009 10:10:05 +0200 (CEST)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-chat@FreeBSD.ORG
Subject:   Re: Why??  (prog question)
Message-ID:  <200904020810.n328A5Gl008622@lurza.secnetix.de>
In-Reply-To: <49D4011F.5080003@utoronto.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
William Gordon Rutherdale wrote:
 > [...]  I don't think I've ever written the word "dedent" in my 
 > life, at least until this paragraph.  In fact, I'm not convinced
 > that it IS a word.

It's a technical term, sometimes used in the context of
code editors to denote the opposite of indent.
For example, suppose I have this in my editor:

def somefunction (myargs):
    if somecondition:
        return 42

The cursore is behind the "42".  Now I press <Enter>,
and the cursor goes to column 8 in the next line, right
below the "r" of the return command.  This feature is
called auto-indent.  Now I press the <Backspace> key
*once*, and the cursor goes back four positions so it
is below the "i" of the if command.  This feature is
called dedent.

It doesn't actually matter whether those positions are
represented with tabs or spaces internally.  In fact
I don't *want* to know.  The editor should do the right
thing if it is configured correctly.

Regarding the "modern editors" that I mentioned:  These
features existed in editors 15 years ago already, so my
definition of "modern" is not that narrow.  Also, most
incarnations of vi support these features today, but
there are a few exceptions (for example, /usr/bin/vi on
Solaris is a little bit brain-damaged, but you can
easily install vim from a package).

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"Perl will consistently give you what you want,
unless what you want is consistency."
        -- Larry Wall



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904020810.n328A5Gl008622>