Wikia

Vim Tips Wiki

Changes: Script:3998

Edit

Back to page

(Add signature)
(Standard format and comment.)
 
Line 1: Line 1:
==Request: make text insert atomic for undo/redo and repeating==
+
{{ScriptComments|paredit mode: structured editing of Lisp S-expressions}}
   
  +
==Request: make text insert atomic for undo/redo and repeating==
 
When I use paredit (in Clojure), my insertions of text seem to be broken up into multiple commands, as evidenced by the behavior of undo/redo and repeating (i.e. the <code>.</code> command).
 
When I use paredit (in Clojure), my insertions of text seem to be broken up into multiple commands, as evidenced by the behavior of undo/redo and repeating (i.e. the <code>.</code> command).
   
Line 7: Line 8:
 
<code>(def foo (+ 1 2))</code>
 
<code>(def foo (+ 1 2))</code>
   
...then escape back to normal mode. If I then hit <code>.</code>, I would expect the same text to be inserted again, but instead, only <code>+ 1 2</code> is inserted. In a similar vein, I have to hit `u` (undo) 3 times to fully undo my insert.
+
...then escape back to normal mode. If I then hit <code>.</code>, I would expect the same text to be inserted again, but instead, only <code>+ 1 2</code> is inserted. In a similar vein, I have to hit <code>u</code> (undo) 3 times to fully undo my insert.
   
So, my request is, can you make text insertion atomic with respect to these commands?
+
So, my request is, can you make text insertion atomic with respect to these commands? --[[User:Kyptin|Kyptin]] ([[User talk:Kyptin|talk]]) 16:40, February 17, 2014 (UTC)
  +
:There is a plugin at {{script|id=2136|text=repeat.vim}} which the author of this script might find useful for that, although it requires remapping "<code>.</code>". [[User:JohnBeckett|JohnBeckett]] ([[User talk:JohnBeckett|talk]]) 05:16, February 26, 2014 (UTC)
   
--[[User:Kyptin|Kyptin]] ([[User talk:Kyptin|talk]]) 16:40, February 17, 2014 (UTC)
+
==Comments==

Latest revision as of 05:16, February 26, 2014

Use this page to discuss script 3998 paredit mode: structured editing of Lisp S-expressions

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

Request: make text insert atomic for undo/redo and repeatingEdit

When I use paredit (in Clojure), my insertions of text seem to be broken up into multiple commands, as evidenced by the behavior of undo/redo and repeating (i.e. the . command).

For example, I enter insert mode and insert the following text:

(def foo (+ 1 2))

...then escape back to normal mode. If I then hit ., I would expect the same text to be inserted again, but instead, only + 1 2 is inserted. In a similar vein, I have to hit u (undo) 3 times to fully undo my insert.

So, my request is, can you make text insertion atomic with respect to these commands? --Kyptin (talk) 16:40, February 17, 2014 (UTC)

There is a plugin at repeat.vim which the author of this script might find useful for that, although it requires remapping ".". JohnBeckett (talk) 05:16, February 26, 2014 (UTC)

CommentsEdit

Around Wikia's network

Random Wiki