Fork me on GitHub
#cider
<
2015-07-13
>
jwm00:07:20

bozhidar: is there a reason ctrl+enter is never used?

jwm00:07:28

I love it in lighttable

jwm01:07:04

(define-key clojure-mode-map (kbd "C-<return>") 'cider-eval-last-sexp-to-repl)

jwm01:07:37

I think I like it just evaluated better for ctrl + enter

jwm01:07:01

stripped -to-repl now that feels really nice

bozhidar05:07:58

it’s not a common Emacs keybinding

bozhidar05:07:26

pretty much all the Lisp modes use C-c C-e/`C-x C-e` and we have to respect this tradition

bozhidar05:07:47

obviously there’s no real stopper to use C-RET for something

bozhidar05:07:20

I’m also thinking of adding some Super and Hyper keybindings in the future

bozhidar05:07:41

as we’re running out of key combos with Control and Meta

bozhidar05:07:55

(Super -> Windows/Command key, Hyper -> Fn key)

malabarba08:07:03

@jvm as it happens, speed-of-thought-clojure uses C-RET. :-)

malabarba08:07:35

But it's not extremely common. The only major mode I can think of that uses it org mode. But I don't think there's any reason not to use it (other than the fact that some people use C-j/m instead of RET).

tsdh11:07:10

@bozhidar: I'd really appreciate not using Super for emacs modes by default. As many users do, I've bound Super for all window manager related things because that's the only left modifier key on my keyboard which surely won't clash with any emacs key.

tsdh11:07:12

@bozhidar: If you're really running out of keys, then an option would be to use Magit's popup dispatch functionality. With the new Magit 2.1.0 release, that has been pulled out into its own package magit-popup to be used by others.

jrychter11:07:13

I also consider my Super and hyper keys to be my personal playground.

bozhidar11:07:23

or well just nest a bit more deeply some things

bozhidar11:07:28

as we did for documentation

bozhidar11:07:34

time will tell

magnars11:07:28

I quite like the magit-popup, since it helps with discoverability while not being in my way - if I know the keybindings, I can press them really fast and not be bothered by the popups

malabarba11:07:45

I don't really see how they would help with the vanishing of keyboard realestate, but they are fantastic for discoverability

malabarba11:07:00

Half of what I know about git I learned from magit's popups

bozhidar11:07:31

btw, here’s one important change for ClojureScript users https://github.com/clojure-emacs/cider/pull/1195#issuecomment-120888507

malabarba11:07:52

hydras should also serve the same benefit, and might be more lightweight (and perhaps easier to setup) than magit's popups

bozhidar11:07:54

All hail the industrious, Artur @malabarba

magnars11:07:05

whoa, that was fast. Well done!

malabarba11:07:10

@bozhidar: 😃

malabarba11:07:48

Though that should come with a "Bugs expected" warning

bozhidar11:07:31

that’s why it’s important to solicit as much testing as possible

bozhidar11:07:21

but that’s definitely a step in making cljs a first-class citizen in CIDER

ericnormand12:07:17

is it possible to set the default indentation in cider-mode?

ericnormand12:07:27

I'd like it to default to 2 space indent

ericnormand12:07:31

instead of lining up arguments

bozhidar12:07:37

indentation is controlled by clojure-mode

bozhidar12:07:41

and yes, it’s possible

bozhidar12:07:16

(defcustom clojure-defun-style-default-indent nil
  "When non-nil, use default indenting for functions and macros.
Otherwise check `define-clojure-indent' and `put-clojure-indent'."
  :type 'boolean
  :group 'clojure
  :safe 'booleanp)

ericnormand13:07:05

yep, that's what I wanted

ericnormand13:07:12

you rock, @bozhidar

jwm15:07:09

I think its kind of ironic to try to be common with emacs when that makes you uncommon with 99% of the rest of the tools of the world hehe

jwm15:07:02

(not being an ass here I just really believe that we should release a common emacs with keybindings everyone else uses)

jwm15:07:27

I did ctrl+enter for evaluate and alt+enter to send line to repl for evaluation

jwm15:07:29

it works nicely

jwm15:07:45

I might do ctrl+shift+enter instead though to kind of match lighttable

jwm15:07:59

I am loving cider / emacs

malabarba15:07:35

> (not being an ass here I just really believe that we should release a common emacs with keybindings everyone else uses) I think there are several of those out there simple_smile

malabarba15:07:45

Anyway, keybinds are the easiest thing to move around. I'm 100% in favor of having an option or a mode that switches Cider's keybinds to care less about Emacs and more about what other IDE's do

gtrak15:07:27

I make all my other ide's conform to what emacs does

gtrak15:07:33

but that's just eclipse

malabarba15:07:28

I'd even write it myself if someone just gave me a table listing cider commands with key used by other IDEs

malabarba15:07:52

@gtrak: and my browsers! simple_smile

jwm15:07:50

actually there is a nice pdf on github and you can generate it also

bozhidar16:07:13

@malabarba: I’m fine with having some ide-style keymap if enough people are really into this

bozhidar16:07:50

or perhaps there should IDEA map, Eclipse map, etc

bozhidar16:07:55

I don’t know

bozhidar16:07:16

I’ve never had much issues switching between IDEs and Emacs

bozhidar16:07:28

mostly because I used emacs keybindings inside them simple_smile

malabarba16:07:59

Yeah, keymaps are cheap.

malabarba16:07:23

I don't really have the time to go and find out the keylist of other editors and then figure out which operations correspond to cider commands. But if someone gives be a list of keys with corresponding cider commands, I can transform it to code in 15 min.

malabarba16:07:44

But then, I guess I'm just pushing the hard part off to someone else. simple_smile

surreal.analysis16:07:07

The big ones I instinctively do now and then are: CMD-Enter to Execute CMD-D to duplicate CMD+<arrow keys> to move text around

jwm16:07:48

I'd want ctrl+s for save, ctrl+c for copy, ctrl+v for paste hehe yes I know of the terminology of yank, kill, and whatever M-w is called ?whack?

malabarba16:07:43

M-w is called copy. simple_smile Boring, right?

malabarba16:07:53

Oh, @jwm You may also want to try ergoemacs

malabarba16:07:15

It does a lot of these common bindings, like C-c, C-s, etc

malabarba16:07:25

And is global to everything in Emacs

voxdolo16:07:48

Is there any way to re-run a test when I'm in a different namespace? I often want run a test, see that it fails, switch to the implementation and make my changes and would love to be able to just re-run the last test from that buffer, rather than having to switch back to the test namespace to run it.

surreal.analysis19:07:51

@voxdolo not as simple as run-last-test, but it seems like you should just be able to run

(clojure.test/test-vars [#'the-ns/the-test])

voxdolo19:07:20

surreal.analysis: looks like you could build a run-last-test with something like that though. I may just have my hand at it. Thanks!