This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-06
Channels
- # aleph (79)
- # bangalore-clj (3)
- # beginners (49)
- # boot (74)
- # cider (10)
- # cljs-dev (21)
- # cljsrn (2)
- # clojure (105)
- # clojure-berlin (1)
- # clojure-brasil (1)
- # clojure-dusseldorf (1)
- # clojure-korea (1)
- # clojure-poland (3)
- # clojure-russia (38)
- # clojure-spec (146)
- # clojure-uk (20)
- # clojurescript (70)
- # cloverage (1)
- # component (1)
- # core-async (23)
- # css (16)
- # cursive (22)
- # datascript (1)
- # datomic (22)
- # defnpodcast (6)
- # emacs (60)
- # events (1)
- # hoplon (94)
- # jobs (1)
- # jobs-rus (13)
- # luminus (11)
- # off-topic (11)
- # om (48)
- # onyx (5)
- # proton (7)
- # re-frame (87)
- # reagent (39)
- # rethinkdb (1)
- # ring-swagger (14)
- # rum (6)
- # specter (14)
- # untangled (105)
- # vim (6)
- # yada (22)
@jfntn, 💥 that works!
you're a ⭐
I guess it pays to actually know some Emacs keybindings when working with Emacs
@eraserhd http://spacemacs.org/ is focused on Evil mode, and some people quite like it, but it's anything but vanilla, it comes heavily customized. For vanilla Emacs I'd suggest https://emacsformacosx.com/ (which is what you get if you "brew cask install emacs" btw), and just enable Evil and any other modes you need.
> maybe lispy
is better than evil
.
This
lispy
provide mode too, insert mode and command mode. but user dont need to toggle it manually. which mode is enabled, depend on the cursor position. if cursor locate before ( or after ), it will be command mode, otherwise insert mode.
evil-cleverparens
gives you things like daf
(delete a form) and dad
(delete a defun)
lispy doesn't cooperate with evil though
@mattly yeah I have mixed feelings about Spacemac’s lispy mode. I can use some improvements. for example - when you yank a sexp, why does it need to stay in the that mode? Does it make sense? To me it doesn’t. Anyway… One of these days I’ll find some time and try cleverparens.
I came directly to spacemacs from vim pretty early in spacemacs developement, and around the time I was learning clojure
I was using vim-paredit or one of those and couldn't keep all the keyboard shortcuts for that in my head
but I also started noticing that the vim paredit stuff relied a lot on chords and the sort of things vimmers make fun of emacs for
I still have a ways to go on using spacemacs's lisp mode properly, but the utility for slurp/barf/wrap/unwrap are undeniable
Does someone have a function for comment line that inserts newline character before the parenthesis, hope this explains what Im after:
(def clojure
| "rocks")
bad:
(def clojure
| ;; "rocks")
wanted:
(def clojure
| ;; "rocks"
)
@doglooksgood looking for something that guarantees a valid sexp after commenting 🙂
I'm writing a plugin for Parinfer on Emacs, https://github.com/DogLooksGood/parinfer-mode I hope it would be the painkiller for lisp's parentheses.😎
ahhh ok, Im starting at the gif on your github page.... trying to see where this fits my paredit world of view, impressed.
Parinfer is not a 100% covered paredit solution, but using with paredit or smartparens, it's very handy.
Ok, I need to look into this, if I could start using the parts I like and discard others.
@doglooksgood symbol void font-lock-flush, something to worry about?
its on, some random warning, probably false alarm on my side. Otherwise I wouldnt know whats missing.
but I guess something needs to be disabled, because if I comment, the parenthesis line up beautifully, but deleting them back causes unbalanced paren error. Probably from paredit?
parinfer-mode disabled aggressive-indent-mode for compatibility reason.
Caution: YES = Indent-mode (Buffer will be modified); NO = Paren-mode, which one? (y or n) n
Parinfer: Paren Mode
parinfer-ext::pretty-parens:paren: Symbol's function definition is void: font-lock-flush
parinfer-mode disabled aggressive-indent-mode for compatibility reason. ignore this line
Caution: YES = Indent-mode (Buffer will be modified); NO = Paren-mode, which one? (y or n) n
This line means, If you enable Parinfer Indent Mode, your buffer will be changed, you can use M-x parinfer-diff
to see the changes.
Parinfer has two modes, in Indent Mode you only care about indentation. and in Paren Mode, you only care about parens.
Paredit should not be enabled directly, and If you want auto pairs, you should switch to Indent Mode. better to test on a demo.clj.
no, looks fine, not sure if I should try to learn this before a music live-coding performance I have next week, where every ms counts. But it looks like it works, only paredit bit annying me, I could disable some of paredit functionality.
but Im curious to see if this still would make editing faster, I do anything for speed!
@hlolli not sure what I have configured (highly unlikely anything other than cider) but it seems that its automatically doing it for me
@verma yes that's right, it does so too for me when manually typing a semicolon before a word. But most of the time I comment with a custom keybinding, I think it comes with emacs, comment-line, and I can have the cursor anywhere on the line and it will find the beginning of the text and add ;;
, the only time I dont use it is when the line ends with a closing bracket with the opening one missing from the line.
I mean, its bit slow when commenting many lines (besides region comment, which also has this limitation) to press down, press left, type ;
, press down press left.. etc...