Ivor O’Connor

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 7, 2013

vundle

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
endif
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 ""
:BundleInstall
endif
" 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?

August 11, 2009

My GIT Tutorial For Ubuntu: PART 2

Filed under: git — Tags: , , , , — ioconnor @ 6:36 pm

How do you push your changes to a new remote repository if you created the local repository with “git init”? Most developers probably start their projects using git on their local hard disk. When it comes time to making a remote repository for other people to pull from do the following:

Make a bare bone git repository on the server and then push to it from the head of your local repository:

ssh your-user@www.your-server.com
mkdir -p ~/some-path/…/…/your-repo.git
cd ~/some-path/…/…/your-repo.git
git –bare init
exit

cd your-local-git-repository
git remote add origin your-user@www.your-server.com:some-path/…/…/your-repo.git
git push origin master

Notice the syntax of the “remote add”. There is no “ssh://” as shown in some tutorials. And it’s important to avoid hard coding the path on the remote server by using the colon. If you get a
fatal: ‘your-repo.git’ does not appear to be a git repository
error when doing the push you can remove the origin with the command “git remote rm orgin” and continue trying the add until you get it right.

Notes:

  1. You probably need to set up your ssh keys first as described in a past post here.
  2. The first part of this git tutorial started here.

Blog at WordPress.com.