unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jiri Pejchal <xpejchal@fi.muni.cz>
Subject: Re: How can I do these in Emacs?
Date: Sat, 19 Apr 2003 14:39:04 GMT	[thread overview]
Message-ID: <qlc4r4uv9fb.fsf@nymfe04.fi.muni.cz> (raw)
In-Reply-To: 87y926nclf.fsf@thalassa.informatimago.com

Pascal Bourguignon <spam@thalassa.informatimago.com> writes:

> > 1. How can I do something like a "o" command in vi with Emacs?  I
> >    always C-e to the end of the line and press RET.  Are there any
> >    faster ways?
> 
> (defun open-line-a-la-vi ()
>     (interactive)
>     (forward-line)
>     (open-line (or prefix-arg 1)))
> (global-set-key "\C-o" 'open-line-a-la-vi)

Thanks! That's cool.

What about this:
(defun open-line-a-la-vi ()             
     (interactive)              
     (forward-line)
     (open-line (or prefix-arg 1))
     (indent-according-to-mode))   ;;and indent too
(global-set-key "\C-o" 'open-line-a-la-vi)

Jiri Pejchal

  reply	other threads:[~2003-04-19 14:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-19  5:53 How can I do these in Emacs? wang yin
2003-04-19  7:46 ` Alan Mackenzie
2003-04-19  7:57 ` Pascal Bourguignon
2003-04-19 14:39   ` Jiri Pejchal [this message]
2003-04-19  8:08 ` Eli Zaretskii
2003-04-19 19:08 ` Stefan Monnier
2003-04-19 19:32   ` David Kastrup
2003-04-19 21:40     ` Stefan Monnier
2003-04-22  0:20       ` Jason Earl
2003-04-22 14:16         ` Stefan Monnier
     [not found] ` <mailman.4924.1050736232.21513.help-gnu-emacs@gnu.org>
2003-04-21 17:36   ` David Masterson
2003-04-21 20:49     ` Kevin Rodgers

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=qlc4r4uv9fb.fsf@nymfe04.fi.muni.cz \
    --to=xpejchal@fi.muni.cz \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).