This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-08
Channels
- # aws (9)
- # beginners (69)
- # boot (14)
- # cider (26)
- # cljs-dev (56)
- # cljsrn (9)
- # clojars (4)
- # clojure (229)
- # clojure-brasil (1)
- # clojure-france (11)
- # clojure-greece (2)
- # clojure-italy (4)
- # clojure-mke (6)
- # clojure-serbia (6)
- # clojure-spec (83)
- # clojure-uk (38)
- # clojurescript (171)
- # core-async (3)
- # cursive (11)
- # data-science (11)
- # datomic (27)
- # emacs (113)
- # funcool (6)
- # hoplon (4)
- # jobs (1)
- # luminus (13)
- # lumo (44)
- # off-topic (148)
- # onyx (5)
- # overtone (1)
- # pedestal (4)
- # powderkeg (1)
- # proton (2)
- # re-frame (150)
- # reagent (16)
- # ring-swagger (43)
- # spacemacs (4)
- # specter (36)
- # vim (4)
- # yada (10)
Anyone using Evil mode? I'm looking for a package/mode that defines text objects for lisp forms.
What I end up using mostly is expand-region, which works well for this purpose
@pesterhazy Do you use any paredit-like mode? I can't decide on which one seems best.
yeah there's almost too many
paredit, smartparens, lispy
Spacemacs comes with smartparens so I use that mostly
I most use slurp, barf, (un)wrap, splice-killing-backwards
i did a presentation on this, a recording of which was uploaded to youtube: https://www.youtube.com/watch?v=ubcERtDyLDw
the video is not focussed specifically on evil mode but touches on vim keybindings occasionally
I am new to emacs, lost count of how many days I have already spent trying to learn and configure emacs.
haha. Well it's the beginning of the rest of your life, so time well spent
Something like paredit is like the last thing I need. But I fear I will have to do a lot of configuration to make it work nicely in evil.
yeah, using evil+structural editing is a real gap currently
I'd encourage you to just use one or two commands (perhaps even with M-x
so you don't have to remember the keybindings)
then when you get comfortable set your own keybindings (if you're not using spacemacs)
here's what I use for navigation
(evil-global-set-key 'normal ";" 'mark-sexp)
(evil-global-set-key 'visual ";" 'mark-sexp)
(evil-global-set-key 'normal "U" 'backward-up-list)
(evil-global-set-key 'visual "U" 'backward-up-list)
(evil-global-set-key 'normal "R" 'down-list)
(evil-global-set-key 'visual "R" 'down-list)
(evil-global-set-key 'normal "L" 'sp-forward-sexp)
(evil-global-set-key 'visual "L" 'sp-forward-sexp)
(evil-global-set-key 'normal "H" 'sp-backward-sexp)
(evil-global-set-key 'visual "H" 'sp-backward-sexp)
actually I'm using a wild mix of different paredit-like modes 🙂
lispy-clone is really useful IMO
clone creates a duplicate of the current form
I use it all the time to work on a new defn
yeah that's pretty similar
But it doesn't work if there are blank lines. But I just created a text object in evil for "forms", any sexp delimited by () [] {}
By the way, I looked at all the smartparens functions in emacs. And there doesn't seem to be anything for "wrap word" or "wrap sexp".
@pesterhazy What functions do you use to wrap lists and words?
I use something called evil-lisp-state-wrap
which ships with spacemacs but may be a separate package
smartparens docs are not very user-friendly unfortunately
I wish they would list all editing commands somewhere... But I haven't found such a list
I don't know why they make things so complicated
there's also a couple of attempts to make things better for evil users (evil-cleverparens, lispyville)
I use lispyville just for rebinding dd
etc to be parenthesis-safe, a very important feature
I haven't read that page about wrapping yet (watching vid), but I tried to look for commands starting with "sp-" and that have "wrap", and I couldn't figure out how to wrap words and lists 😛
right, same here
I have /Users/me/.emacs.d/elpa/dumb-jump-20161218.110
but want to try a version of dumb-jump from git. What's the normal way to do that?
in Spacemacs, if that matters
@pesterhazy do you mind restarting emacs or not ?
if you don’t mind: uninstall dumb-jump. Use quelpa to install the latest version from git master: https://github.com/quelpa/quelpa
The reason I say ‘restart emacs’ is because most of the functionality is already loaded into Emacs and by doing it the way I described above, you avoid any potential clashes with the already loaded functions and the new ones
I'm ok with restarting :)
oh didn't know about quelpa
, cool stuff!
Not sure if this is the place to post this, but just installed inf-clojure, and got these warnings: https://gist.github.com/uvtc/e39b3190870ad415cb4e97d41d7e78f5
@uvtc I think they are worth an issue
just make sure you have clojure-mode
installed
the first warning is innocuous I guess, but the second is weird and needs fixing probably
Hm. Looking in ~/.emacs.d/elpa, the directory is named clojure-mode-20141101.1. But... 2014? Hm...
Thanks, @richiardiandrea .
@uvtc I'll have a look at that issue, thanks for reporting
does anyone know which Emacs command/function adds the prompt “Lisp expression: ” to the mini-buffer? Something in my set up seems to be triggering this prompt frequently (once a minute or so) and I haven’t been able to track it down yet.
So, I’m not using Cider, I switched to inf-clojure, and that was close to when I started seeing this happen
not this one? https://github.com/clojure-emacs/inf-clojure/blob/master/inf-clojure.el#L909
for posterity and anyone who reads this later, I ran a toggle-debug-on-quit
and got this stacktrace:
read-minibuffer("Lisp expression: ")
read(nil)
inf-clojure-arglists("update")
inf-clojure-eldoc-arglists(#("update" 0 6 (fontified t)))
inf-clojure-eldoc()
eldoc-print-current-symbol-info()
...
timer-event-handler...
so it looks related to eldoc@adamfrey are you on the last inf-clojure
?
because I thought I fixed exectly that
it might be a bug...lemme check
let* ((arglists-snippet (format (inf-clojure-arglists-form) fn))
(arglists-result (inf-clojure-results-from-process (inf-clojure-proc) arglists-snippet))
(arglists-data (read arglists-result)))
mini Andrea bug 😄
sorry about that, I am fixing
this should do: (arglists-data (when arglists-result (read arglists-result)))
thanks @adamfrey for reporting!
that's up to @bozhidar, but the patch is there
pretty sure we'd need a 2.0.1