Giter Club home page Giter Club logo

dotfiles-1's Introduction

Nithin Bekal's dotfiles

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.

Install

git clone [email protected]:nithinbekal/dotfiles.git
cd dotfiles
bin/install

Vim and Tmux

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

Tmux

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

Fonts

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.

Map Esc to Caps Lock (macOS)

Since macOS Sierra (10.12):

  • System Preferences > Keyboard > Modifier keys: Set Caps Lock to Escape.

iTerm Settings

  • Preferences > General > Load preferences from custom folder or url
    • Set it to dotfiles_path/items2/com.googlecode.iterm2.plist

Other editors

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

Pry Debugging

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)

Example function for starting up a Rails project in tmux

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
}

dotfiles-1's People

Contributors

nithinbekal avatar

Watchers

 avatar  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.