From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Thorsten Bonow Newsgroups: gmane.emacs.help Subject: Re: package: iPhone behavior insert . After a word and twice space Date: Sun, 26 Nov 2017 19:53:28 +0100 Message-ID: <87k1ycan2v.fsf@withouthat.org> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1511722532 9904 195.159.176.226 (26 Nov 2017 18:55:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Nov 2017 18:55:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 26 19:55:24 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJ25K-0001s5-1x for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Nov 2017 19:55:22 +0100 Original-Received: from localhost ([::1]:57690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJ25R-00035N-FH for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Nov 2017 13:55:29 -0500 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 44 Original-X-Trace: news.dfncis.de 5AZd3lyuvEDhryo+mSv7aQXz/Vk6wjM05cNH1iph2b1CuWqHchemcRZIC9 Cancel-Lock: sha1:nmKsVl2Dqsa4R+SXaakMrCJIcHc= sha1:QP/T+szQjjsCubpy6MLLzrc4IF0= Original-Xref: usenet.stanford.edu gnu.emacs.help:220995 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115106 Archived-At: >>>>> Uwe Brauer 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