Last active
August 29, 2015 14:01
-
-
Save natdempk/71cd66fd621b233e690f to your computer and use it in GitHub Desktop.
dotfiles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# colors | |
export TERM='xterm-256color' | |
# aliases | |
alias ls="ls --color" # color ls | |
alias sl="ls --color" # fix typo | |
alias mkdir='mkdir -pv' # automake parent dirs | |
# useful python aliases | |
alias pyperf="python -m cProfile" | |
# color greps | |
alias grep='grep --color=auto' | |
alias egrep='egrep --color=auto' | |
alias fgrep='fgrep --color=auto' | |
# easy navigation | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
alias .....="cd ../../../.." | |
alias ......="cd ../../../../.." | |
# quick vimrc change | |
alias vrc="vim ~/.vimrc" | |
alias brc="vim ~/.bashrc" | |
alias tmc="vim ~/.tmux.conf" | |
# infinite history | |
export HISTSIZE="" | |
# ssh tab completion | |
. /etc/bash_completion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rebind prefix to C-a | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# use vi keys | |
set -g status-keys vi | |
setw -g mode-keys vi | |
# support nicer colorschemes | |
set -g default-terminal "xterm-256color" | |
# extended history | |
set -g history-limit 10000 | |
# start indexing at 1 for easier navigation | |
set-option -g base-index 1 | |
setw -g pane-base-index 1 | |
# vi style pane movement | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
# resize using vi movement keys | |
bind H resize-pane -L 5 | |
bind J resize-pane -D 5 | |
bind K resize-pane -U 5 | |
bind L resize-pane -R 5 | |
# if run as 'tmux attach', create a new session if one doesn't exist | |
new-session -n $HOST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
set shell=bash | |
syntax enable | |
filetype plugin indent on | |
set runtimepath=~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after | |
set rtp+=~/.vim/bundle/vundle | |
call vundle#rc() | |
set expandtab | |
set t_Co=256 | |
set hlsearch | |
set smartcase | |
set ignorecase | |
set incsearch | |
set cindent | |
set expandtab | |
set shiftwidth=4 | |
set smartindent | |
set smarttab | |
set softtabstop=4 | |
set tabstop=4 | |
set ruler | |
set encoding=utf-8 | |
set showcmd | |
set background=dark | |
set relativenumber | |
set number | |
set linebreak | |
set showbreak=+++ | |
set showmatch | |
set undolevels=1000 | |
set colorcolumn=100 | |
set backspace=indent,eol,start | |
colorscheme desert256 | |
" mostly support transparent terminal | |
hi Normal ctermbg=NONE | |
" plugin manager | |
Bundle 'gmarik/vundle' | |
" git changes next to line numbers + stats @ bottom | |
Bundle 'airblade/vim-gitgutter' | |
" nice statusline + tab/buffer listing | |
Bundle 'bling/vim-airline' | |
" syntax checking on write | |
Bundle 'scrooloose/syntastic' | |
" easy commenting | |
Bundle 'scrooloose/nerdcommenter' | |
" kernel coding style for C | |
Bundle 'bhilburn/kernel-coding-style' | |
" indentation level guides | |
Bundle 'nathanaelkane/vim-indent-guides' | |
" add ability to refer to surrounding []() etc | |
Bundle 'tpope/vim-surround' | |
" lotsa color schemes (desert256) | |
Bundle 'flazz/vim-colorschemes' | |
" some more colors that don't work totally... | |
Bundle 'chriskempson/base16-vim' | |
" create pairs of [] automatically when typing like subl | |
Bundle 'jiangmiao/auto-pairs' | |
" display line movement | |
nnoremap j gj | |
nnoremap gj j | |
nnoremap k gk | |
nnoremap gk k | |
" disable arrow keys | |
noremap <Up> <Nop> | |
noremap <Down> <Nop> | |
noremap <Left> <Nop> | |
noremap <Right> <Nop> | |
" quick buffer traversal | |
nnoremap <silent> [b :bprevious<CR> | |
nnoremap <silent> ]b :bnext<CR> | |
nnoremap <silent> [B :bfirst<CR> | |
nnoremap <silent> ]B :blast<CR> | |
" command history without up+down | |
cnoremap <C-p> <Up> | |
cnoremap <C-n> <Down> | |
" better pane movement | |
noremap <C-J> <C-W>w | |
noremap <C-K> <C-W>W | |
noremap <C-L> <C-W>l | |
noremap <C-H> <C-W>h | |
" put searches into view | |
noremap <Leader>n nzz | |
noremap <Leader>N Nzz | |
" automatically reload vimrc when it's saved | |
au BufWritePost .vimrc so ~/.vimrc | |
" vim-airline configuration | |
set laststatus=2 | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline_powerline_fonts = 1 | |
" vim-indent-guides config | |
let g:indent_guides_start_level = 1 | |
let g:indent_guides_guide_size = 1 | |
let g:indent_guides_auto_colors = 0 | |
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=red ctermbg=darkgray | |
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=darkgray | |
autocmd BufReadPre,FileReadPre * :IndentGuidesEnable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment