My Ideal Code Editor

    I'm a vim user.

    I've been using vim for a few years now, and I'm very comfortable with it. I wish it were easier to do some things, but I can live with a little bit of difficulty, as long as it only happens one time (crafting the config file, mostly).

    The problem is, I also sort of like Textmate.

    I won't use Textmate though, because Macromates is probably the least transparent organization that I can think of; less so than Microsoft, in my opinion. They have been stringing people along for years now, saying that "Textmate 2 is on the way: just wait. Be patient."

    Well, I'm impatient and I need a good editor now.

    I'm not an Objective C programmer, but I'd happily learn it, if needed. Basically, I'd like to build something that's almost exactly like Textmate, but instead of using Macromates' proprietary text editor control, I want vim. Here's what I'm sort of going for: https://skitch.com/cweagans/fpc1n/ideal-editor

    Note: that's just a MacVim window sitting on top of a Textmate window.

    My idea is that the file drawer replaces NERDtree. You should be able to bind hiding and showing that sidebar to a key combination (just like any other action in vim) using your .vimrc.

    Additionally, the tabs across the top would not be vim tabs - those should be buffers.

    I know a lot of hardcore vim users are probably cringing at this right now, but we have long been past the era where a text-only interface is acceptable or even appropriate. There are many Gvim implementations out there, but the only thing that they do is add a window around a vim editor.

    Gvim, in my opinion, should be something more. The implementation that I'm proposing would be sort of a Mac-only thing, but reasonable alternatives could be developed for Linux and Windows (perhaps just a graphical sidebar with a filetree inside).

    I know there's Vico, but there are a couple of problems with it, namely that it's expensive. What I'm proposing here would almost certainly be free and open source.

    What other features would you like to see from Gvim that are not currently implemented? Should text-only editors get a nice looking wrapper if they're running in graphical mode? Are there any other editors (besides Emacs) that you'd recommend?

    Note: Please do not turn this into an Emacs vs Vim vs $your_choice_of_editor argument. I don't like Emacs and I won't use it. Simple as that.

    Note 2: This post is about gathering ideas. I'm planning on implementing it when I have sufficient time and expertise (or enough help - hint hint).

    Comments

    David Hernandez's picture
     

    David Hernandez (not verified) says:

    I have a lot of pet peeves when it comes to editors. I was an emacs user for a long while (never liked vi) but I too started getting annoyed at the lack of gui functionality. One problem I have is switching between OSes. Once I find an editor I like, I would switch to another OS (I currently use Mac, W7 and Linux) and find my new editor didn't have a version for it. One I've been playing with lately is Sublime Text 2. It is cross-platform and has a few unique features for such a simple editor. I love the mini map. It also has vi key bindings.

    cweagans's picture
     

    cweagans says:

    Sublime is okay, but I've found over time that the vi key binding implementations in things that are not vi or vim are not really that great. Not sure if sublime is any different (haven't used it since it's first development release), but I'd really prefer an actual copy of vim embedded in a nice, Textmate-like gui.

    timbott's picture
     

    timbott (not verified) says:

    Nice concept - I use Xcode all the time just for the file tree, but it is massive overkill. I'd be happy with Pico/Nano with a file tree

    cweagans's picture
     

    cweagans says:

    Xcode is definitely toward the bottom of my list of choices of editors. It's great for ObjC, C, C++, etc, but I absolutely could not bring myself to use it for Drupal stuff. Not sure if I'd be willing to use Pico or Nano, either. I already have a pretty significant amount of time invested in learning vim and tweaking it to my needs (other than the GUI, of course).

    Try kate's picture
     

    Try kate (not verified) says:

    Hi! You could try Kate with the Vim support enabled :-)

    cweagans's picture
     

    cweagans says:

    The last time I tried it, Kate did not work that well on a Mac. I'll take a look. Thanks for the pointer. Kate was my favorite editor on Linux for a long time (right up until my boss convinced me to learn vim by allowing me to spend an entire day going through vimtutor and other tutorials online).

    Jake's picture
     

    Jake (not verified) says:

    What about MacVim? It has nice things like tabs, Mac-specific keyboard shortcuts, etc.

    cweagans's picture
     

    cweagans says:

    I use MacVim a bit right now, but the problem is that it's simply a window wrapper around an embedded vim instance. There's not really much to it. I want a little bit more than that - things that make it look like a native Mac app: a nice file tree, some editor tabs. Basically Textmate with vim instead of the Textmate editor control.

    Anonymous's picture
     

    Anonymous (not verified) says:

    For web development? Coda or Espresso are fine...

    Gijs's picture
     

    Gijs (not verified) says:

    How about online editors ? Like cloud9 and such.
    Or, for keybinding (which is probably the reason you stick with vim) you might consider sponsering this guy:
    http://www.kickstarter.com/projects/1241383920/open-source-programmers-t...

    Philosurfer's picture
     

    Philosurfer (not verified) says:

    The best editor out there. Period.
    You might have to compile it for mac... But the community has built everything you need in an editor

    Anonymous's picture
     

    Anonymous (not verified) says:

    Am I missing something or did you forget the editor's name?

    cweagans's picture
     

    cweagans says:

    He put it in the comment subject line, which is not displayed in this theme. I need to form_alter that away. He was talking about notepad++

    Same anonymous as before's picture
     

    Same anonymous ... (not verified) says:

    Ah, OK. Thanks! For what it's worth, I'm either between MacVim or NetBeans w/ jVi (sometimes) enabled. NetBeans is definitely an all-in sort of affair, but setting up a Drupal install as a project is very nice and allows for features like function referencing and XDebug integration. I tend to only enable the jVi stuff for regexing or column editing, so it's probably not the most relevant for the discussion.

    davexoxide's picture
     

    davexoxide (not verified) says:

    I think you might like Kod. http://kodapp.com/

    Cesar Miquel's picture
     

    Cesar Miquel (not verified) says:

    Have you seen / tried Pida? I'm also in the search of combining vim with something like Textmate but under Linux. This is the closest. Check it out: http://pida.co.uk/

    Cottser's picture
     

    Cottser (not verified) says:

    I've only been using Vim for just over 6 months, but I'm on the same page as you. I want Vim prettier, better integrated and more easily extensible. For me, after vimtutor there was no turning back.

    Cottser's picture
     

    Cottser (not verified) says:

    The recent improvements to Sublime Text 2's "Vintage mode" had me take another look. I've been using it for about two weeks now, and just bought my license a few days ago. I love Vim's modal interface for its emphasis on doing everything with the keyboard, but I never got into the really intense keybindings or functionality. Doing basic things in Vim can get real neck-beardy, real fast. The Vim binding I use and appreciate the most is ci" and its variants, and that works well in Sublime Text's vintage mode. Of course basic navigation and operations work as well. Make sure you grab the latest dev release from http://www.sublimetext.com/dev as there have been some recent fixes to Vintage mode.

    During my time as a Vim user I tried to replicate a lot of TextMate functionality in Vim (i.e. Go to Symbol…) with varying amounts of success. To me ST2 feels like a lot of the best parts of TextMate and Vim rolled into one, and I keep noticing clever little features tucked away that I always appreciate. Cameron, I know you will probably stick with Vim as you've been using it for years, but I've found my new text editor with Sublime Text 2.

    Sian at WK Part Time Jobs's picture
     

    Sian at WK Part... (not verified) says:

    MacVim is awesome, I am delighted with it.

    Eric S's picture
     

    Eric S (not verified) says:

    Alloy's macvim branch has a file drawer like textmate: https://github.com/alloy

    alloy's picture
     

    alloy (not verified) says:

    rainwalker's picture
     

    rainwalker (not verified) says:

    You have probably found it, but this is what you are looking for:

    http://www.vicoapp.com/

    Taberb Lines's picture
     

    Taberb Lines (not verified) says:

    you're really a good webmaster. The web site loading speed is incredible. It seems that you're doing any unique trick. Furthermore, The contents are masterpiece. you have done a fantastic job on this topic!

    Add new comment

    Filtered HTML

    • Web page addresses and e-mail addresses turn into links automatically.
    • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
    • Lines and paragraphs break automatically.

    Plain text

    • No HTML tags allowed.
    • Web page addresses and e-mail addresses turn into links automatically.
    • Lines and paragraphs break automatically.
    By submitting this form, you accept the Mollom privacy policy.