Fork me on GitHub

is there an easy way to edit a file inside a dependency (jar)? With emacs, you can make a buffer editable - modify the contents and reload that file into a repl: you can basically live-edit you dependencies, which is really awesome. With IDEA, can’t make the buffer/view editable. Could copy the content somewhere else and edit there, but looking for a cleaner way for this.


not looking for any permanent changes, just ability to change what the current repl sees.


This would be awesome. I do remember seeing an idea command to make a file editable, not sure if it helps here


There isn’t, but this is something a few people have asked for. One idea I had was an action to convert a file from a jar into a scratch file, which you could then edit and send to the REPL.

👍 9

that would be great. Two big benefits: • ability to use things like #p (hashp) or tap> (with portal / reveal) from 3rd party libs • ability to try / fix small things in libs. currently working with a lot of alpha libs (many ours), which are great, but full of gaps that would be to add/fix locally in the calling project as you find them. git-sha-deps-flow simplifies things a lot, but this would allow fixes to be instant.


Ok, I’ll check in the JetBrains slack how best to achieve that.


possibly not so helpful here, but fwiw i have some clojure code in: that extracts .clj* files from dependency jars and makes them avaiable under a .alc-id subdirectory of one's project.

Jakub Holý (HolyJak)10:11:48

FYI What I do is switch the repl to the ns of the file, copy-paste the fn to that file, adjust, eval. But ☝️ would be much more comfortable


brew install mc
Just run Midnight Commander, put cursor on jar file and hit Enter. Use F4 to edit. Like in old good days..


What’s been implemented is copying to a scratch file, as described in that issue:

nice 3

Scratch files are still a bit funky, but it seems to work pretty well.

❤️ 6