Skip to content
My personal dotfiles, in all their glory.
VimL Shell Python Scala Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
base16-shell @ 21f2ba7
bin
git_template/hooks
gnome-terminal-colors-solarized @ d9fcb57
oh-my-zsh @ 42f739b
solarized
ubuntu
vim
.gitignore
.gitmodules
README.md
Xdefaults
ackrc
autotest
ctags
gemrc
gitconfig
gitignore
gvimrc
irbrc
rbenv-version
rdebugrc
ruby-version
tmux.conf
vimrc
zshenv
zshrc

README.md

INSTALLATION

git clone git://github.com/doxavore/dotfiles.git

Where possible, Vim plugins are installed as git submodules. Check these out by running the commands:

cd dotfiles
git submodule init
git submodule update

Create symlinks (WARNING: this will be destructive if you have existing files here):

ln -nsf ~/dotfiles/ackrc ~/.ackrc
ln -nsf ~/dotfiles/autotest ~/.autotest
ln -ns  ~/dotfiles/bin ~/bin
ln -nsf ~/dotfiles/ctags ~/.ctags
ln -nsf ~/dotfiles/gemrc ~/.gemrc
ln -nsf ~/dotfiles/gitconfig ~/.gitconfig
ln -nsf ~/dotfiles/gitignore ~/.gitignore
ln -nsf ~/dotfiles/git_template ~/.git_template
ln -nsf ~/dotfiles/irbrc ~/.irbrc
ln -nsf ~/dotfiles/oh-my-zsh ~/.oh-my-zsh
ln -nsf ~/dotfiles/rdebugrc ~/.rdebugrc
ln -nsf ~/dotfiles/tmux.conf ~/.tmux.conf
ln -nsf ~/dotfiles/vim ~/.vim
ln -nsf ~/dotfiles/vimrc ~/.vimrc
ln -nsf ~/dotfiles/gvimrc ~/.gvimrc
ln -nsf ~/dotfiles/Xdefaults ~/.Xdefaults
ln -nsf ~/dotfiles/zshrc ~/.zshrc
ln -nsf ~/dotfiles/zshenv ~/.zshenv

Vim's backup and swap files attempt to go into ~/tmp, so ensure that directory exists to avoid getting temp files in your working folder:

mkdir ~/tmp

If you have rbenv installed, you can set the default version with:

ln -nsf ~/dotfiles/rbenv-version ~/.rbenv/version

If you have chruby installed, you can set the default version with:

ln -nsf ~/dotfiles/ruby-version ~/.ruby-version

For Ubuntu-specific shortcuts:

ln -nsf ~/dotfiles/ubuntu/local-share-apps/Eclipse.desktop ~/.local/share/applications/
ln -nsf ~/dotfiles/ubuntu/local-share-apps/HipChat.desktop ~/.local/share/applications/

Note: I've tried to make these scripts usable on Windows, but at the rate this project is evolving and how little I use Windows, I cannot make any guarantees.

QUICKSTART

After installing these dotfiles, initial setup now diverges depending on OS.

Mac OS X

Neocomplete requires lua support. Install MacVim and Vim with support with:

brew install macvim --with-cscope --with-lua --HEAD
brew linkapps macvim
brew install vim --with-lua --override-system-vim

Debian/Ubuntu

Ensure dependencies are installed. ack-grep is required for detection in vimrc (since Mac OS X and Ubuntu have versions that expect different parameters), and ruby and ruby-dev are necessary to have a system ruby to compile Vim Command-T against.

sudo apt-get install ack-grep ruby ruby-dev build-essential ctags libxml2 libxml2-dev libxslt1-dev

Ensure a system ruby is installed, and rvm use system if necessary.

[sudo] gem install bundler cd ~/dotfiles/vim/bundle/command-t bundle install make clean rake make

If you run into issues installing nokogiri < 1.5.4 on Ubuntu, edit ~/dotfiles/vim/bundle/command-t/Gemfile.lock and update it to 1.5.4 or newer (tested fine against 1.5.5 in Ubuntu 12.10).

To use the Solarized color palette in Gnome Terminal:

cd ~/dotfiles/gnome-terminal-colors-solarized ./set_dark.sh # Or: # ./set_light.sh

VIM

My preferences for Vim are stored in vimrc and gvimrc respectively. All plugins and scripts are stored in the vim/ directory.

To enable ctags navigation to installed gems, install the gem-ctags RubyGem, and run gem ctags to generate ctags for existing gems. (Gems installed after gem-ctags will automatically be indexed.)

If using rbenv, install the rbenv-ctags plugin to get Ruby stdlib tags:

mkdir -p ~/.rbenv/plugins
git clone git://github.com/tpope/rbenv-ctags.git \
  ~/.rbenv/plugins/rbenv-ctags

If using chruby, use ~/bin/chruby-ctags to generate stdlib tags.

For ctags support in JavaScript, ensure node.js is installed and:

git clone git://github.com/mozilla/doctorjs.git ~/doctorjs
cd ~/doctorjs
git submodule init && git submodule update
sudo make install

External Requirements

Some of the plugins have external requirements to work properly, but should behave well enough when not installed, so long as you don't use them.

  • ack requires (surprise) ack be installed and available in your path.
  • Command-T must be compiled - please follow its instructions in its docs. (Hint RVM/rbenv Users: You must use the system Ruby when compiling.)
  • TagList requires ctags >= 5 be installed. OSX system ctags doesn't work. Homebrew has a convenient formula to get you fixed up, just ensure your Homebrew path (/usr/local/bin) is in your path before the default /usr/bin/ctags. Since Vim doesn't use an interactive shell, these dotfiles split the $PATH-related entries into .zshenv to ensure it picks up the $PATH you would expect. If ctags >= 5 is in your default system path, you're already set.

Adding Plugin Bundles

Plugins that are published on github can be installed as submodules. For example, to install the JavaScript bundle, follow these steps:

cd ~/dotfiles
git submodule add http://github.com/pangloss/vim-javascript.git vim/bundle/vim-javascript

This will update the .gitmodules file by appending something like:

[submodule "vim/bundle/vim-javascript"]
    path = vim/bundle/vim-javascript
    url = http://github.com/pangloss/vim-javascript.git

As well as checkout out the git repo into the vim/bundle/vim-javascript/ directory. If, after restarting Vim, Git is showing a doc/tags untracked file for your newly-added submodule, edit .gitmodules to add an ignore line for the submodule:

[submodule "vim/bundle/vim-javascript"]
    path = vim/bundle/vim-javascript
    url = http://github.com/pangloss/vim-javascript.git
    ignore = untracked

You can then commit these changes as follows:

git add .
git ci -m "Added the javascript bundle"

Vimwiki

The Vimwiki makes a few assumptions to work properly:

  • You have a Vimwiki directory at ~/vimwiki
  • That ~/vimwiki directory is a git repository with a remote origin
  • On each save to the wiki, you want to push the changes to remote
  • Upon opening the wiki index, you want to pull and merge from remote

If you follow those principles, the following works out of the box:

  • <Leader>ww opens your wiki index
  • <Leader>ws searches your wiki using the ack plugin
  • <Leader>l begins a new timestamped diary entry
  • <Leader>L opens your diary index

RUBY

My preferences for IRB customisations are stored in irbrc. To get the most from these, you should install the following gems:

You can get them in one go with: gem install awesome_print hirb interactive_editor looksee sketches

To use these in a Rails 3 console, you'll need to add them to a development group in your Gemfile:

group :development do
  gem 'awesome_print'
  gem 'hirb'
  gem 'interactive_editor'
  gem 'looksee'
  gem 'sketches'
end

CONTRIBUTORS AND CREDITS

I would never have been able to compile this collection without the hard work done by Drew Neil, Robby Russell, Tim Pope and many others.

Something went wrong with that request. Please try again.