Put your message here! Contact me for more information
 
 







 

Posts Tagged ‘vim’


 

I decided yesterday to work with VIM (MacVim) fulltime for a week and see how it turns out.  It’s been 24 hours, and so far my experience isn’t all that great!  I miss Textmate really badly.  And even though Textmate lacks certain features, working with Textmate isn’t all that bad.  So why change things that has already been working?

Textmate and its brother E-texteditor both have great success because they have features that tremendously improve files and text navigation, and things are just work if you do web development.  I rarely have to dig through my project finder to locate a file since Cmd T (or Ctrl Shift T in E) is there to save the day. Then Cmd Shift T (or Ctrl L foin r E) brings me directly to where I need to be.  Everything happens within a second or two second from knowing where I need to go to getting there.  With Bundles and Zen-Coding support, the editor becomes a deadly tool to slice through any kind of web development.

The biggest reason why I wanted to try Vim out is the split screen support.  I’m really spoiled by the wonderful E-texteditor, and I expect that my other tools would be as nice.  Textmate comes close, but stubbornly doesn’t have split screen.  Ironically E-Texteditor is supposed to be a Textmate clone for Windows, but it ended up with much, much better support for multi-file editing with great split-screen support.  While split screen in VIM works, it doesn’t feel as nice.  I may have not used VIM long enough (however, this is probably my 3rd or 4th attempts to use VIM), but I don’t want to bend backward to find myself trying to work with a text-editor.

Several plugins in VIM have tried with various success to bring Textmate features over, notably CommandT, BufferExplorer, NERDTree, Vim.Rails, and CTags.  Together they solve the issue with file navigations.  However, the other big missing piece is “Go to symbol” feature, and this is really critical for me:  I have to routinely work with CSS files, and without fuzzy searching the classes with CSS selector scope, it is a pain.  For example Textmate, to go to #wrapper .title, I’d need to only hit Cmd Shift T and type w r t i<ENTER> and be done.  In VIM, I have to use / to search for a match, but I don’t have the fuzzy scope select to quickly drill down to the class, so I’d need to further digging through.  I could make my css classes more specific to ease the searching in VIM, but I don’t want to.  My CSS file right now is more than 800 lines, but moving within it in Textmate is a breeze (I use one-liner for CSS class, e.g. selector and declarations are on the same line, #wrapper {… } so 800+ plus lines are 800+ css rules).  Until VIM has a plugin to solve this, I won’t be considering VIM for full-time use.

Personally I feel that my productivity in Textmate is not that bad, so why change things that is not broken?  Granted with VIM, it’s a really powerful editor, but being a pragmatic developer means to use whatever that works for you, I decide that Textmate is good enough.  VIM takes too much to customize to the level of functionalities that I want, and using it so far makes me unhappy.  If VIM is 100% powerful, but need 110% of customization and learning curve to master it that, then I’m happy with Textmate for 90% of the needed functionality and a much better and happier experience.

I finished “Surely You’re Joking, Mr. Feynman!” the other night, and one of Feynman’s living philosophies struck me:  ”so I decided it would always be chocolate ice cream, and never worried about it again.”  (An Offer You Must Refuse chapter)  So I’m going to adopt his way to decide that I will stick with Textmate, and work around it quirks with split-screen.  I admit that I have failed my own self-challenge, but in the end, I’m not too concerned about that.  I made a decision based on my own experience, and that will be it. Vim is forever, but Textmate is good enough for now.

view comments
 

My good friend Stephen Celis convinced me to give Rails.vim a shot for Rails development. My vi skill is not that great yet (e.g. beginner level), so Stephen recommended vimtutor, which does not come pre-installed on my CentOS server. So here’s a quick recap of getting vimtutor installed:

1. Installing “which”, which the vimtutor script uses to detect the vi version and copy the vimtutor script accordingly.

sudo yum install which

2. Installing “vim-enhanced” package, which contains the vimtutor

sudo yum install vim-enhanced

Now you should be able to do “vimtutor” and start a new vimtutor session. Happy h-j-k-l around and stops using the arrow keys :)

view comments