Fork me on GitHub
#spacemacs
<
2018-08-14
>
Chase20:08:10

what is the equivalent to vim-commentary? I would be able to select lines of text and then just hit gc and it would comment or uncomment the text. super useful and i imagine there is something equivalent built in or readily available.

Chase20:08:48

also how do you folks prefer to move through your buffers more quickly than my current spc b b and then fuzzy search through the list?

cjsauer21:08:24

@chase-lambert visual select (`v` / V) and then gc works for me. For buffer switching, I like to use [ b to go backwards, and then ] b to go forward. If that doesn't get me there in 1-2 hops, I like using SPC p f to fuzzy search files.

cjsauer21:08:29

To toggle commenting for the line your cursor is on you can do gcc

spfeiffer21:08:27

Ugh, did not know about gc, i used dwim-comment command

eggsyntax21:08:42

I tend to do SPC c l for commenting lines.

spfeiffer21:08:00

SPC SPC dwim-comment

spfeiffer21:08:19

So many ways 😂

🙂 4
eggsyntax21:08:23

Buffer switching I mostly do by project by SPC p h (`helm-projectile`). Or SPC b b if it's not a project buffer.

Mario C.21:08:00

Can't you also use #_ to comment out Clojure blocks?

Mario C.21:08:07

expressions*

eggsyntax21:08:36

Yes, to comment out sexps (which can be as small as a single token, eg #_foo). That's my method of choice for commenting in clj/s.

cjsauer21:08:45

SPC b b is good for quick-swapping to a buffer. The [ b and ] b commands are actually part of a larger "suite" of semantics. For example, ] e can be used to swap lines of code up and down, [ w can swap between windows, and I think ] q can be used to jump back and forth between errors in your buffers.

cjsauer21:08:25

(Finally remembered the Tim Pope plugin where these hotkeys come from: https://github.com/tpope/vim-unimpaired)

👍 4
cjsauer21:08:52

] SPC is another good one for opening new lines before/after the cursor

spfeiffer21:08:16

They all work out of the box in spacemacs?

cjsauer22:08:32

@spfeiffer yep, I believe they come with evil mode