VIM: Open multiple files at once in separate tabs
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
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
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
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
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 ...