8

Let's say I'm editing my config file and there is a very long string like this:

(setq my-string "very\nlong\nstring [...] \"hello world\"")

How do edit the string without the escape characters (and maybe in a different mode) and than save the result back in the config file with the escape characters?

allikotsa
  • 115
  • 4

1 Answers1

9

You can use the package string-edit for that purpose.

Essentially, it does exactly what you want: simply call string-edit-at-point to edit the string at point, then C-c C-c to return to the original buffer.

The documentation on github includes a demonstration (if the link appears to be dead, please see the github page directly).

T. Verron
  • 4,283
  • 2
  • 24
  • 56