Vim, TextMate and Gedit, make your editor rich featured

There are hundreds of editors available in the market, both free and paid, depending upon ones need. I mostly work on Ruby or ROR, Web2.0 stuff and I prefer to work fast, efficient and effective way and editor plays a very important role for every developer, so as system (OS) but its a different discussion as of now.

I’ll make my assumptions on the basis you like working either on MacOS X or linux (Ubuntu, fedora or any other flavour) and can dig yourself to get your things working like the way you want to work on your machine. Sorry, I don’t recommend Windows for development and I presume that you like to learn shortcuts and emphasize more upon your keyboard instead of mouse.

I started development during my college days on Vim or GEdit on Linux. Truly speaking VIM seemed flamboyant with its unmatched capabilities. I always wanted to work/handson/try Emacs there after, but still lazy enough to start exploring it.

After college, I started development on Mac OS X and got paid version of TextMate and as said its best for development for Ruby on Rails application. I was pretty happy and used to install some bundles from time to time to make it work the way I want to code fast and effective and started coding with as many shortcuts I can learn and remember. As a rescue I used Vim and always feel overwhelmed about Linux community and such a powerful and fast editor, which can’t be replaced by anything (with same regard for Emacs).

With time I worked more on Vim and TextMate and trying to point some of their key features which I liked and used the most.

Vim (all terminal based and though fast):

  • Searching (/search_string)
  • Search and replace (:%s/search/replace/gi)
  • Macro (record and play on a file of any size), at par feature
  • Practically open file of any size (tried with gigs of sql files)
  • use of CTags (extremely powerful feature when working on a project)
  • GVIM with more additional feature
  • Split (horizontal and vertical) views (:sp or :vsp <filename>)
  • Automated indentation
  • Color schema makes one feel geeky developer :) especially after watching MatriX
  • Thousands of other feature and plugin and it makes it extremely powerful and fast to work till now

  • TextMate (a high-hyped editor):

  • Snippets to call your programming structures e.g. def+tab will complete the function block
  • Supports almost all languages and frameworks
  • It can open your whole project (in a side pane, left or right side), I prefer right side. I love this feature
  • Allows you to remove reference certain files or folders from project to apply search upon e.g logs, images etc
  • except common feature, it allows full project search (even regular expression)
  • Star Me and CmdT allows to reach any part of the file and to file in your open project by just typing some literals
  • Auto file indent (Cmd] or SftCmd[ )
  • Cmd/ to auto comment line or lines
  • Most importantly, it won't annoy you some red or green light here and there or extra fancy stuff and provide more space to code and keep it elegant
  • I like the twilight theme to work upon
  • Takes up very less memory(as compared to most rich featured editors) and its pleasant to work upon it
  • Textmate

    Recently, I moved to Delhi and started working on Linux and to be frank its a hard transition to work without TextMate. Thanks to VIM again, it wasn’t a hard transition. Gedit is good but its like Notepad of windows and reasonably nothing is there. Than I started making it feature rich owing to the fact its always fast to load and can be my textmate on linux. Thanks to hundreds of plugins available and for such a vibrant community around and the research already done by other folks.

    So lets talk about different plugins for Gedit to make it work fast, efficient, elegant and more like TextMate

    Gedit (conventional and basic editor):

    Here are hundreds of plugins available but choosing the right one is important.

    How to install additional Gedit plugins

    While Gedit ships with a set of default plugins, you can surely add as many as you like. To install a plugin for Gedit, you must first download it to a local folder and then extract the contents to ‘~/.gnome2/gedit/plugins/’ directory. Also look for a package named “gedit-plugins” in your distribution’s package manager, this package contains some additional plugins for gedit. Once you have installed the plugin you want, you need to enable it via Edit -> Preferences and then the Plugins Tab.

  • Snippets -> allows you to insert frequently typed phrases and text by using hotkeys or a shortcode, it supports mostly all the languages
  • Auto Tab  -> detects the indent/space settings in a file and adjusts tabbing accordingly on the fly
  • File Browser Pane -> It open up a whole project in directory structure ( file structure)
  • Right Pane -> For right hand side pane for project viewer
  • Code Comment -> To comment your code (CTL+m)
  • External Tools -> Execute external commands and shell scripts
  • Quick Open -> Its good but not as good as CMDT of textmate
  • Regex Search and replace -> CTL + H for regex search and replace
  • Gemini -> character completion
  • Change Case -> for fast switching case for selected text
  • Class Browser -> List all the methods of class or module, uses Ctags and side pan view
  • Commander -> to provide command line interface
  • Document Statistics -> Analyses the current document and reports the number of words, lines, characters and non-space characters in it.
  • Embedded Terminal and Open terminal here
  • File Search -> Search for text in all files in a directory
  • Session Saver -> Session saver allows you to save you current workspace
  • Snap Open -> A regex open file dialog that resembles that of Textmate
  • Tag List -> Provides a method to easily insert into a document commonly used tags/strings without having to type them
  • Word Completion -> suggestions from all words in all documents in all windows, annoying sometimes
  • Colors and fonts:

    Get all themes from here. But I prefer these two.

  • Rubycious
  • Twilight
  • So, after go through of important features of all these editors. Its one like and dislike or any editor (other than these three). Vim is always the winner, as it comes with these features and the moment you do code review or sit on someone else computers, it takes no time to work on new machine. Vim is a must for any programmer (If I infer it right, it makes you think above conventional ways). On top of it, while working on a project and other than terminal TextMate (Mac) and Gedit (Linux) is no-doubt a better option.

    To comment on Windows based editors GVim, e-text editor with cygwin and notepad ++  seems to be better and fast option.
    Happy Coding!
    Advertisement
    1. Well, nice indeed! But why did you explicitly mentioned “paid version of TextMate” ;-) We ain’t saying anything on that… :D

      • Thanks! I mentioned thats the only licensed software which I ever used for long and liked a lot :)

    2. I have been using Vim from past four years. I also tried emacs once but could not carry on with it because of its painful cursor movement keys. I also tried textmate once for around ten minutes. It required me to use mouse very frequently and I did not like this thing about textmate.

      Search, search and replace, macro, tabs, windows, sessions are very powerful features of vim. But the killer feature of Vim is using h, j, k and l to move the cursor. I definitely can not live without it. Once someone masters this, he will never betray Vim again.

      • Very right, one can’t betray Vim :)

        What I feel, there is reasonably more involvement of mouse in TextMate as compared to Vim, but at the same time it has distinguished feature (as mentioned), with whole project view and has a sleek working experience with it.

        I myself, used both Vim and TextMate as per my usage.

      • sandeep
      • June 13th, 2010

      Thanks for such an effective and thorough comparison of these three biggest text editor giants. It true, there is nothing that can replace TextMate and VIM because of their vast list of features they supports. Heads Of to the Mac/ Linux communities for adding so many Addons/Plugins/Bundles.

      Still, I’m not agree with ur point for not using windows for rails development. I have plenty of reasons for that,

      1. You can use gvim on windows too now.

      2. e-text editor with cygwin installed, I guess the most closet competitor for textmate. Supports all the bundles that textmate can support.

      3. Ease of software installation on windows as compared to others, except few ruby gems/plugins [for those we need some work-around], but thats okay.

      4. RubyMine/Netbeans-for-ruby/Aptana-studio are fully functioned IDE, works very effectively on windows.

      • I do agree one can use gvim or e-text editor with cygwin or Heavy ones (rubymine, neatbeans, aptana-studio) and there are many more. But what I insist, editors play a important role not only for coding or programming but also for managing your machine, the way one like its machine to look like, act like, work like and since Windows is copyrighted and freedom is limited. More, now with Vista and Windows 7 they show up flashy pop-ups and all. It irritates one every time on top of that blue screen. I told you that the different topic to discuss the tug between Windows, Linux and MacOS X.

        I agree with the ease of software installation on Windows but I don’t like it. As I said, I presume one like to dig into machine and little geeky. After all, software engineer is all about that :)

      • sumit
      • June 13th, 2010

      I’ve been using vim for quite some time. As u’ve mentioned its ultra light, and have some of the features which are way ahead of its generation (i’ve read it was launched in 1976).

      Some of the feature like :Sex brings smile to the face of people whenever I give code walkthrough.

    3. I use Gedit on my low-end laptop and Redcar & Netbeans where i can run power hungry Java!

      Life couldn’t have been any better on Linux without these great editors :)

    1. No trackbacks yet.

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Connecting to %s

    Follow

    Get every new post delivered to your Inbox.