This repo will contain the dot files I use to configure my system. The
bin directory contains some utility scripts that get copied to ~/.bin
.
git clone [email protected]:nithinbekal/dotfiles.git
cd dotfiles
bin/install
My editor of choice is vim, and I use Neovim from the terminal.
My setup depends on Neovim, ag, fzf and ripgrep.
Tmux needs reattach-to-user-namespace to make sure pbcopy and pbpaste commands work properly.
brew install neovim ag fzf ripgrep reattach-to-user-namespace
Battery status: To setup battery status in tmux, the following is required:
wget https://raw.github.com/Goles/Battery/master/battery
mv battery /usr/local/bin
chmod u+x /usr/local/bin/battery
vim-airline is configured to use powerline fonts to display non-ASCII characters. To get this to work, powerline fonts need to be installed.
git clone https://github.com/powerline/fonts.git /tmp/powerline-fonts
/tmp/powerline-fonts/install.sh
rm -rf /tmp/powerline-fonts
Then, set a powerline font in Preferences > Profile > Text > Non-ASCII font. I use Menlo, which is not available in powerline fonts, but "Robot Mono for Powerline" works well with it.
Since macOS Sierra (10.12):
- System Preferences > Keyboard > Modifier keys: Set Caps Lock to Escape.
- Preferences > General > Load preferences from custom folder or url
- Set it to
dotfiles_path/items2/com.googlecode.iterm2.plist
- Set it to
My config for VS Code and Sublime are in editors/
, but these are not
automatically installed.
VS Code has problems with repeated keystrokes with the vim plugin on MacOS, (details) so this command needs to be run to fix that:
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false
I use pry for debugging Ruby programs, and I've set up an .inputrc
file
to use vi mode and add a couple of shortcuts in normal mode:
C-n: execute next line (equivalent to typing "next" and hitting enter)
C-s: step through the code (equivalent to typing "step" and hitting enter)
function tmux-my-project {
cd my-project
tmux start-server
tmux new-session -d -s myproject -n main
tmux split-window -h -p 34
tmux new-window -n server
tmux select-pane -t 1
tmux send-keys "bundle exec rails server" C-m
tmux select-window -t 1
tmux select-pane -t 1
tmux send-keys "nvim" C-m
tmux -u attach-session -d -t myproject
}