lfilho / dotfiles

NeoVim + git + zsh + tmux bliss
BSD 2-Clause "Simplified" License
24 stars 6 forks source link
brew brewfile git neovim neovim-dotfiles prezto prezto-prompt tmux tmux-configs vim vim-configs vim-plugins zsh
 _     _           _
| |   | |         | |
| |___| |_____  __| | ____     Yet Another Dotfile Repo
|_____  (____ |/ _  |/ ___)
 _____| / ___ ( (_| | |        @lfilho's Version
(_______\_____|\____|_|

                                                    Build Status PRs Welcome macos supported linux supported

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

Instructions for Linux

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

Linux installation is finnicky and might require running some of the commands from Rakefile manually. PRs are welcome! :)

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