Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Personal stuff with configuration, custom scripts and aliases for Ubuntu
VimL Shell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
dotfiles
README.rdoc
colors
install-dotfiles.rb
installation.sh

README.rdoc

Ubuntu Settings

Some custom scripts I want to have available on every Ubuntu pc.

Some vim scripts too.

Major thanks to Relavance's etc project: github.com/relevance/etc

Installation

If you don't have git installed, wget the installation file first:

wget http://github.com/iain/ubuntu_settings/raw/master/installation.sh

Run it:

sh installation.sh

To update, after installing:

cd ~/.ubuntu_settings
git pull origin master
ruby install-dotfiles.rb

What's in it?

Some examples:

Pretty colors in bash

I use 2 lines at the moment for the prompt. The first will contain the user (green if normal user, red if root), followed by the directory The next line starts cleanly with the dollar-sign or hash-sign. Mostly used commands, like grep are also colored.

Version control

Borrowing from relavance's etc-project on github, I optimized the VCS prompt for ubuntu and color usage. You can however easily change it for OSX by commenting out a line in it.

It changes your prompt to show the current vcs (git, svn, bazaar). In git, it will show the current branch, in yellow if it's clean (no uncommited changes) and in red if you made uncommitted changes. In SVN it will show the revision, again in yellow if unmodified and red if modified.

After the branch or version it shows in which subdir of the project you are.

It contains some aliases to help you:

  • “cdb” goes to the base dir of the project

  • “st” shows changes, and for svn it'll behave like git, so if you're in a subdir of the project, it'll still get status for the entire project

  • “d” will show the diff, even with color for SVN

  • “up” will always pull or update

  • “commit” will always commit

It also sets the title of your terminal to something sweet so you can see which tab is doing what (one running the server, the other running tests, etc).

Also some default gitignore and gitconfig files. Update them to suite your needs.

A lot of aliases

Again, borrowed from Relevance. See dotfiles/bash_aliases.sh for that.

Ruby stuff

There are a number of aliases, like 'dbm' which migrates the development database and copies it to test (handy for autotest).

Installation installs a lot of stuff for Ruby development.

Project aliases

Edit ~/.bashrc and edit the first line, and add more if you like

PROJECT_PARENT_DIRS[0]="$HOME/code"

Now every subdir of one of the PROJECT_PARENT_DIRS is an alias. If you have a dir “~/code/awesome” then “awesome” will be an alias to cd to that dir.

VIM

Just some of my favorite vim settings, my favorite theme (twilight) and some handy keymaps.

It also marks whitespace at the end of lines as erros (dark red in twilight theme).

Inluded are HAML and SASS syntax files.

Autotest

A libnotify hook, with nice ruby icons and works with RSpec. Works incredibly well with the new notify system in Ubuntu 9.04

irb

A lot of handy irb stuff, like syntax highlighting and showing performed queries in script/console

Something went wrong with that request. Please try again.