I've just had a look at sublime text 2, and it's everything I'm looking for in a textmate replacement. After several abortive attempts to enjoy coding in macvim, I can't believe I didn't try this sooner.
EDIT: does anyone know how I can get two different projects in different sides of a split in the same window? I know this is going against OSX's window management paradigm, but I'm sick of pressing CMD ~ all day, trying to mentally model a stack of windows in LRU/z-order is a cognitive burden I can do without.
EDIT: I love how the Preferences menu item just opens the config file.
EDIT: OMG OMG it actually goes to the most recently open tab on tab close by default, rather than the one on the left! Hallelujah! It kills me that browsers still don't do this.
I can't be the only one waiting eagerly for sublime text to include transparency/alpha-channel backgrounds right? That was one of the big sticking points for me in TextMate, and also one of the big reasons vim on OSX terminal is my secondary option.
I know it sounds like a silly thing to dwell on, but having my editor slightly transparent helps a lot when dealing with UI work.
I just recently switched to Sublime Text 2, and a after a solid week of coding in it, I must say I'm hooked. It's the best editor I've ever used.
I'm writing Boo, both client-side (Unity3D) and server-side (between Mongrel2 and Redis), and all it took was for me to drop in the Boo TextMate bundle and away we went.
The Boo bundle is outdated and needs some love, and Unity integration is missing, but Sublime is so nice that it really seems worth the effort of getting these things set up (when I can get around to it). For now, however, I'm quite happy with it.
Before the switch I jumped around (angrily) between Unitron (Unity's Smultron fork), Smultron, MonoDevelop (still sucks on Mac), GEdit (great editor, but GTK looks like shit on Mac), and tried several others without satisfaction.
For Emacs users, Plain ol' GNU Emacs[1] is almost as tickbox compliant as Aquamacs, and has the benefits of not breaking a whole lot of existing stuff by trying to retrofit it with a 'Mac OSX User Experience'.
If you're familiar with standard emacs settings[2] (and have the appropriate vitriol for those who falter into cua-mode), then http://www.emacswiki.org/emacs/AquamacsFAQ might be of use.
That should be fairly achievable with either-macs.
I started out with Aquamacs, but ended up getting annoyed with enough of the differences that I finally switched back to the (then Carbon, now Cocoa) emacs.
Most of the useful settings live in the ns- customize-variable land.
; open all new files in existing frame
(setq ns-pop-up-frames nil)
; make Cmd act as meta.
(setq ns-command-modifier 'meta)
; ... C-h v ns- TAB TAB
If you are a programmer, do yourself a favor and learn vi[m] or emacs. You are then ready to hit the ground running on any platform upon which you happen to find yourself working. vi in particular is almost always available on any *nix environment unless it's been deliberately removed as part of a "hardened" configuration. Emacs also is often installed, or if not is easily obtained. Both editors are also available for Windows.
I just started playing around with vim. I still use Sublime for most of my editing, but I enabled Vintage mode so I can test myself occasionally. I have also run through vimtutor a few times.
Finally, I made vim my default terminal editor, which forces me to use it for tasks like finishing my interactive Git rebase sessions.
I understand what the Aquamacs people are doing, but I think it's a big mistake. What makes Emacs so useful is not adherence to platform standards, but that it is a Lisp runtime with a lot of highly specialized text manipulation primitives that people have been hacking on for years.
It's an autarky wherever it runs, so let it be. I'm as big a proponent of the Macengeist (or whatever you want to call the ineffable quality that makes a good Macintosh application) as anyone I know, but Emacs is it's own world. Best to use straightforward Emacs 23 or 24 as a portal into that world, rather than trying to shoehorn alien concepts into it.
Now, building it on OS X can be a PITA -- not that it's not fully supported, but some stuff could be in better locations than the hated /usr/local. But that's an argument against myself that I'd prefer not to have at this exact moment.
You don't have to build emacs to get a modern version without all the Aquamacs hoo-ha. I've been using the build at http://emacsformacosx.com/ ever since carbon emacs was discontinued. It's a nice, no surprises build.
No, I was more referring to how you have to override a bunch of environment variables in the build and do some edits to Makefile.in to prevent irritating warnings about non-existent directories when you build it yourself. There's nothing wrong at all about http://emacsformacosx.com.
/Applications/Emacs.app/Contents/MacOS/Emacs -nw works fine for me. (Running OS X 10.7.1 with Emacs 23.3.1 I compiled when it came out on OS X 10.6.something.)
You might find this useful; you might find it laughable. On my i7 15" MBP it's about ten minutes start to finish, so I usually build first thing in the morning while I'm brewing my coffee.
The Sublime Text 2 developer is wonderfully responsive. I've emailed suggestions twice and they were both implemented and in short order.
I was disappointed that discussions on the Mac-centric 5by5 podcast network framed BBEdit as the only place to go from TextMate. Granted, BBEdit has a history of not being abandoned, but it's clearly near the end of its evolution while bright new things like Sublime are blazing forward.
Which Mac-centric 5by5 podcast are you talking about? If it's "The Talk Show" keep in mind that John Gruber used to work for Bare Bones Software (the makers of BBEdit), so take his recommendation with a grain of salt.
I'll repeat myself from other comments here on HN. Sublime Text 2 is amazing and worth every penny of the $59 it costs.
I agree about the short shrift Sublime Text 2 was given on 5by5. I'd expect that those hosts who are happy with BBEdit or whatever will sing their editor's praises, but it was more annoying that Marco's investigation of TextMate alternatives was effectively to try BBEdit for a few days and then go back to TM1.
In particular Kod seems to have stagnated completely, there has been no updates to the source tree since June 20th, and even before that the updates were very light. Kod is an interesting idea, but in it's current state I didn't find it very usable.
I, for one, am astonished at quality and release frequency Jon Skinner (the author of Sublime Text 2) has been able to achieve. Perhaps he has help, but that doesn't appear to be the case. He has made steady, incremental, and visible progress that keeps giving people reasons to buy his product.
Here's to hoping he figures out how to make the configuration a little easier for non-programmer types to deal with.
I checked it out a few months ago, and it looked awesome, but it was missing too many basic features (like right clicking a folder to create a new file or showing the current file in the file tree) so I went back to TM. I just took another look last week and literally every single issue I used to have with it has been fixed. The pace of development is amazing. I had no problem parting with my $59.
100% agree with his conclusion. For textmate fans who havent been able to make the jump to vim or emacs, try sublime text 2. It blows away textmate in every dept, and is incredibly extendable. Theres nothing out there thats more powerful (aside from vim/emacs)
I've been using MacVim on a daily basis lately and I don't get why everyone is so excited about Sublime Text 2. Does it have git integration, VCS integration, autocomplete, good plugin management, etc? Or is it just a better Textmate?
I've been using MacVim for ages, but after trying out Sublime Text 2 for a few days, installing a couple of plugins (a pep8 & pylint checker, and a git one), and learning most of the shortcuts I need, I'm completely hooked.
Where can I get information about setting/configuring Sublime ? I would like to try it out but only if I can figure out how to set it up the "right" way. For MacVim I just read one of the numerous blog posts on setting up vundle and reading a few other people's .vimrc files.
Apart from installing the plugins (details depend on the plugin, but basically git clone into the right path), I've not done anything else but learn the shortcuts. Sublime Text 2 works the way (split views, Command-T, pyflakes etc.) that I wanted without all the configuring that was needed in (Mac)Vim.
Some years ago wanted to try Textmate but then couldn't afford to buy a Mac. Being multiplatform is a plus for Vim, Sublime and Komodo. Not being is a deal breaker for Textmate (Mac) and Notepad++ (Windows).
Also love the fact that with just one license I can run Sublime on OS X, Linux and Windows so thinks it's not expensive.
Yeah. Cross platform availability is definitely a must these days. For some time, E-texteditor looked like it could be Textmate on Windows. By now it is just as much vaporware as Textmate itself, though. A pity, really.
The reason I switched from TextMate to Vim was simple: portability. I can keep my environments at work (Windows) and home (OSX) the same. Editors naturally prompt a deep investment in studying, plug-in finding, and muscle memory if you really want to use them to their fullest. I didn't want to split my investment between TextMate and <some Windows editor>, so I started the long process of getting familiar with Vim. I do miss some of the native flavor of TextMate, but the comfort of having my entire suite of plug-ins and shortcuts apply virtually anywhere (e.g. logged into some VPS) is really helpful.
If I was mostly in OSX it would be a different story, but for the cross-platform developer, I really think the Vim and Emacs options are the way to go.
I've been on a Mac a few years and tried a few editors, so (for what it's worth) here's my 2c. Main use case is scripting and Rails development.
Smultron: Used this a bit. not bad but I didn't really take to it. Missing a number of features
Vi: still use it regularly, but I don't have much skill with it. Extra handy for quick editing of a single file (I use the command line a lot so vi is convenient)
Aquamacs/Emacs: Gave this a shot but really had no idea how to use it. Gave up in the end
Netbeans: Been using this for years and found it mostly the best fir for my needs. Looked around when Orace took it over and ended up with...
Rubymine: Excellent. Great fit for me, although I'm still on 3.1 as the newer releases run like molasses on my aging macbook. It's a bit heavyweight, but it has a ton of really useful features.
Kod: Showed great promise as a Scite replacement but seems to have been abandoned. (Scite was what I used in Windows for years. fantastic once you change the default fonts)
Texmate: Used the demo, couldn't see what it offered over netbeans
GEdit: Used this all the time in Linux and was surprised to find it runs fine out of the box on the Mac! Great for reading extra large files like long logs etc.
Textwrangler: For some reason I really can't get to liking this. I give it a shot again every now and then but it just doesn't seem to work the way I do
Coda: Looks lovely but I just couldn't get over the price.
I agree re: Rubymine. It is heavier weight by far than TextMate but auto-completion, syntax error highlighting, undefined variable hilighting, etc. is often worth the sub-second delays while editing.
> GEdit: Used this all the time in Linux and was surprised to find it runs fine out of the box on the Mac! Great for reading extra large files like long logs etc.
I honestly have no idea, but I guess so. Here's the page http://projects.gnome.org/gedit/ link to dmg is on the rhs. I was very pleased to see it looks just like gedit should (they haven't os-x-ified it)
I just tried Vico (free trial downloadable from the website), and damn is it nice. I'm a huge fan of ST2, and I've been playing around with Vintage mode, but so far it just isn't enough for me: my poor fingers get confused by Vim operations that aren't supported. Vico has much better Vim support (although still not complete), and it's just as shiny as ST2 to boot. Anyone else have experiences with Vico to share?
Vico basically rocks my planet. It's got shortcomings, but it's scriptable using Nu, and you have access to all of Cocoa when scripting, so there's definitely room for big, awesome improvements. For example, I reimplemented a subset of the zz/zt/zb functionality in just a few lines of Nu (https://github.com/Shadowfiend/vico-fill-in-the-blanks.tmbun...), added the ability to run an external console process and pipe its output to a vico buffer in a few more (https://github.com/Shadowfiend/pointy-haired-boss.tmbundle) and then implemented support for Scala's simple-build-tool on top of that in a few more (https://github.com/Shadowfiend/simple-build-tool.tmbundle). 250 lines of Nu altogether. Epically awesome.
I'm still missing a couple of key functions, especially `` when doing searches, but vico is already awesome and can only become more so with progress.
I was going to write that I don't use Vico because it lacks the interface polish of other Mac editors like TextMate, but I just downloaded the latest demo and I'm happy to see that the interface is improved dramatically! The only remaining issue for me is that panes are separated by a needlessly wide and visually distracting divider.
Definitely my favorite now of the post-TM editors. Still use Vim in Terminal.app though.
I was so enthused by Vico that I wrote a fairly wordy review about it in August. Added some corrections and notes recently. Feel free to add/contribute/fork. I think it's a great editor, with just a few minor shortcomings which I hope will be addressed soon.
I would just like to throw in that the major obstacle to my finding an editor on Mac OS X has been the pricetag involved with most of the more popular editors. Sure, $60 isn't much if you already have a stable programming job, but I am a college student (which is financially the exact opposite of a stable programming job), and as a college student I am generally highly adverse to paying for things (especially software, since I "grew up" as a programmer among Linux and OSS).
That said, TextWrangler is a decent option if you aren't in the mood to spend money. The only thing I miss about other editors from TextWrangler is an actual file browser that works like Gedit's instead of "you can only have one file open from the file browser at once."
"Sublime Text 2 may be downloaded and evaluated for free, however a license must be purchased for continued use. There is currently no enforced time limit for the evaluation."
Apart from (UNREGISTERED) in the title and a rare (daily?) nag screen, there's nothing preventing you from using Sublime Text 2 without buying it.
I respectfully disagree. I've been a Vim user for 10 years. I've written half a dozen plugins and customized another 15 or so in addition to writing several syntax/indent files. I decided to take a look at Sublime last week when I noticed that it had a vim mode coming from the author (important in that it has a chance of not sucking) that looked like a work in progress but at a reasonable state. I've since paid my $60 and am in the process of switching despite the vi emulation's flaws irritating me to no end.
Advantages:
- Scripting system is in Python and is a joy to work with. Easy things are easy. Hard things seem acheivable but I haven't done serious plugin work. You can poke around/debug things using the built in Python REPL. The things I have tried to do are considerably easier than they are in Vim.
- Scope system. You can accomplish a significant set of activities with keybindings and scopes that would require a vim plugin. I've wanted scopes in Vim since I read about them when Textmate was announced. There isn't a technical reason it's not doable but it would require a complete rewrite of all the syntax files to be consistently useful. Enables things like go-to-function, select scope, and fold tag attributes to work without filetype specific plugins.
- Native Snippets. You can get snippets in Vim (I've contributed patches to both plugins) but nested placeholders and nested snippets just don't work, which really limits how far you can push snippets. Also Vim snippets can't interact with the selection and snippets containing indention tend to work incorrectly/interact with the indent script strangely. The only downside is that it's easier to invoke code from SnipMate than it is in Sublime. Being able to do snippets directly from keybinds cuts out another small class of plugins and due to the interaction between scopes, snippets, and keybinds this class is larger than you'd think.
- True multi-cursor. Current uses are fairly mundane but I've wanted a programmable editor with multi cursor ever since I read the MIT whitepapers on generalized cursors a couple years ago. You can do really neat things with generalized multicursor but not worth writing my own editor. In current form, multiple cursors have a neat interaction with vim normal mode but I haven't figured out a solid set of techniques for generating multiple cursors where I want them without mouseclicks and without getting fouled up by visual mode.
- Saves state between quit/open.
- Anything in the JSON configuration format is immediately applied on save, which makes tweaking a lot more convenient.
Disadvantages:
- Vi mode flaws make me crazy. Off the top of my head:
- No ~ implemented
- % doesn't work correctly with edit operators and
crosses newlines when it searches
- % doesn't jump between start/end tags
- No [c-i]/[c-o]
- Text objects that cross lines seem to be getting
set to linewise for subsequent lines
- no ex commands, the lack of s// is particularly irritating
- Selections intersect with visual/command/insert mode in
fun and exciting ways. I'm not sure what the right
behavior is but I know I have a mode error almost every
time I wind up with a selection.
- Various commands helpfully (if you're in insert mode)
highlight text, see above
- No blockwise visual
- Intermittent off-by-one errors (e.g. I've gotten
'for<Esc>..' -> 'fofofor' but now can't replicate)
- Hand editing JSON for configuration sucks.
- Editing XML plists for syntax, snippets, and color schemes sucks more. And they don't autoload.
- Does not mantain cursor position across file close/open.
- No \zs \ze in regex engine. You can accomplish the same thing with more typing but I miss them.
- Not already installed on every posix environment, can't use over ssh
- Docs are comparatively poor and are on web instead of editor local.
- Not a lot of stuff available for various languages/environments means writing your own.
The problems are annoying but minor/fixable while the advantages aren't going to be duplicated by Vim any time soon. All in all, despite it being closed source it's a much better platform for me to build on. In addition the base platform has quite a few features that I'd implemented as plugins and there are some neat plugins like a package manager and REPL, which aren't polished but neat.
Or you know, (re)install linux and use any of the great text editors available on that platform. I think linux is the best platform for CS types in college.
I have been a happy user of Vico for the past two months after years of putting up with Textmate's lame undo. I recommend it if you are comfortable with vi/vim/macvim but want a more Maclike interface plus Textmate bundles and theme support.
The main features Sublime Text 2 needs before I give them money (since I already have TM and Rubymine):
- code navigation: The main reason I deal with rubymine cpu and memory hogging.
- intellisense-ishness: The 2nd reason I deal with rubymine.
- better preferences interface: way too emacsish, but is probably much easier for cross-platform compatibility.
The only reason I don't use emacs is its abominable configuration process. I used to use Lucid/XEmacs way back when, but I lost whatever emacs mojo I had gained when I was "forced" to use Windows.
Has anyone had success with (the somewhat recently released) UltraEdit for Mac? I've used UE on Windows for many years and had been quite happy. When I made the switch to OS X, I continued to do much of my coding in UE via a Windows VM. Looking to finally kick the VM habit, now that Outlook for Mac is available, and selecting a native OS X text/code editor remains the most significant challenge. Sticking with UE would seem to be the easiest approach, but curious if there is any feedback from the community.
Why would any programmer ever risk learning a proprietary/closed source text editor? You're putting your most important tool at the mercy of some corporation or individual.
While I can understand the principle that motivates your comment, I disagree. You could say the same thing about an operating system, a particular computer brand, the online services you use - anything. If whatever tool you use makes you more productive, it has a positive impact on your work, meaning you should most definitely use it.
I seldom think about whether something is closed or open if it helps me actually get things done. Why would I pick anything else (open or closed source) based on an economic principle if it made me worse at my job?
I started my coding on OS X with TextMate, in the time when releases were frequent. I spent a summer working a job where local development was not particularly easy and so I spent a lot of time in remote vim sessions over ssh. While it took a little adjusting and learning to get to the same level of productive as with TextMate I've never looked back. The ability to sit down at any machine and know that Vim is most likely installed is really really useful.
Long time Textmate user here. I'm learning emacs because of the productivity and the portability.
I tried vim but gave up, the Esc key was too clunky to me. Then I tried emacs and it was way more bearable. To be sure, I still need to figure out the features other than moving the cursor around but...all in good time.
Undo button is a bit weird conceptually. When does it switch to redo?
Yeah, the undo is a bit strange -- in stock Emacs you have to make a change to the buffer to start undoing in the opposite direction. You can use "undo-only" for a simpler model, or check out some extensions that modify undo mode: http://www.emacswiki.org/emacs/CategoryUndo.
The cool thing about Emacs undo is that it can undo in a region. So, say you've made a bunch of changes, and then realized that one of your earlier changes to a particular line were incorrect: just highlight the line and then undo within that.
It switches back to "undo the last undo" (since it's always "undo the last buffer change") when you break the chain of undo, i.e with C-f or a similar non-destructive command (like movement). See: http://www.gnu.org/s/libtool/manual/emacs/Undo.html
Funny. I tried Emacs a few times but it was always that undo thing that kept me from sticking with it. Incidentally, it was also the undo that kept me from sticking with Textmate. At some point, I settled with Vim though. Lots more strangeness there, but at least undo works.
I agree that Esc is clunky, but most people don't know that ctrl-c has the same behavior. If you remap your caps-lock key to ctrl, it's a very natural keystroke (at least for me) where you don't need to leave the home row.
I really like the package management options in emacs. Between Package.el (baked into emacs 24) and el-get I can include almost anything I need by configuring my dotfile. Packages from marmalade, elpa, git repo, hg, emacs wiki, etc...
I can blow away my .emacs.d and, when I restart, all of my configured packages are retrieved and installed. Bliss!
FWIW: I use XCode for all Objective-C development, TextMate for almost everything else, and BBEdit to open large files (IMO the single biggest area of weakness for TextMate). I've tried other editors, but 3 covers everything I need.
I tried to use Texmate like that for a while but ultimately, not having a sensible undo and the kind of sucky non-regex incremental search blew it for me.
I installed Kod a month or two ago. It's buggy and crashes all the time. Needless to say, I don't program on it (I use TextMate) but for what I use it for (cheatsheet reference) it's fine.
I feel sad for anyone who refers to emacs and vim as dinosaurs. I feel sadder for anyone unfamiliar with emacs and vim dismissing because they're old tools, and missing out.
Slickedit has been around an awful long time. It's always looked like a very professional product, but it gets no love in fora like this. Anyone know why ?
He suggested installing plan9port[1], which "just" ports some user land libraries and applications to different Unices, including OS X. So we're talking about native OS X executables here.
There's also the "Acme Stand Alone Complex"[2], which - if I remember correctly - is a "virtual" Inferno OS applet which includes the Acme application.
I'm not exactly agreeing that piping is the end-all, be-all of editor extensibility, but it's certainly worth giving it a try.
There's so much more to Acme than piping.
Actions based on regex matching via the plumber for a start.
Menus you can type / keep in a text file anywhere you like.
No stupid colour syntax highlighting or pointless fancy shit.
EDIT: does anyone know how I can get two different projects in different sides of a split in the same window? I know this is going against OSX's window management paradigm, but I'm sick of pressing CMD ~ all day, trying to mentally model a stack of windows in LRU/z-order is a cognitive burden I can do without.
EDIT: I love how the Preferences menu item just opens the config file.
EDIT: OMG OMG it actually goes to the most recently open tab on tab close by default, rather than the one on the left! Hallelujah! It kills me that browsers still don't do this.