all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thorsten Bonow <thorsten.bonow@withouthat.org>
To: help-gnu-emacs@gnu.org
Subject: Re: package: iPhone behavior insert . After a word and twice space
Date: Sun, 26 Nov 2017 19:53:28 +0100	[thread overview]
Message-ID: <87k1ycan2v.fsf@withouthat.org> (raw)
In-Reply-To: mailman.4578.1511709783.27995.help-gnu-emacs@gnu.org

>>>>> Uwe Brauer <oub@mat.ucm.es> writes:

> Mi iphone has the nice feature that if I press space quickly twice after a
> word it inserts a . Since it is considered as a end of sentence.

> Does anybody now about a Emacs package providing this functionality?

Hi,

one solution would be "key chord" from EmacsWiki[1].  Quick and dirty:

(require 'key-chord "/usr/local/share/emacs/site-lisp/key-chord.el")
(key-chord-mode 1)
(defun my-insert-dot ()
  "Insert \".\" at point, moving point forward"
  (interactive)
  (insert "."))
(key-chord-define-global (kbd "SPC SPC") 'my-insert-dot)

There is a discussion on the page about a 'small hack to define a key-chord
starting with space'.

The Vi emulation package for GNU Emacs 'Viper' has 'timeout macros' that make
binding a key pressed twice to a macro possible.  My guess is that the Vim
emulation package "Evil"[2] must offer something similar.

I'm using 'viper' but only 'key-chord' for combinations of key-strokes.  Works
for me.

Hope this helps.

Toto


Footnotes: 
[1]  https://www.emacswiki.org/emacs/KeyChord

[2]  https://github.com/emacs-evil/evil

-- 
"A Korean newspaper wrote that Aachen University is the MIT of Europe."
Burkhard Rauhut / "Anything that's the something of something isn't
really the anything of anything." Lisa Simpson



       reply	other threads:[~2017-11-26 18:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.4578.1511709783.27995.help-gnu-emacs@gnu.org>
2017-11-26 18:53 ` Thorsten Bonow [this message]
2017-11-26 20:57   ` package: iPhone behavior insert . After a word and twice space Uwe Brauer
2017-11-26 15:22 Uwe Brauer
2017-11-26 19:29 ` Uwe Brauer
     [not found] ` <mailman.4600.1511724569.27995.help-gnu-emacs@gnu.org>
2017-11-26 20:27   ` Thorsten Bonow
2017-11-26 20:53     ` Uwe Brauer
2017-11-26 21:28     ` Hi-Angel
2017-11-26 23:21       ` Emanuel Berg
2017-11-27  4:56         ` Hi-Angel
2017-11-28 20:36           ` Emanuel Berg
2017-11-26 22:06 ` Emanuel Berg

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=87k1ycan2v.fsf@withouthat.org \
    --to=thorsten.bonow@withouthat.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.