This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-18
Channels
- # alda (8)
- # aws (1)
- # bangalore-clj (1)
- # beginners (55)
- # boot (114)
- # capetown (2)
- # cljs-dev (51)
- # cljsjs (1)
- # cljsrn (14)
- # clojure (119)
- # clojure-belgium (6)
- # clojure-brasil (9)
- # clojure-conj (2)
- # clojure-greece (1)
- # clojure-korea (2)
- # clojure-poland (12)
- # clojure-russia (64)
- # clojure-spec (12)
- # clojure-uk (60)
- # clojurescript (159)
- # code-reviews (2)
- # component (4)
- # core-matrix (2)
- # cursive (79)
- # datascript (7)
- # datomic (2)
- # defnpodcast (4)
- # events (2)
- # hoplon (13)
- # jobs (2)
- # lein-figwheel (1)
- # off-topic (10)
- # om (42)
- # onyx (60)
- # pedestal (5)
- # perun (7)
- # rdf (4)
- # re-frame (4)
- # reagent (21)
- # ring-swagger (25)
- # schema (1)
- # spacemacs (52)
- # specter (1)
- # utah-clojurians (1)
- # yada (5)
What’s the preferred way to wrap something in paired delimiters, like quotes or parens? I think I can get evil-mode’s visual mode to select it, although W
seems to overshoot by also grabbing the space at the end
I have something like
SESSION_TOKEN = os.environ.get(AWS_SESSION_TOKEN)
… and I want to wrap the AWS_SESSION_TOKEN
in double quotes.for one, there is an “argument” text object which is a plugin in vim but built into spacemacs
for info on how to use it http://blog.carbonfive.com/2011/10/17/vim-text-objects-the-definitive-guide/
another thing you can do (what I’ve done for certain major modes like clojure) is redine what a word
is
for example, in clojure there are many things named like name-of-function
so dia
na|me-of-function
gives you -of-function
if you redefine the hyphen as a part of a word instead of a word delimiter you can treat the whole thing as one word instead of messing with WORD
which can cause other problems like in the example you showed
I’m not sure if this would be wise for python because I don’t really use it too much, but it is an option
@lvh: For wrapping in paired delimiters, I first enter them (for example ""), then put the point on the second delimiter, SPC k s
to slurp
I write Clojure, though, so our modes may differ 🙂
is there a way to keep smart parens from toggling itself off when completing something with yassnippet?
@chris Yeah the word redefinition makes sense; I think a similar thing would work well for Python as well
@reefersleep That’s how I used to do it with regular emacs
@lvh are you hungry for a more efficient solution? 🙂
btw, I notice the magit lag too, but I've only ever tried spacemacs, so I have no comparison. ~1 second to render for me
cool!
(defun modify-lisp-syntax ()
(modify-syntax-entry ?- "w")
(modify-syntax-entry ?_ "w"))