yjlintw / dotfiles

NeoVim + git + zsh + tmux bliss
BSD 2-Clause "Simplified" License
0 stars 0 forks source link
 _     _           _
| |   | |         | |
| |___| |_____  __| | ____     Yet Another Dotfile Repo
|_____  (____ |/ _  |/ ___)
 _____| / ___ ( (_| | |        @lfilho's Version
(_______\_____|\____|_|

                                                    Build Status PRs Welcome macos supported linux supported

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

Table of Contents:


Installation

One liner for OSX

To get started please run:

sh -c "`curl -fsSL https://raw.githubusercontent.com/lfilho/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/lfilho/dotfiles/master/install.sh`" -s ask

Instructions for Linux

Please do help us improving Linux support in this repo ;-)

  1. Make sure you have zsh installed on your machine (default location is /bin/zsh). Type zsh --version to see if you have it. If not, install it running the command sudo apt-get install zsh
  2. Make sure you have vim installed. If not, install it with sudo apt-get install vim
  3. Run the one liner installation script (see OSX section above)
  4. If asked, provide your superuser password
  5. Configure your terminal program to point the command to zsh (default /bin/zsh)
  6. Restart you Terminal
  7. You're done.

TIP: You can check the Dockerfile to see what's need for a basic installation.

Wait, you're not done!

Remap caps-lock to esc!

The esc key is the single most used key in vim. Old keyboards used to have Esc where Tab is today. Apple keyboards are the worst with their tiny Esc keys. But all this is fixed by remapping Caps to Esc. 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.

For OSX: with Karabiner Elements (you can install it via brew)

For Ubuntu: dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:swapescape']"

TODO / IDEA: Automate this step (saving Karabiner-Elements' .json and loading it after installing the app)

Upgrading

Upgrading is easy.

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

What is YADR?

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

What is (this fork's version of) YADR?

This is @lfilho's fork of the great work done by Yan (@skwp), Yadr.

I've been using Yadr since 2013 but since a couple of years ago my preferences and configurations started to diverge too much from upstream. So now my repo is barely mergeable with the original one. Although I'm still a contributor there, my main focus should on my fork (unless we converge again in the future of course :-)).

Here are the differences in a nutshell (also make sure you read the What's included, how to learn, how to customize? section):

What's included, how to learn, how to customize?

The best way to learn the answer the the above questions is to browse the README files in each directory (starting with this one). For example, if you're insterested in seeing which vim plugins are there, as well their keymaps, head to nvim/README.md and start from there, proceeding to its subfolders' README and finally to each configuration file (there will be more specific comments inside each file).

Docker Support

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 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 primarly OSX oriented. So any support for Linux can only be done with the help of the community.

Testing

We have a basic automated CI testing for both Linux and OSX. Head to test/README.md for more details.

Screenshot

Here's how my zsh prompt looks like on iTerm:

And here's another example inside a tmux's pane with tmux's statusline (powerline style):

It's using Gruvbox colors. For screenshots on how Vim looks with Gruvbox, you can check their gallery out.

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.

OSX

See Other recommended OSX productivity tools.

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

bin/osx

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

Credits

See Credits & Thanks