Floating Sun » vim http://floatingsun.net Mon, 07 Jan 2013 02:53:26 +0000 en-US hourly 1 http://wordpress.org/?v=3.5.1 Emacs vs. Vim http://floatingsun.net/2009/11/22/emacs-vs-vim/?utm_source=rss&utm_medium=rss&utm_campaign=emacs-vs-vim http://floatingsun.net/2009/11/22/emacs-vs-vim/#comments Sun, 22 Nov 2009 23:00:54 +0000 Diwaker Gupta http://floatingsun.net/?p=1164 Related posts:
  1. The Ancient Wars
  2. Emacs vs. Vim
]]>
This is a follow up on my previous post.

Update: Since this topic deserves a little more than a post, I have moved this post to a separate article which I shall keep expanding over time.

]]>
http://floatingsun.net/2009/11/22/emacs-vs-vim/feed/ 1
Reconsidering Vim http://floatingsun.net/2009/11/08/reconsidering-vim/?utm_source=rss&utm_medium=rss&utm_campaign=reconsidering-vim http://floatingsun.net/2009/11/08/reconsidering-vim/#comments Sun, 08 Nov 2009 23:31:03 +0000 Diwaker Gupta http://floatingsun.net/?p=1160 Related posts:
  1. The Ancient Wars
  2. Emacs vs. Vim
]]>
NOTE: This post is not about the editor war — so please don’t try to start one either.

First, some background. Lets just say that I lost my editor virginity to Vim. It was a brief, but violent introduction — the modal editing was too unfamiliar, the learning curve too steep. After dabbling with a few other conventional editors (such as KWrite), I settled upon Emacs (XEmacs actually, but thats another story).

For the next three years, I tweaked my .emacs file, fiddled around with settings and plugins and modes, played games and browsed the web, checked my email and newsgroups, all within the comfortable confines of Emacs. But I was getting wary of the long startup times and (at that time) the inability to use the same interface and features in console mode (such as over SSH) as in GUI mode. It was time to move on.

I rediscovered Vim around 6 years ago. I started with a clean slate. As the saying goes, Emacs is an operating system that also happens to have an editor in it. The relatively more focused feature set of Vim was refreshing in comparison. I loved that I could work in GUI mode, save my session, go back home and resume my session in a terminal over SSH, which the exact same interface and keybindings. I quickly became very productive with Vim, and over the years have honed my plugins, settings and color themes to just how I like them.

But recently, I’ve been thinking about this again, and I might just reconsider Vim. I highly recommend reading these two blog posts to better understand where I’m coming from:

Don’t get me wrong — I think Vim still has a lot to offer. But, I can not deny that Vim is not what I would call a “forward looking editor.” Here’s why:

  • Development community: the Emacs development community is a lot more open and vibrant right now than the Vim community. Part of this has to do with the BDFL model in Vim. Bram Moolenar has done a tremendous job in bringing Vim to the stage where it is. People can and have forked Vim in the past. But for one reason or another, Vim has stayed Vim, and its development trajectory has been slow and incremental.
  • Source code: Vim’s source code is not clean. At all. I just briefly skimmed over the source tree for Emacs 23, and it looks a lot more understandable and well structured.
  • Architecture: Vim 7 finally got spell check. But the spell check does not use any of the existing tools or formats. Vim has its own scripting language, with its own interpreter, grammer and data structures. Why not just use one of the many wonderful programming languages out there? Yes, there are interfaces to allow writing Vim code in Python, Ruby, Perl etc. But why reinvent the wheel all over again?

When Bram Moolenaar — the lead developer of Vim –  joined Google, I had hoped that Vim would generate a lot more interest and enthusiasm. But so far, it hasn’t changed much.

And so, in the next few weeks, I’m going to take another look at Vim as well as Emacs. I’ll try to do an objective evaluation of where the editors stand today, where I perceive they are headed. I hope to make my decision on whether to move away from Vim or not by the end of this year.

Reblog this post [with Zemanta]
]]>
http://floatingsun.net/2009/11/08/reconsidering-vim/feed/ 7
Vim is still sexy! http://floatingsun.net/2009/04/18/vim-is-still-sexy/?utm_source=rss&utm_medium=rss&utm_campaign=vim-is-still-sexy http://floatingsun.net/2009/04/18/vim-is-still-sexy/#comments Sat, 18 Apr 2009 22:04:35 +0000 Diwaker Gupta http://floatingsun.net/?p=1109 No related posts. ]]> NOTE: This post is not about the editor war — so please don’t try to start one either.

I use vim as my editor of choice. As I note above, to each his own editor.

However, Vim is not what one would call a “sexy editor”. After all, it has been around (in some shape or form) since before I was born. It does not generate as much buzz in the blogosphere and is not the darling of all the new kids on the block, as some of the other editors out there. Not many Ruby on Rails developers, for instance, seem to be using Vim for coding (actually, saying that a lot of RoR developers seem to be using Textmate is probably more accurate, but you get the point). It is written in C and does not use git for hosting. The Vim website leaves much to be desired. In the social networking world, Vim barely has a presence.

Vim attitude

But, I contend that Vim still has a lot to offer. Here are few of the things you can check out to spruce up your Vim usage:

I’m also very happy to see the number of Vim related repositories on github. Bottomline: don’t give up on Vim. Vim is still sexy baby, you just need to look in the right places :)

Update: I’m including a screenshot of Xoria below.

xoria, GUI, C

]]>
http://floatingsun.net/2009/04/18/vim-is-still-sexy/feed/ 26
Unsung heroes of the FLOSS world http://floatingsun.net/2006/07/12/unsung-heroes-of-the-floss-world/?utm_source=rss&utm_medium=rss&utm_campaign=unsung-heroes-of-the-floss-world http://floatingsun.net/2006/07/12/unsung-heroes-of-the-floss-world/#comments Thu, 13 Jul 2006 02:38:23 +0000 Diwaker Gupta http://floatingsun.net/blog/2006/07/12/675/ Related posts:
  1. Heroes by choice?
  2. More on heroes
  3. The Physical World as a Virtual Reality
]]>

How many of you have heard of [[http://moolenar.net|Bram Moolenar]]? He’s the author of [[http://vim.org|Vim]] (now working at Google Netherlands, actually). Probably some of you have heard of him. Maybe many of you have heard of him. But how many of you have heard of Dr. Chip Campbell? Not many, I suppose.

One of the hallmarks of popular F/L/OSS (Free/Libre/Open) projects is the excellent community around them (think Drupal or WordPress). Now, I lurk around on a lot of mailing lists, and one of the friedliest, warmest and educational mailing list I’ve seen is the [[http://www.vim.org/maillist.php#vim|Vim users list]].

I see people asking all kinds of questions on this list. From the very basic editing questions (like “how do I delete a word?”) to some really non-trivial stuff. Rarely have I seen anyone been beaten upon for posting a “silly” question. Not only that, people are quick and clever in responding with solutions. It is not uncommon for a “How do I…” question to get tens of responses — detailing how to do the same thing in several different ways. The depth and breadth of solutions is invigorating and the welcoming attitude of the community is heart-warming.

And so, the point of this point. I just want to thank all these wonderful people (Benji Fisher, Yakov Lerner, Dr. Chip, Antoine Mechelynck, Hari Krishna Dara, Yegappan Lakshmanan to name a few) who have made Vim a better editor for me and countless others.

PS: This has nothing to do with Vim, per se. I had to start off with //some// project, and Vim is as good as any other. I’ll come back to other software some other time — in the meantime, why don’t you go and praise some people from your favorite community. Let them know you appreciate their guidance and support.

]]>
http://floatingsun.net/2006/07/12/unsung-heroes-of-the-floss-world/feed/ 4
Vim7 Screenshot: Tabs! http://floatingsun.net/2006/03/04/vim7-screenshot-tabs/?utm_source=rss&utm_medium=rss&utm_campaign=vim7-screenshot-tabs http://floatingsun.net/2006/03/04/vim7-screenshot-tabs/#comments Sun, 05 Mar 2006 02:40:38 +0000 Diwaker Gupta http://floatingsun.net/blog/2006/03/04/601/ Related posts:
  1. Website stats
  2. Firefox regression?
  3. checkoutvim.png (PNG Image, 1440×900 pixels)
]]>



vim7-tabs

Originally uploaded by diwakergupta.

You can see the tabs in action here. Tabs work in console mode as well (which is partly why they are not as pretty, as say tabs in Firefox). You can configure the display of text in invidual tabs (duh!).

]]>
http://floatingsun.net/2006/03/04/vim7-screenshot-tabs/feed/ 0
checkoutvim.png (PNG Image, 1440×900 pixels) http://floatingsun.net/2006/02/23/checkoutvimpng-png-image-1440x900-pixels/?utm_source=rss&utm_medium=rss&utm_campaign=checkoutvimpng-png-image-1440x900-pixels http://floatingsun.net/2006/02/23/checkoutvimpng-png-image-1440x900-pixels/#comments Thu, 23 Feb 2006 21:18:55 +0000 Diwaker Gupta http://floatingsun.net/blog/2006/02/23/575/ Related posts:
  1. Vim 7
  2. Vim7 Screenshot: Tabs!
  3. Reconsidering Vim
]]>
Another Vim7 screenshot — spell checking, completion and tabs, all in console mode!!! Check it out! (Source: [[phraktured.net/blog/|phraktured]]).

]]>
http://floatingsun.net/2006/02/23/checkoutvimpng-png-image-1440x900-pixels/feed/ 5
Query an option http://floatingsun.net/2006/02/19/query-an-option/?utm_source=rss&utm_medium=rss&utm_campaign=query-an-option http://floatingsun.net/2006/02/19/query-an-option/#comments Mon, 20 Feb 2006 02:46:51 +0000 Diwaker Gupta http://floatingsun.net/blog/2006/02/19/567/ No related posts. ]]>
Suffix the option name with a question mark to query its current value, like this: ”:verbose set optname?”. The ”verbose” command prints additional information about how/where the option was last set.

]]>
http://floatingsun.net/2006/02/19/query-an-option/feed/ 0
Vim options http://floatingsun.net/2006/02/13/vim-options/?utm_source=rss&utm_medium=rss&utm_campaign=vim-options http://floatingsun.net/2006/02/13/vim-options/#comments Mon, 13 Feb 2006 23:11:48 +0000 Diwaker Gupta http://floatingsun.net/blog/2006/02/13/547/ No related posts. ]]>
Feel intimidated by the huge number of options in Vim? Try ”:options”. For more information, do ”:he :options”

]]>
http://floatingsun.net/2006/02/13/vim-options/feed/ 0
Vim 7 http://floatingsun.net/2006/02/09/vim-7/?utm_source=rss&utm_medium=rss&utm_campaign=vim-7 http://floatingsun.net/2006/02/09/vim-7/#comments Fri, 10 Feb 2006 06:27:47 +0000 Diwaker Gupta http://floatingsun.net/blog/2006/02/09/537/ Related posts:
  1. Vim7 Screenshot: Tabs!
  2. checkoutvim.png (PNG Image, 1440×900 pixels)
  3. Flickr
]]>

I finally got around to compiling Vim7, and I must say I’m impressed. This is not an invitation for editor flame wars, or claims that M$/other commercial products have been doing this for years now (I will defend those arguments later). For now, I just want to show you guys how awesome Vim7 is.

Two of the most wanted features in Vim have been spell checking and automatic code completion, and Vim7 has excellent support for both of them, and much much more!

Here’s a screenshot of code-completion in action. Its on a Python script, but Vim7 includes support for C/C++/Java/CSS/XML/HTML/JS and of course its very easy to add support for other languages (and remember that Vim7 is still in //alpha// testing officially).

[[http://www.flickr.com/photos/diwaker/97796840/|{{http://static.flickr.com/42/97796840_8dd58b1a7c_m.jpg}}]]

Click on the image to see some notes on the image. And here’s a screenshot of the spell checker in the action. Note the curly red lines under the misspelt word and the spell check suggestions:

[[http://www.flickr.com/photos/diwaker/97796855/in/photostream/|{{http://static.flickr.com/36/97796855_0b1a202d34_m.jpg}}]]

One important thing to note is that **all** these functions work **both in GUI and console modes**. Now, can any of those bulky, bloated IDE’s do this? I do a //lot// of editing over remote shells, and this kind of portability is just perfect for my needs. More on this later.

For now, I’m just pleased that I have Vim7 :-)

]]>
http://floatingsun.net/2006/02/09/vim-7/feed/ 8
Count number of occurances of a search string http://floatingsun.net/2005/11/21/count-number-of-occurances-of-a-search-string/?utm_source=rss&utm_medium=rss&utm_campaign=count-number-of-occurances-of-a-search-string http://floatingsun.net/2005/11/21/count-number-of-occurances-of-a-search-string/#comments Mon, 21 Nov 2005 20:14:12 +0000 Diwaker Gupta http://floatingsun.net/blog/2005/11/21/422/ Related posts:
  1. Word count
  2. Source code search engines
  3. Looking glass: search keywords
]]>
Dipti asked me this a few minutes back, and I was stumped actually. So I headed over to #vim and the helpful folks there were quick to respond with:


:he count-items

Suweet.

]]>
http://floatingsun.net/2005/11/21/count-number-of-occurances-of-a-search-string/feed/ 2