This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-17
Channels
- # announcements (4)
- # aws (17)
- # beginners (108)
- # calva (2)
- # clojure (164)
- # clojure-austin (1)
- # clojure-europe (3)
- # clojure-italy (1)
- # clojure-nl (17)
- # clojure-uk (98)
- # clojurescript (31)
- # code-reviews (1)
- # cursive (23)
- # data-science (1)
- # dirac (6)
- # emacs (21)
- # figwheel-main (1)
- # fulcro (53)
- # graphql (2)
- # hoplon (1)
- # lein-figwheel (1)
- # leiningen (2)
- # lumo (21)
- # off-topic (118)
- # onyx (4)
- # pathom (59)
- # pedestal (2)
- # planck (3)
- # reagent (47)
- # reitit (2)
- # shadow-cljs (258)
- # spacemacs (3)
- # sql (10)
- # tools-deps (37)
anyone know an emacs command to replace single quotes around a text/string with double quotes?
non-evil?
spacemacs, evil mode
emacs or vim
if you place your cursor anywhere on or inside the quotes you can do c s ' "
this is with evil-surround which spacemacs should have
mnemonically it means "change surrounding single quote to double quote"
you can also type '.' after your cursor is on another one and it will repeat the sequence
omg, that’s so cool. it works. Space macs rocks.
I love it
hehe, you mean "emacs rocks" but yes, spacemacs adds a lot of the best packages, makes it look like they made it themselves 🙂.
also evil-surround lets you define your own surround regexps
also, it seems to recognize '
and "
when you do c s '
so you never have to press shift to match the double
what’s a good use case for using regex to replace surrounding delimeters? I am trying to learn more refactoring tricks
Depends on the language, I think evil-surround has the basics for most languages, but if you want custom ones you can add them. Maybe adding common surrounds for tags for example, though I think they have those set up already. I haven't added any, but there's a section in the docs that could shed light
maybe you want to delete a surrounding function and replace with an assignment
in the case of js