Configuration files for several command-line tools
Vim script Shell
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
other
snippets
.ackrc
.aliases
.bash_profile
.ctags
.gitignore
.inputrc
.jshintrc
.tcshrc
.tmux.conf
.zshrc
README.md
battery.sh
cutinate.sh
generate-html.sh
gvimrc
install.sh
reload-browser.sh
settings.json
vimrc

README.md

Dotfiles

This project contains configuration files for various command-line tools.

Requirements

This installation provides defaults for:

You might want to install Homebrew, and then issue the following commands:

  • brew install vim (this installation requires the Vim editor as provided by Homebrew, and will not work properly with the Vim bundled by default with macOS, because of the +clipboard option.)
  • brew install node
  • brew install ctags (required by the Tagbar vim plugin)
  • npm install jshint -g (required by the JSHint vim plugin)

For maximum compatibility with the vim-airline plugin, you might want to install the patched version of DejaVu Sans Mono and Inconsolata for Powerline.

Install Pathogen:

mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

Installation

  • Install requirements as described in the previous section.
  • Clone the repo from Github into a hidden folder named .dotfiles:
    • cd ~
    • git clone git@github.com:akosma/dotfiles.git .dotfiles
    • cd .dotfiles
  • Run the install.sh folder to create symlinks and clone plugins in the ~/.vim/bundles folder:
    • ./install.sh

Features

These configuration files provide the following features, among many others:

  • In zsh:
    • Custom prompt with more information and with visual contrast.
    • The ascstats command shows statistics about number of words in the current Asciidoc files.
    • The updateall command updates of Homebrew, and these dotfiles to the latest versions.
    • The gitsvnpush command synchronises a local Git repo with a remote Subversion repository.
    • Custom output for the git log command.
    • The fixopenwith command solves a common problem in OS X.
    • The timestamp command returns the current Unix epoch time.
  • In tmux:
    • [SHIFT + left arrow] and [SHIFT + right arrow] switch windows to the next (or previous.)
    • [SHIFT + down arrow] creates new windows in the current session.
    • Battery level displayed in the status line.
  • In Vim / MacVim:
    • [F5] opens Gundo at the left.
    • [F6] removes whitespace from the current buffer.
    • [F7] shows the YankRing buffer at the bottom.
    • [F8] opens Tagbar at the right.
    • [CTRL + O] toggles the NERDTree at the left.
    • [CTRL + T] in MacVim open the CtrlP plugin window.
    • [CTRL + j] and [CTRL + k] nudge text up and down.
    • zz centers the current line in the middle of the screen in normal mode.
    • <Leader>+mark opens the current file in the Marked 2 application.
    • <Leader>+json formats the current JSON on the editor for readability.
    • <Leader>+PR toggles MacVim in a "presentation mode" with bigger fonts, for demos and teaching.
    • <Leader>+WR toggles MacVim in a "writer mode" with bigger fonts, nicer layout and tools for writing text.
    • ctags syntax definitions for Asciidoc, Makefiles, Markdown and Objective-C.

Custom configuration

If you want to add your own configuration to zsh and tmux, add it to the files named .local_bash_profile and .local_tmux.conf in the .dotfiles folder; the contents of these two files will be loaded automatically at the end of the respective configuration files.