Fork me on GitHub
#cursive
<
2018-03-22
>
jebberjeb10:03:28

Is there anybody here, familiar w/ the idea codebase, willing to give me a few pointers? I’ve got a javafx component (it could just as easily be swing) I’d like to use for my main source editor pane, and trying to get some idea of how difficult that would be to accomplish.

apt17:03:35

Hey, I don't know if this is a known issue, but merging files using git might confuse parinfer. Like, when there's a conflict, git inserts lines like >>>>>, HEAD etc, that might cause parinfer to modify some parenthesis. I'm disabling parinfer before using git merge for now. I don't know if there's a better approach.

cfleming19:03:57

@andre.peric Interesting, I hadn’t considered that case. I wonder if IntelliJ will tell me that those files have conflicts so I can disable parinfer on them until they’re resolved.

👍 4
cfleming19:03:50

@jebberjeb I might be able to help, if not the IntelliJ plugin dev forums are pretty helpful these days.

justinlee19:03:16

hey cursive fans. i know that IJ has multiple cursors by using the mouse, but is there some way to get the Cmd-D type functionality from submlime/atom/vscode in IJ/cursive?

justinlee19:03:11

I bound Cmd-D to “find word at caret” but that’s not the same functionality. this is the thing i miss the most by far from atom

danielcompton23:03:41

Is there a way to 'trick' Cursive into using the :forms on a macro, rather than its actual arguments for param completion?

danielcompton23:03:04

The same way that clojure.core does for things like fn and defn

danielcompton23:03:29

(defmacro fn-traced
  "Defines a traced fn"
  {:forms '[(fn name? [params*] exprs*) (fn name? ([params*] exprs*) +)]}
  [& definition]
  `(if (is-trace-enabled?)
     (fn-traced* ~@definition)
     (fn ~@definition)))

danielcompton23:03:38

I've done this, but Cursive isn't fooled

danielcompton23:03:18

(clojure.repl/doc fn-traced)
-------------------------
debux.core/fn-traced
  (fn name? [params*] exprs*)
  (fn name? ([params*] exprs*) +)
Macro
  Defines a traced fn

danielcompton23:03:03

ah, I needed to use :arglists instead of :forms

cfleming23:03:45

@lee.justin.m What does Cmd-D do?

justinlee23:03:31

@cfleming oh worry that would have been helpful. the first time you press it, it highlights the word under the cursor. the next press finds the next occurrence of that word and creates a new cursor there. so if you want to change 5 instances of a variable, you press cmd-d 5 times and then you have 5 cursors.

justinlee23:03:57

it’s incredibly useful because sometimes you don’t even want to change the variable but its a way to get the cursors just where you want them

justinlee23:03:45

on https://www.sublimetext.com/ the first demo on the main page is this feature

cfleming23:03:38

@lee.justin.m See here: https://www.vojtechruzicka.com/intellij-idea-tips-tricks-multiple-cursors/, the last one looks like the closest to what you want, but isn’t quite the same.

cfleming23:03:19

Looks like it automatically selects all occurrences, not the next one on each press.