Fork me on GitHub
#spacemacs
<
2018-08-09
>
Mario C.16:08:08

How long did it take y'all to get pretty comfortable in (spac)emacs?

Mario C.16:08:31

What made me switch over was seeing a coworker just move real fast with it. Like if I was watching a ninja code lol

eggsyntax16:08:20

I think you never stop learning & growing & getting faster. Where would I tag that as "comfortable"? I dunno. I think I stopped tripping over things constantly within a week or two. But I was already a vim user, so I didn't have to relearn all the basic bindings.

eggsyntax16:08:58

The classic answer is:

Mario C.16:08:49

I guess in about ten years Ill be moving comfortably

eggsyntax16:08:38

Were you already comfortable in vi? That def changes the learning curve a lot. It helps if you periodically dedicate some time to actively improving your skills with it, an hour here & a half-hour there...

Mario C.16:08:30

ESC : q was about all I knew

kah0ona14:08:18

I learnt vim 4 years ago or something, it took me a few weeks to get reasonably fast. Then I added a few commands at the time. A year ago I moved from Vim to Spacemacs, so I ‘only’ had to learn the space commands. The combination is gold. Check some youtube video’s on vim bindings/tips, and when you see something interesting, write it on a post-it.

kah0ona14:08:38

Few things that improved my speed bigtime, was the moment I used these commands: ciw/ci[/ci( (cut-inner-block/paragraph/parens/), f+<a letter> to search in the line and quickly jump to it. Also I like the buttons #, % and * (resp. search word under cursor backwards, go to matching closing bracket under cursor, and search word under cursor forwards)

kah0ona14:08:17

good luck on your journey, and remember also to get rid of anti-patterns asap, ie. using j/k continuosly to scroll large area’s. Getting rid of anti patterns is almost as important as learning new commands, but it kind of goes hand in hand (learning new command removes an anti pattern often)

kah0ona14:08:36

and lastly, my life got infinitely better when I learned slurp and barf, since i’m mostly using clojure nowadays.

kah0ona14:08:50

SPC k b / SPC k s

kah0ona14:08:26

just now reading that one post by Yan Pritzker. That’s a great one yes.

Mario C.15:08:53

Yea ciw/ci[/ci<anything> has been game changer for me as well.

Mario C.15:08:14

Made it a point to learn the slurp commands as well and SPC k d x is one of my faves lol

kah0ona17:08:56

ah, i mostly do c i ( rather than SPC k d x, but the space command is probably better when i want to stay in that mode

Mario C.16:08:10

Definetly getting better with it though

Mario C.16:08:29

I have a cheatsheet open when i am editing

eggsyntax16:08:46

So yeah, might be a little while 😉 I HIGHLY recommend reading this short article to understand the vim philosophy; it made all the difference in the world to me: https://yanpritzker.com/learn-to-speak-vim-verbs-nouns-and-modifiers-d7bfed1f6b2d?gi=570fcb6d9e80

Mario C.16:08:43

This is a good one, thanks

eggsyntax16:08:25

Maybe you deleted your comment? But saw it in notifications -

eggsyntax16:08:56

You may want the Word noun instead of word, ie capitalized includes symbols and all non-whitespace

Mario C.16:08:48

Yea I figured out how to do it. ctSPACE or dtSPC

Mario C.17:08:04

But dW also works

Chase22:08:01

where do i find the equivalent to vim-surround commands? is that part of lisp mode? i'm still learning all the slurp and barf stuff. does that kind of allow the same stuff? yeesh, that is not an attractive way to talk about code refactoring.

👍 4
practicalli-johnny13:08:16

@U9J50BY4C In Vim insert mode, you can just select the text you want to wrap, C-SPC and press the opening character to wrap the text with. From Vim normal mode, you can call the smartparents wrap function if you want to wrap a word with (), Place the cursor on the word to wrap then press SPC k w. This also puts you into lisp mode, so you can wrap again with just w, or unwrap with W. The list mode uses smartparents, just gives you a specific state to do it all in, reducing keystrokes. As lisp state is evilified, then you can use vim power for doing multiple tasks. For example, in lisp state if you have 3 words to wrap in parens, you could move the cursor to the first and press w 2 s. This would wrap the first word and slurp twice to bring the next two words inside. Not sure how to wrap with another character, e.g. {} for maps or [] for vectors. I am starting to put more examples of vim approaches in lisp state here: https://practicalli.github.io/spacemacs/structured-editing/lisp-state.html

Chase15:08:38

oh wow, this is some good stuff! Thank you!