Wednesday, November 01, 2006

Tabbed Editing in Vim

Another quick Vim tip:

Did you know that you can use multiple tabs in both Vim and GVim? Well you can:

To create a new tab, enter the following in command mode:

:tabnew


To cycle through tabs, enter the following in command mode:

gt


There's such a huge amount of stuff to learn about Vi/Vim/GVim. I'm chipping away at it and actually I'm enjoying using the editor. I am trying to use it for most of my writing/posting lately in order to get more familiar with it and it's working. My learning style has always been very light on memorization and heavy on learning by doing. Seems to work well in this case since the Vi command set is so bloody big and I only really need to learn a subset for my purposes - I think everybody probably only learns a subset ;)

6 comments:

Donncha said...

:tabnew didn't work in my vim, is it a gvim feature?
I use :split to open new files, with ctrl-w to jump between windows. ctrl-_ to maximize window, ctrl-= to make them equal. Dead useful stuff.

RichardQuerin said...

I have tried :tabnew in Gvim and Vim and it seemed to work in both. I am running Vim inside of Cygwin at the moment but it shows the tabs at the top (in text form obviously) nonetheless. I'll give it a shot when I get home tonight to verify on my linux box.

I've used :split a few times but it seems less intuitive to me than tabs. But I didn't know about the maximize/equalize functions. Thanks!

Anonymous said...

Cool, add the [Tab name] after :tabnew and you can name your tabs.

Anonymous said...

Richard, the "http://beta.blogger.com/login.g?d=http%3A%2F%2Fwww.blogger.com%2Fcomment.g%3FblogID%3D11684072%26postID%3D116239652161967105%26zx%3D1xw8mj
Sign in with your Google Account" thingy on your comments doesn't work. It harvests my Google login and passowrd ok but then returns me to the comment page and tells me I must login. What is the magic, do you know?

Will Simpson - linux . photo . geek @ gmail . com (remove spaces)

RichardQuerin said...

Will,

I'm not sure about the login thingy. I *don't* get pushed to a beta.blogger url to sign in. Just blogger. And as far as signing in, I'm using my blogger id and pwd which is different from my Gmail login info. I'm a bit confused. I've tried the commenting link and it gives me no problems. Care to expand/clarify for me?

And BTW - great tip for the tab naming!

Anonymous said...

Richard, I guess I was confused by the "Sign in with your Google account". It probably should say "Sign in with your Blogger account" I was using the only google account I have which is a gmail/google.reader account.

I'll just stick with an 'Other' identity