Giter Club home page Giter Club logo

dotset's Introduction

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/basrc_local.example ~/.basrc_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'
  export GITHUB_TOKEN='Your GitHub token'

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

Tune that thing.

Tips

Turn caps lock into the control key

The control key is in an awkward position and the caps lock key is basically useless. It's right there in the home row, so you might as well put it to good use.

  1. Open up System Preferences
  • Select Keyboard
  • Select Modifier Keys
  • From the drop down, select ^ Control under the Caps Lock setting
  • In the Select Keyboard drop down, set it for both internal and external keyboards

Fonts

You look at text all damn day. Do yourself a favor and install the MesloGM font and rock the medium variant, size 12.

Mouse support for Terminal

To get full mouse support (scrolling, clicking, etc...) within Terminal Vim, install the SIMBL MouseTerm plug-in. It brings the goodness.

MSCheat

Within Vim type :h mscheat to view key and leader bindings for the Mode Set configuration.

Remote Pairing (with tmux)

We use shared tmux sessions for remote pairing. This requires ssh or similar connections so your IP addresses have to be accessible. For stable and fast connections over WiFi we highly recommend using mosh it sets up a udp connection that is more tolerant of wireless latency. Then just install tmux and the clipboard shim to improve the copy and paste functionality between the user session clipboard and the tmux session. Also install the MouseTerm plugin for a more native scrolling experience.

  1. Creating a session with wemux

    wemux start
  • Attaching to a session Assuming you are shelled into a machine with a running tmux session:

    wemux

dotset's People

Contributors

andresmc1995 avatar gvarela avatar jedschneider avatar mkitt avatar process255 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.