This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-09
Channels
- # beginners (91)
- # boot (5)
- # cider (30)
- # clara (16)
- # cljsjs (3)
- # cljsrn (6)
- # clojure (84)
- # clojure-dev (4)
- # clojure-dusseldorf (1)
- # clojure-italy (15)
- # clojure-nl (2)
- # clojure-spec (5)
- # clojure-uk (120)
- # clojurescript (54)
- # core-async (25)
- # core-matrix (1)
- # css (2)
- # cursive (20)
- # datomic (28)
- # editors (11)
- # emacs (6)
- # figwheel (4)
- # figwheel-main (28)
- # fulcro (36)
- # graphql (7)
- # hyperfiddle (2)
- # jobs (6)
- # jobs-discuss (10)
- # lambdaisland (1)
- # lumo (3)
- # nrepl (20)
- # off-topic (24)
- # pedestal (2)
- # protorepl (3)
- # reagent (3)
- # reitit (2)
- # remote-jobs (1)
- # ring-swagger (26)
- # rum (1)
- # shadow-cljs (247)
- # spacemacs (29)
- # tools-deps (12)
- # vim (15)
What made me switch over was seeing a coworker just move real fast with it. Like if I was watching a ninja code lol
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.
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...
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.
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)
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)
and lastly, my life got infinitely better when I learned slurp and barf, since i’m mostly using clojure nowadays.
Made it a point to learn the slurp commands as well and SPC k d x
is one of my faves lol
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
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
You may want the Word
noun instead of word
, ie capitalized includes symbols and all non-whitespace
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.
@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