On Mon, 13 May 2013 08:52:47 +0200 Jacob Carlborg <[email protected]> wrote:
> On 2013-05-12 21:31, Nick Sabalausky wrote: > > > Looks interesting. Now that you mention it, I do seem to recall > > hearing about it back then. Personally, I've been a huge fan of > > Programmer's Notepad 2 <http://www.pnotepad.org/>. My #1 complaint > > about it though is that it's Windows-only. I want to switch to > > Linux for my primary system, but the lack of PN2 is one of the > > roadblocks (there are other roadblocks, though). > > Take a look at Sublime Text. It's ridicules fast and cross platform. > The only problem is that it's not free. You can download it for free > and dismiss a dialog popping up once in a while. > > http://www.sublimetext.com/ > Hmm, yea I've looked at that before. There's some nice things about it, but honestly, I can't stand non-native UIs (both looks and behavior). Plus the settings don't seem to work (tried changing one, saved, restarted, and it had no effect), and the text seems a little blurry, and I'm kind of uneasy about relying on closed-source for something I rely on as much as a text editor. Don't like being completely at some company's mercy for any changes/fixes I may need. > > But these days I prefer RDMD-style approaches ("pass the one main > > source file to a cmdline tool and it figures out the rest") because > > they're trivially scriptable and don't cause a specific editor (or > > any editor at all) to become a build requirement. I find that > > especially important for OSS and cross-platform projects. > > The problem here is when you need to use a couple of compiler > switches. That's not a true problem at all. Nobody ever said RDMD, or anything else like it, can't be invoked from another tool to provide whatever additional functionality is needed. In fact, such things already exist. But try adding on functionality using IDE-based build tools as a building block - *and* then make it work for anyone who uses a different editor. > You need a file to put that in, usually a shell script. > Unfortunately that doesn't work on Windows. So you need to duplicate > that file for Windows. > If all you're doing is passing a few switches to a DMD/RDMD call, then having both BAT and shell is absolutely trivial. I do it all the time myself: 1. Replace the shebang line with @echo off 2. Replace "$@" with %* 3. If you invoke anything in the current dir, remove the prefixed ./ (or change it to .\) Done. If you need anything fancier than that (like handling steps that fail, or really any actual logic at all), then shell scripting is probably not the best idea anyway - even if you don't care about Windows at all. Just use a shell one-liner to invoke the real script. *Or* you can just use (or create) any other compiler-invoking, or RDMD-invoking, tool that provides whatever functionality your project happens to need. IDE-driven building is great...*if* it happens to already provide everything you need (otherwise you might be pretty much screwed - and yes, I've run into such problems before) *AND* you happen to be working in isolation with nobody else ever needing to build your code.
