4

I need to write the following line of code:

((eq item #\") (do-this...))

But everytime I type ", I get "". I've read the paredit.vim doc file but it's not clear how to insert a single pair character (be it ", (, or [), and whether doing it breaks paredit for that function. Any experts have a way around this?

bgibson
  • 17,379
  • 8
  • 29
  • 45

2 Answers2

8

I'm the author of Slimv. I have fixed this problem, so after \ the " character is not doubled. Please fetch the latest paredit.vim from the Slimv repository: https://bitbucket.org/kovisoft/slimv/

Tamas Kovacs
  • 1,495
  • 7
  • 9
  • Awesome, thank you! One more thought, would it make sense to do the same for the paren () and bracket [] characters too? I haven't yet needed to escape them in code the same way, probably even more of an edge case, but maybe useful nonetheless? – bgibson Apr 21 '11 at 05:00
  • 2
    Yes, you are right, so I have added the same handling for escaped () and [] characters as well. – Tamas Kovacs Apr 25 '11 at 13:28
4

Type ,( to toggle the paredit mode in SLIMV before typing the character. Source: slimv.vim.

Similar in emacs, where you can use C-q followed by the character to insert a single pair character literally without activating the paredit key it is bound to. Source: emacswiki.

Terje Norderhaug
  • 3,649
  • 22
  • 25
  • 2
    In most terminals you have to use `` instead of `` because `` means «continue» there (with `` meaning «stop updating terminal window with new output»). – ZyX Apr 20 '11 at 03:37