9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: dexen deVries <dexen.devries@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] in ed, how to do i do this?
Date: Fri, 17 Jun 2011 17:17:52 +0200	[thread overview]
Message-ID: <201106171717.52862.dexen.devries@gmail.com> (raw)
In-Reply-To: <BANLkTikB4fUEt5LiQ_Dgv3=oZTfRJrnUSg@mail.gmail.com>

On Friday 17 of June 2011 16:55:41 Fernan Bolando wrote:
> 2. indent a line - i usually retype the whole line.


to indent several lines, you could do
1) set dot to range, like 1,5
2) s,^, ,g

(a tab between second and third coma)

but that'd indent the empty ones too :(

you want

1) set dot to range, like 1,5
2) s,^.,        &,g

(a tab between second coma and the ampersand)
the `g' means `do it for every line, rather than just the first one'

-- 
dexen deVries

[[[↓][→]]]

For example, if the first thing in the file is:
   <?kzy irefvba="1.0" rapbqvat="ebg13"?>
an XML parser will recognize that the document is stored in the traditional 
ROT13 encoding.

(( Joe English, http://www.flightlab.com/~joe/sgml/faq-not.txt ))



  parent reply	other threads:[~2011-06-17 15:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17 14:55 Fernan Bolando
2011-06-17 15:04 ` yy
2011-06-17 15:07   ` Fernan Bolando
2011-06-17 15:08     ` John Floren
2011-06-17 15:22     ` Bakul Shah
2011-06-17 15:26       ` Fernan Bolando
2011-06-17 15:27       ` dexen deVries
2011-06-17 16:18       ` Skip Tavakkolian
2011-06-17 16:31         ` dexen deVries
2011-06-17 15:11 ` dexen deVries
2011-06-17 15:17 ` dexen deVries [this message]
2011-06-17 22:38   ` Mauricio CA
2011-06-18  1:05     ` Rob Pike
2011-06-19 14:11       ` Thomas
2011-07-04  0:58         ` Josh Marshall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201106171717.52862.dexen.devries@gmail.com \
    --to=dexen.devries@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).