Fork me on GitHub
#emacs
<
2017-02-09
>
tianshu02:02:08

when using cider, sometime M-x cider-connect RET <my-host> RET, It will prompt for input password.

tianshu02:02:56

but sometimes It will prompt for input port. only this case works.

rabbitthirtyeight03:02:31

I've only seen the prompts for the host and the port. Is it asking for the password to an SSH key or something?

tianshu06:02:55

If I use lein repl :connect <host>:<port>, it will works. I don't think it need password. the cider-connect use ssh instead of direct connect to the nrepl server?

hkjels07:02:27

@qqq looks like there’s almost feature-parity indeed, but with more vim-like bindings I guess. If I’d start fresh today, I would defiantly give it a shot

sooheon08:02:24

@qqq @hkjels I’d put in a word for lispy, which is not exactly evil+paredit, but paredit if it was designed to be modal (in a different way from evil, but orthogonal enough that they can easily work together). If vi is a language for editing text, I think of lispy as a DSL for editing lisps. It’s easier to understand as you use it, but to me it is the tree editor that was promised.

qqq08:02:20

@sooheon : lispy, is that the one where certain keys have special meaning if you're right before a ( or right after a ) ?

qqq08:02:36

the idea being, you never want to type j( or k(, so if you're right in front of a (, and you type j or k, interpret it special ?

sooheon08:02:11

Yep that’s it. It has intuitive keys for navigating across those |( or )| points, and editing.

sooheon08:02:26

As well as selecting symbols of course

qqq08:02:28

actualy, I found t's notion of forward/backward/up/down very confusing 😞

qqq08:02:42

how do you use it, with evil or without evil?

sooheon08:02:49

It works well with evil because I and A in normal mode can take you to |( or )| very easily

sooheon08:02:14

I use it with evil, it’s pretty much second nature to me.

qqq08:02:25

here's something I could never get it to work with lispy (and I spent a good two days configuring it)

sooheon08:02:33

Try looking at some of abo-abo’s example usages. They’re really enlightening

qqq08:02:40

I want h/l to move me to the nearest-left and nearest-right (

qqq08:02:49

and I want j/k to move me to the ( on the prev/next line

sooheon08:02:10

Don’t forget that f and b exist as well.

sooheon08:02:16

As well as d

sooheon08:02:37

for Forward-sexp, Backward, and Different-paren

sooheon08:02:05

Yep those demos.

sooheon08:02:40

I think that prev/next line is a less useful way to think of it than parent/sibling, which hjkl navigate

sooheon08:02:07

Visually, f/b work well, as well as q, a, -

qqq08:02:39

alot of the time the issue is: 1) I'm looking at a place on my screen (not where my cursor is) 2) I want to move my cursor there 3) hjkl makes sense, but thikning of "parent/nesting" not so much

sooheon08:02:35

Fair enough. In that case, q a - should help. I think a lot of the rest of the time, you’re thinking “I want to move up in this if expression” or “I want to go to the other clause”

sooheon08:02:14

Anyways, if you’re interested, the demos do a better job of selling than I could just yapping :)

qqq08:02:50

well, the demos don't talk back to me

sooheon08:02:15

Haha yeah I’m happy to proselytize

sooheon08:02:04

Other keys of interest: g G m 2spc 3spc 4spc C-9 C-8

qqq08:02:29

so a number of things that I find confusing about h/l suppose I Have:

(let [a1 ...
    a2 ...]
  (b1 ...)
  (b2 ...)
  (b3 ...))
a very common thing I want to do is place cursor on a1, then move down to a2, then move down to b1, then b2, then b3 /// and if I try to move with forward/backward sexp, I have to get on the right sexp, then I have to hit l which is weird when my brain says "dude, we want to move to next line"

sooheon08:02:31

To do what you just said, I’d just be pressing j j j

sooheon08:02:00

If I want to edit a2, I’d press a to select a2, delete, then type

sooheon08:02:57

If after selecting a2, (i.e. it’s marked), I decide not to edit it, and I want to get to b1, I’d probably do hmj

sooheon08:02:05

Which puts the cursor just before the b1 paren

qqq08:02:06

you know what you could do to really convince me and would also convince lots of other people?

qqq08:02:01

write a elisp module, which does the following: it records the sequence of the last 20 evil/paredit commands I'm editing; then it finds subsequences that can be optimized, and say "dude, this took you 15 strokes; in lispy, the following 4 strokes are equiv"

qqq08:02:11

BAM BAM BAM, maybe people converted overnight

sooheon08:02:30

bahaha yeah that’s a great idea

qqq08:02:36

s/maybe/many/

qqq08:02:46

this is not maybe ocnvert people; this is definite convert many people

qqq08:02:58

I probably have really shitty lispy habits, which is why I find lispy hard to use

sooheon08:02:13

yeah I’ll say it again, try some of the demos ;)

qqq08:02:17

if it could look at my edits, get a diff, and compute the optimal lispy solution, I'd learn lispy faster and also realize it's full power

sooheon08:02:23

I didn’t grok lispy until I tried a few of them

qqq08:02:31

yeah, currently watching #4; will try them after done watching

sooheon08:02:59

But yes, that’s a great idea which if I can’t do I’ll try to persuade the package author to try :)

qqq08:02:42

my dev machine has 8 cores; I am willing to let lispy use 7 of them to watch me code / teach me better editing skills

sooheon09:02:56

Hey after demo 4, I recommend demo 2 it’s pretty great