vim and vigor

This post represents some notes and thoughts while learning vim. It's been updated and rearranged countless times, so it might seem a little disjointed.

Note, I originally started writing this sometime around 8-15-2012...

I'm finally learning how to use VIM. It's quite possibly the most geekily arcane thing I've ever done. During my first few days of using vim regularly, I'm finding it hard to go from using an email client or some other non-modal app and get back into that 'VIM mindset'. Once I got my head around 'normal' mode and the motion keys, things got a lot better. Understanding the difference between buffers, windows, and tabs in gVIM was also a hurdle.

I was initially confused by gVIM occasionally splitting it's main window into multiple windows, but apparently it splits automatically when there are unwritten changes to the current buffer/file. Due to this confusion, I tried briefly using tabs in gVIM to handle multiple files. This did not go well and I decided to try and use gVIM without tabs since it seems more in the spirit of the 'VIM-way'. Those graphical tabs seem to be a bolt-on anyway, plus I'm not yet to the point where I would have any extensive projects open in VIM so switching buffers is not unwieldy yet. End of week update...multiple/split windows can be handy to reference one file while editing another (a bit like having two windows open on dual monitors). Also, ctrl-w commands to jump from one window another are really the way forward here.

I have my graphical cheat sheet perched just above my keyboard and some sticky notes with handy commands not covered by the sheet. After a few weeks (or has it been months already?) all of this vim weirdness is starting to get it into my fingers...I'm seeing how fast text wrangling can get.

my annotated vi graphical cheat sheet

Update (unknown date),

I'm in a strange transition period where VIM will occasionally surprise me with its behavior, however I really miss the modal functionality whenever I'm in Visual Studio or SQL Server Management Studio. And what is the deal with yanked text from VIM not making it onto the system pasteboard? Ah, that's because I hadn't yet discovered the named registers. Specifically, that I should yank text to the *-register and it will then show up on the system clipboard (should work on windows and linux). I also didn't understand how the double-quote key is the signifier to name a register (to yank to or paste from).

Update 10-15-2012,

I found a good article by vim creator. He advises learning a few basics and focusing on trying to become more efficient at small common tasks. I have to agree, this is where my best progress has been made, so hopefully I'm on the right track with regards to becoming more profiecient with vim.

Update 11-21-2012,

I installed spf13 vim-distro on my home system running Linux Mint. The spf13 color scheme conflicts with the Linux Mint terminal color scheme, which made vim unusable. I couldn't see the cursor and I couldn't distinguish most text from the background. I was hoping to take a shortcut to a tricked-out vim setup where I didn't have to do any configurations or plug-in installation. I'm glad I didn't spend much time with spf13...it was really the wrong direction for me to take. I ended up with a bunch of stuff that I didn't know how to use and no context for me to know how tweak it. Opening the .vimrc configuration file that spf13 created was the last straw. It was a strange landscape full of fancy plugins and settings. Instead of trying to familiarize myself with all that complexity, I realized (again) that it's much better to go from the ground up.

After using 'vanilla' vim on linux systems for a while, it bothers me that the cursor doesn't change shape under INSERT mode. I really like the visual cue in gVim or Sublime-Vintage when the cursor changes from a block to a thin vertical line. I know plain-old vim shows -- INSERT -- at the bottom of the screen, but it's nice to have that little bit of fancy UI for the cursor...it's where your eyes are looking anyway.

I discovered and completed the vimtutor training built into the terminal/vim on linux (just type vimtutor into terminal!). This was surprisingly good practice...especially with delete/put and yank/put.
I'm finally starting to understand how that grey-beard programmer down the hall can be actually be productive even though they're a 2-finger typist.

Update 03/27/2013,

Good perspective (if a little depressing)...
Just Use Sublime Text

And a Stack Overflow question on vim with passionate responses with an overwhelming number of tips. The first answer is great, if rather long. That answer points out that some of the vi conventions go all the way back to before computers had electronic displays. Now, if we're going to stick with the same techniques needed when the user couldn't see a live copy of the text they were editing, they better be saving us lots of keystrokes. I'm not saying it's not worth it, but it might explain some of vim's opacity and difficult learning curve.

Update 06/20/2013,

Just had my IT-OPS guy install the VsVim Visual Studio plugin for me (yes, I work in a shop where dev's aren't allowed to install their own software), and I'm having fun in Visual Studio for the first time in years! A co-worker had previous experience with VsVim and told me it was flaky and not worth running, but this was maybe a year ago. However, I recently found VsVim on github and saw that it has been under active development, so I decided to give it a try. I wish I'd installed this sooner, it'll make everyday work better in VS...especially now that I'm using VS almost exclusively for tSQL coding.