Fork me on GitHub
#spacemacs
<
2016-11-18
>
lvh03:11:28

Has anyone noticed magit being ridiculously slow, for some reason only in spacemacs?

lvh03:11:58

Takes SPC g s about 2s of drawing-thread-blocking, which is really annoying.

lvh04:11:13

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

lvh04:11:45

vWgS does something totally weird; like add newlines

lvh04:11:19

Looks like that might be the S part

lvh04:11:35

v/, almost works, except it includes the comma

lvh04:11:18

I have something like

SESSION_TOKEN = os.environ.get(AWS_SESSION_TOKEN)
… and I want to wrap the AWS_SESSION_TOKEN in double quotes.

chris04:11:19

in that specific instance I would do vi(s”

lvh04:11:36

I guess that works; I didn’t start out with the parens though

lvh04:11:41

but I guess I can put the parens in first

lvh04:11:58

I was kind of hoping that the was a UPPER_SNAKE_CASE word object

lvh04:11:27

also, I dunno if you know python but I have some lines that come with a default

lvh04:11:35

SECRET_ACCESS_KEY = os.environ.get(AWS_SECRET_ACCESS_KEY,  "SOME_SECRET_ACCESS_KEY’)

lvh04:11:43

(so going for the paren pair doesn’t work)

chris04:11:53

oh sorry, I misunderstood. there are a few things that could work

chris04:11:16

for one, there is an “argument” text object which is a plugin in vim but built into spacemacs

chris05:11:29

another thing you can do (what I’ve done for certain major modes like clojure) is redine what a word is

chris05:11:21

for example, in clojure there are many things named like name-of-function so dia na|me-of-function gives you -of-function

chris05:11:20

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

chris05:11:35

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

reefersleep08:11:26

@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

reefersleep08:11:56

I write Clojure, though, so our modes may differ 🙂

naomarik10:11:01

is there a way to keep smart parens from toggling itself off when completing something with yassnippet?

naomarik10:11:24

for instance when i autocomplete a let smartparens gets toggled off

lvh14:11:34

@chris Yeah the word redefinition makes sense; I think a similar thing would work well for Python as well

lvh14:11:43

@reefersleep That’s how I used to do it with regular emacs

reefersleep14:11:49

@lvh are you hungry for a more efficient solution? 🙂

lvh14:11:11

Nope; just trying to learn 🙂

reefersleep14:11:15

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

lvh14:11:48

It’s instant in regular emacs

lvh14:11:52

I think it might be the powerline

lvh14:11:58

I’ll profile it

lvh14:11:10

btw, how do I show the current available commands in lisp mode?

lvh14:11:15

? is unavailable

lvh14:11:18

h is movement

lvh14:11:22

SPC is unbound

lvh14:11:26

same goes for visual mode I guess

chris14:11:02

if I’m understanding what you’re asking

chris14:11:51

you’re asking about bindings right?

lvh14:11:31

oh boy f1

lvh14:11:44

this is where I get confused by my new touch bar

lvh14:11:27

f1 does appear to be the thing, thanks 😄

chris14:11:52

(defun modify-lisp-syntax ()
  (modify-syntax-entry ?- "w")
  (modify-syntax-entry ?_ "w"))

chris14:11:30

that’s how I’ve changed word. this changes both the hyphen and the underscore

chris14:11:33

and it’s bound in a few different lisp hooks (clojure, elisp and racket iirc)

PB20:11:45

So I feel like an absolute idiot, but it seems that paredit mode isnt’ enabled by default and I have to set it on each buffer. What is the correct way to do this (my first day using spacemacs)

chris21:11:53

the paredit that comes with spacemacs is smartparens and you enable it by adding hooks

chris21:11:34

so (add-hook ‘clojure-mode-hook ‘smartparens-mode)