Users/ssmith/Applications/Emacs.app/Contents/MacOS/bin/emacsclient. For Linux this is usually /usr/bin/emacsclient however if you’re on OS X and using the Cocoa packages you’ll need to add the path to the binary from that e.g. For Program enter the path to your emacsclient binary.From there click the plus button to add a new tool. To use this to send files to Emacs go to Preferences->External Tools. IntelliJ has a feature called external tools that allows it to invoke external commands with some pre-defined variables, such as the current file path. Teach IntelliJ how to send files to Emacs This is just a case of invoking M-x server-start in an existing Emacs window. So start up an Emacs session if necessary and then tell it to listen for instructions from emacsclient. Rather than constantly starting up Emacs every time we want to use it, we’re going to keep an Emacs session running in the background and just tell it to load whatever file we want most Emacs users tend to have a session open for months anyway. This is how you do it… Get Emacs to listen for commands What I want to do is do my coding in IntelliJ on a day-to-day basis, but immediately load a file into Emacs for any tricky text processing I want to do. Right, enough rationalisation, let’s get on with it. In particular, Emacs’ keyboard-macros have helped me turn some annoying data and code transformation problems into a few key-presses in the past, as this screencast from Avdi Grimm shows: And sometimes you need to get down and dirty and hack on some text, be it mangling CSV or conforming to some baroque copyright header formatting requirements. ![]() ![]() ![]() Sure, IntelliJ has keybindings to match Emacs and Vim, but those editors have other features that enable complex text processing patterns. In particular, its on-the-fly tracking of the project syntax tree enables complex refactoring and clean-ups, either automated or by the more brute method of just changing something and seeing what turns red in the editor.īut like western musical notation enables complex harmonic structures at the cost of rhythmic structure, IntelliJ’s structured refactoring come at the cost of a really powerful text editor. This is because while Emacs is a great text editor, IntelliJ takes a holistic and semantic view of your project, something that is necessary with Java’s verbosity and file-based classes. However when I moved into the order-systems team I adopted IntelliJ IDEA, which is our weapon of choice for Java development at Atlassian. As I’ve mentioned before, I’m gradually working towards my grey-beard badge so for most of my programming I tend to use Emacs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |