From: Axel Date: 2007-09-21T21:55:06+09:00 Subject: Re: jEdit can run code like TextMate does? Hello AutumnMoon, it's long ago, I wrote this instruction originally for VHDL. Hope it helps. I'm using jEdit 4.3pre9 with Ruby, on Windows, and I like it very much. On my side it works like you would have it working, so there is a way to get it done. Kind regards, Axel Execute a RUBY-file from within jEdit ===================================== If you want to execute a RUBY-file from within jEdit by just pressing for example "F5", you can try: Edit the file "...\macros\Misc\Run_Script.bsh" as follows: Behind: path = buffer.getPath() + " "; Add: bufferDir = dirname( buffer.getPath() ); Behind: else if(mode.equals("python")) { execScript("python", "python " + path); } Add: else if(mode.equals("ruby")) { execScript("ruby", "ruby -w " + path); // -w -> warnings } In jEdit: Utilities > Global Options > Edit Shortcuts: "Macros" > Command: "Run Script" > Click into the field "Alternative Shortcuts" > Press the F5-Button > OK > OK Optional, but very handy: Install the Plugin "ErrorList" and the Plugin "Console". It might be worth adjusting: jEdit > Plugins > Plugins Options... > Console > Error Patterns > Ruby > Name: Ruby Regexp: (\s+from)?\s*(.:[^:]+)\s*:(\d+):?(.*) Warning regexp: leave empty Extra lines regexp: leave empty Filename: $2 Line number: $3 Error message: $4 Test Area (not in jEdit 4.2): K:/SyncByFlash_WIP/syncbyflash/tmp002.rb :25:in `m21': undefined method `opne' for FileUtils:Module (NoMethodError) from K:/SyncByFlash_WIP/syncbyflash/tmp002.rb :16:in `m2' from K:/SyncByFlash_WIP/syncbyflash/tmp002.rb :11:in `m1' from K:/SyncByFlash_WIP/syncbyflash/tmp002.rb :30 Process ruby exited with code 0 Press Test/Commit (not in jEdit 4.2) > OK > OK When now pressing "F5" on an open RUBY-file, it will be executed; Errors are shown by the ErrorList-Plugin, and when clicking on those errors, jEdit jumps to the relevant line in the sourcecode.