Skip to content

modeset/dotset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mode set

We ♥ the Vim.

dotset

The default configuration files for Bash and Vim used at Mode Set. Tuned to play with Apple's Terminal.app.

Installing and updating is handled by the ./dotset script. Utility functions are provided by the ./dotils script.

Version: v1.0

Installation

Get this party started:

git clone https://github.com/modeset/dotset.git
cd dotset
./dotset install

Tasks

Usage: ./dotset [install update uninstall backup help]

Commands:
  install      Installs dot files, vim files, and various executables
  update       Removes existing setup and installs fresh from git
  uninstall    Restores original dot files (or latest backup)
  backup       Backup the existing dot files from the ~/ directory
  weekly       Runs a weekly update script to keep your machine pure
  help         Print this message

Install

Installing dotset works based on the following directory structure:

  • bin: Executables that will melt your brain. Directory is symlinked
  • config: Support assets for building out the dot files Used only for configuration
    • bundles.txt: the list of default Vim bundles to install
    • bundles.local.txt: the list of user Vim bundles to install (gitignored)
    • gems.txt: the list of default gems to install when running ./dotils regem
    • gems.local.txt: the list of user gems to install when running ./dotils regem (gitignored)
  • dots: Various rc type files for Bash, Vim, and System settings. All files are symlinked to ~/ direcectory with a dot (.) in front of them
  • extras: Terminal themes and templates. Nothing installed, manually install these
  • vim: Directories of files that are symlinked into ~/.vim/. Only files are symlinked and not entire directories

Update

It's recommended to run ./dotset update once a week. While the repository might not change very often, most Vim plugins are updated quite frequently.

The update script will temporarily uninstall all of the dot files in the ~/ directory which were created by dotset in the first place, pull down the latest dotset updates and reinstall everything fresh. It's important to note this, as anything you create within ~/.bin/, ~/.vim/ that is not connected to this repository will be completely blown away.

Backup

Dotset creates a backup of any files it may be overriding. It only creates a new backup when the ./backup/ directory DOES NOT exist. If you want to generate a new backup, just delete the ./backup directory and run a new install or just call ./dotset backup.

Don't care about backups? Just create an empty ./backup/ directory.

Uninstall

To remove files created by dotset and restore from the ./backup/ directory, run ./dotset uninstall

Weekly

Wrapper script for updating various packages including: homebrew, pow, gems, npm (including global npm packages), and software update. It will also call ./dotset update to make sure you have the latest. Run this puppy once a week.

Extras, but really just install these

Within the ./extras/ directory are the bashrc_local.example and vimrc.local.example files. These are used as templates for overriding or creating new settings for Bash and Vim. To create these files run the following from your ~/ directory:

  cp ~/path/to/dotset/extras/bashrc_local.example ~/.bashrc_local
  cp ~/path/to/dotset/extras/vimrc.local.example ~/.vimrc.local

The files ~/.basrc_local and ~/.vimrc.local are sourced by .bashrc and .vimrc respectively. It's a good idea to back these files up somewhere.

Also included are a few .terminal color themes. Import these themes into Apple's Terminal.app and set one as the default. The default color theme for Vim is colorblind. If you want to rock the alternative color polarized as the default, add the following in your .vimrc.local file:

  colorscheme polarized

Settings

Rock a sweet Bash setup

The Bash setup is fairly bare bones out of the box. To override or add any additional settings create the .bashrc_local file and add any customization.

Within this file you should have the following environment variables set:

  export GIT_AUTHOR_NAME='Your Name'
  export GIT_AUTHOR_EMAIL='your@email'
  export GIT_COMMITTER_NAME='Your Name'
  export GIT_COMMITTER_EMAIL='your@email'
  export GITHUB_USER='Your GitHub Username'

Since the .gitconfig file does not contain any user info, these are required to identify who you are.

The default Bash settings support the rbenv environment.

Pimp your Vim ride

We roll a custom installation of Vim over the default Mac installation. Within the ~/.bash_aliases file is an alias to homebrew's installation for the Vim executable. This executable is installed with ruby, python, and various other enhancements.

The default configuration comes with various language and tooling plugins. To add additional plugins, create the file ./config/bundles.local.txt and add the git url for the plugin (similar to the bundles.txt file). This file is checked every time the install and update script is run.

The ~/.vimrc file sources ~/.vimrc.local. Include this file to override existing settings or set your own. At the least you should have one of these that sets the following attribute:

  g:snips_author= "Mansfield"

Place this file in your ~/ directory and backup accordingly.

We've created a list of plugins we've run in the past or that might be useful for your particular environment.

Note: All settings are tuned to work within a Terminal. This means there are no gui settings, including the color themes. We only sport Vim in Apple's Terminal. Keepin' it minimal.

External dependencies

To take advantage of certain Bash and Vim settings, install the following:

Program Installation
ack brew install ack
ctags brew install ctags
hub brew install hub Note this is required!
macvim brew install macvim
node brew install node
mosh brew install mobile-shell
tmux brew install tmux
tmux-clipboard brew install reattach-to-user-namespace
wemux brew install wemux
rbenv brew install rbenv
pow curl get.pow.cx
coffeetags gem install coffeetags
red carpet gem install redcarpet
pry gem install pry
jshint npm install jshint -g
jsonhint npm install jsonlint -g

dotils

The ./dotils script runs a few extra utility commands for setting or resetting up the machine.

  Usage: ./dotils [regem osx help]

  Commands:
    osx          Sets reasonable OS X defaults for a new system [http://mths.be/osx], take a look before running.
    help         Print this message