VIM: Open multiple files at once in separate tabs

Posted by jason on Jan. 30, 2012, 7:29 a.m.
Tags: config vim

When I use vim, sometimes I like to open multiple files, each in its own tab. To do this, use the -p option:

[jason@jasonmaur.com]$ vim -p file1 file2

I love the -p option but don't like typing it, so I added the following to my .bashrc file ...


VIM: Remember cursor position

Posted by jason on Jan. 27, 2012, 6:43 a.m.
Tags: centos config linux vim

For those who like how vim under CentOS remembers the previous cursor position when you open a file, here's the relevant code from /etc/vimrc. Just put it in your ~/.vimrc file:

if has("autocmd")
    augroup redhat
        "When editing a file, always jump to the last cursor position
        autocmd ...

Fun with VIM, regex, and PHP

Posted by jason on Oct. 14, 2011, 6:52 p.m.
Tags: php programming regex vim

Introduction

I've been having a lot of fun with regular expressions and vim lately, specifically while programming in PHP. Here are a couple of real-world examples where I saved myself a lot of time and increased my vim+regex skills in the process.

These examples are simple: I just ...


VIM, Xdebug, and PHP 5.3 (compiled from source) on Arch Linux

Posted by jason on June 1, 2011, 5:28 p.m.
Tags: arch linux php vim xdebug

I finally got sick of using echo statements to debug my PHP scripts, so I decided to install xdebug and use it from within VIM. I followed this guide, but there were some things that were specific to my setup--namely, using Arch Linux with PHP 5.3 compiled from source ...


My VIM Configuration

Posted by jason on May 21, 2011, 6:19 a.m.
Tags: linux vim

I use VIM as my main IDE when doing any sort of dev work. So, I invested a few hours configuring things so that it would behave a bit more friendly for me. Here are some features in my configuration:

  • Tab completion
  • Syntax highlighting
  • Capital "H" and "L" move left ...