Ivor O’Connor

August 8, 2013

Tutorial / Example VI Using SSH To Edit Remote Hosts

Filed under: howto, IDE, Linux, vi, vim — ioconnor @ 1:28 pm

Your local vi (gVim/Vim) with many of the settings you have painfully setup can be used to edit files on remote hosts. So you can keep your cool colors, most of your key bindings, and most of your tools. I say “most” because obviously your local copy does not have the same environment as the remote copy. If you try to hit the compile key it may not do what you expect. Same is true for your tags file.

:e scp://myusername@myserver/mydirectory/myfile

I have a list of files I routinely edit. So I edit that list of files putting that command on a line and then execute it from that line. Works wonderfully.  I do that by pressing ** over the line in question and having “:map ** “zyy:@z” that line in the equivalent of the ~.vimrc file.


It’s amazing how saving a few keystrokes makes things run so much more smoothly.


March 9, 2013

The Universal IDE: VI with SPF13

Filed under: bash, git, howto, html5, IDE, JavaScript, Linux, mint 14 xfce, php, sqlite, ubuntu, vi, vim, vundle — ioconnor @ 4:08 am

This is a youtube video I made on how to install SPF13 on Linux Mint 14 XFCE. I like learning from youtube videos whenever possible. If in the future I want to install SPF13 and something is not how I remember it I can return to this video. SPF13 makes VI into a universal IDE. It works on most if not all OSs including windows and the mac.  Sure if you are working with something like AIX, HP-UX, or some platform that does not have vim installed SPF13 will not be for you. I’d recommend you put in your base .vimrc commands directly into the .vimrc.local file and use them along with SPF13. Picking and choosing what you find works.

UPDATE 2013-03-08: Insert the following line into your .bashrc file before starting to get full colors: export TERM=”xterm-256color”

February 19, 2013

The Vim Vundle: spf13-vim

Filed under: bash, IDE, vi, vim, vundle — ioconnor @ 5:41 am

The SPF13 vundle is quite interesting. It is a pre-configured IDE for vim. It comes with quite a few of the best sub-vundles already built in. And works on Windows and Macintoshes just as it does on Linux. However it totally changes vim the look of vim and removes the modifications you may already be comfortable with. When finished installing your vim will look nothing like anything you may have been comfortable with before.

Take the install script and copy it into a file. Run that file. Be prepared to spend hours learning the new tools!

February 7, 2013


Filed under: bash, css, git, html5, JavaScript, Linux, pdo, php, vim, vundle — ioconnor @ 12:36 pm

Vundle is the new package manager for vim plugins. I’m thinking it will be largely responsible for making a resurgence in the use of vim because it allows clean installs of IDE tools for various environments. Allowing easy file navigation, editing, compiling, debugging, and all the other things you might want to do. However vundle is new and largely unknown. Take a look for it in any vim book and you won’t find it. This post will be continuously updated until it has the information I find useful and need on a routine basis. My first effort will be in setting up an environment for PHP, javascript, html, css, bash, c/c++, git, pdo, and mysql/sqlite3 development. So I’m thinking there will probably be a flurry of updates to this post over the next few months.

First off auto installing vundle. I stole the following from this site but had to remove the EOL comments to make it work. Make a copy of your existing “.vimrc” and then add the following to the end of your .vimrc file:

" Setting up Vundle - the vim plugin bundler
let iCanHazVundle=1
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
echo "Installing Vundle.."
echo ""
silent !mkdir -p ~/.vim/bundle
silent !git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle
let iCanHazVundle=0
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
"Add your bundles here
Bundle 'Syntastic'
Bundle 'altercation/vim-colors-solarized'
Bundle 'https://github.com/tpope/vim-fugitive'
"...All your other bundles...
if iCanHazVundle == 0
echo "Installing Bundles, please ignore key map error messages"
echo ""
" Setting up Vundle - the vim plugin bundler end

Then type in to vim “:BundleInstall!” and watch it install before restarting vim.

2013-02-08 UPDATE: Interesting links:

April 16, 2010

Best “diff” utility?

Filed under: bash, diff, git, sdiff, vim — Tags: , , , — ioconnor @ 3:47 pm

I was noticing two files were containing the same information earlier and I wanted to compare them. Without thinking I did a diff on them. Then I got to thinking there must be more visual diffs. Git for instance. With all the diffs they do their it must be very nice. Unfortunately when I looked at git diff it seemed to only work for versions of the same file. If this is not the case please correct me. I then tried vimdiff. It’s nice but the default color scheme is not workable and I did not want to spend an hour playing with it. (Why don’t the vim folk make a nice little popup that lets you modify colors easily. DUH!) So then I used sdiff. sdiff seems to work most intuitively but it’s ancient.

Anybody have better solutions?

Blog at WordPress.com.