Home

Awesome

 _     _           _
| |   | |         | |
| |___| |_____  __| | ____
|_____  (____ |/ _  |/ ___)
 _____| / ___ ( (_| | |
(_______\_____|\____|_|

# Yet Another Dotfile Repo v1.1
# Now with Prezto and Vundle!

Join the chat at https://gitter.im/skwp/dotfiles

sh -c "`curl -fsSL https://raw.githubusercontent.com/skwp/dotfiles/master/install.sh `"

Always be sure to run rake update after pulling to ensure plugins are updated

What is YADR?

YADR is an opinionated dotfile repo that will make your heart sing

Linux/Ubuntu is not supported! If it works, great. If it doesn't, please don't complain. You may need to install zsh if you don't already have it. That being said, check the Docker section below

Mailing List

Got questions, concerns, want to hear announcements? Join the Google Group

Please use GitHub Issues for pull requests or bug reports only.

Screenshot

screenshot

Installation

To get started please run:

sh -c "`curl -fsSL https://raw.githubusercontent.com/skwp/dotfiles/master/install.sh`"

Note: YADR will automatically install all of its subcomponents. If you want to be asked about each one, use:

sh -c "`curl -fsSL https://raw.githubusercontent.com/skwp/dotfiles/master/install.sh`" -s ask

Wait, you're not done! Do this:

Install iTerm Solarized Colors

YADR will install Solarized colorschemes into your iTerm. Go to Profiles => Colors => Load Presets to pick Solarized Dark.

Remap caps-lock to escape with Karabiner-Elements

The escape key is the single most used key in vim. Old keyboards used to have Escape where Tab is today. Apple keyboards are the worst with their tiny Esc keys. But all this is fixed by remapping Caps to Escape. If you're hitting a small target in the corner, you are slowing yourself down considerably, and probably damaging your hands with repetitive strain injuries.

Set up a system wide hotkey for iTerm (Keys=>Hotkey)

Recommended Cmd-Escape, which is really Cmd-Capslock.

In iTerm, uncheck "Native full screen windows" on General

This will give you fast full screen windows that are switchable without switching to spaces.

in MacVim, uncheck "Prefer native full-screen support" under Advanced settings

Same as iTerm. The native spaces navigation slows everything down for no reason.

If you want to run vim in terminal

Upgrading

Upgrading is easy.

cd ~/.yadr
git pull --rebase
rake update

What's included, and how to customize?

Read on to learn what YADR provides!

Homebrew

Homebrew is the missing package manager for macOS. Installed automatically.

We automatically install a few useful packages including ctags, git, macvim, hub, and the silver searcher ('ag') Note that our autocomplete plugin requires a MacVim that supports Lua. The installer knows how to install it, but if you had one installed before, you may need to manually remove your old MacVim.

ZSH

Think of Zsh as a more awesome bash without having to learn anything new. Automatic spell correction for your commands, syntax highlighting, and more. We've also provided lots of enhancements:

Aliases

Lots of things we do every day are done with two or three character mnemonic aliases. Please feel free to edit them:

ae # alias edit
ar # alias reload

Git Customizations:

YADR will take over your ~/.gitconfig, so if you want to store your usernames, please put them into ~/.gitconfig.user

It is recommended to use this file to set your user info. Alternately, you can set the appropriate environment variables in your ~/.secrets.

RubyGems

A .gemrc is included. Never again type gem install whatever --no-ri --no-rdoc. --no-ri --no-rdoc is done by default.

Tmux configuration

tmux.conf provides some sane defaults for tmux on Mac OS like a powerful status bar and vim keybindings. You can customize the configuration in ~/.tmux.conf.user.

Vimization of everything

The provided inputrc and editrc will turn your various command line tools like mysql and irb into vim prompts. There's also an included Ctrl-R reverse history search feature in editrc, very useful in irb, postgres command line, and etc.

Github Issues: ghi gem

We include the ghi command. Try ghi list and have fun managing issues from command line!

Vim - What's included?

A list of some of the most useful commands that YADR provides in vim are included below. This is not a comprehensive list. To get deeper knowledge, practice a few of these every day, and then start looking into the lists of plugins above to learn more.

Navigation

Search/Code Navigation

File Navigation

Better keystrokes for common editing commands

Tabs, Windows, Splits

Utility

Rails & Ruby

Vim Dev

Extending and overriding YADR settings

Testing with Docker

We can use Docker to test some changes in a Linux Container.

Assuming your host system has Docker & Docker Compose properly installed, run:

docker-compose run dotfiles

This will build the container image if it never built it before (which may take a while -- future times will be faster) and then run a zsh session inside that container for you. There you can play around, test commands, aliases, etc.

Warning: this repo is primarily macOS oriented. So any support for Linux can only be done with the help of the community.

Misc

macOS Hacks

The macOS file is a bash script that sets up sensible defaults for devs and power users under macOS. Read through it before running it. To use:

bin/macos

These hacks are Lion-centric. May not work for other OS'es. My favorite mods include:

Macvim troubles with Lua?

brew uninstall macvim
brew remove macvim
brew cleanup
brew install macvim --custom-icons --with-override-system-vim --with-lua --with-luajit

Terminal Vim troubles with Lua?

Installing terminal vim (with lua) with an RVM managed Ruby can cause the neocomplete plugin to segfault. Try uninstalling vim, then installing with system ruby:

brew uninstall vim
rvm system do brew install vim --with-lua

Pry

Pry offers a much better out of the box IRB experience with colors, tab completion, and lots of other tricks. You can also use it as an actual debugger by installing pry-nav.

Learn more about YADR's pry customizations and how to install