Skip to content

Instantly share code, notes, and snippets.

@nwalker
Last active August 4, 2017 15:36
Show Gist options
  • Save nwalker/79e5c19a4a46873fd05e to your computer and use it in GitHub Desktop.
Save nwalker/79e5c19a4a46873fd05e to your computer and use it in GitHub Desktop.
#unbind C-b
#set -g prefix C-a
set -g base-index 1
set -g default-terminal "screen-256color"
set -g terminal-overrides "xterm*:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:smkx@:rmkx@:smcup@:rmcup@"
setw -g xterm-keys on
#setw -g mode-mouse on
#setw -g alternate-screen on
unbind %
bind v split-window -h
bind h split-window -v
bind C-r source-file ~/.tmux.conf \; display-message "Config reloaded..."
set -g status-utf8 on
set -g status-bg black
set -g status-fg green
set -g status-justify left
set -g status-left "#[fg=yellow][#h:#S]"
set -g status-left-length 30
set -g status-right '#[fg=yellow]"#T" [#(date +" %H:%M ")]'
setw -g window-status-current-format '[#I:#W#F]'
set nocompatible
if $SHELL =~ 'bin/fish'
set shell=/bin/bash
endif
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
call plug#begin('~/.vim/plugged')
Plug 'edkolev/erlang-motions.vim'
Plug 'ctrlpvim/ctrlp.vim' | Plug 'j5shi/ctrlp_bdelete.vim'
Plug 'rking/ag.vim'
Plug 'altercation/vim-colors-solarized'
call plug#end()
silent! call ctrlp_bdelete#init()
set nu
set ts=8 sw=4 sts=4 et si
set cursorline scrolloff=999
set backspace=indent,eol,start
set incsearch hlsearch
let g:ctrlp_open_new_file = 'r'
set laststatus=2
au FileType erlang
\ setlocal ts=4 sts=2 sw=2
au FileType make
\ setlocal noet sw=8 sts=0 ts=8
" get rid of whitespaces
highlight ExtraWhitespace ctermbg=red guibg=red
au ColorScheme * highlight ExtraWhitespace guibg=red
au BufEnter * match ExtraWhitespace /\s\+$/
au InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
au InsertLeave * match ExtraWhiteSpace /\s\+$/
fun! <SID>StripTrailingWhitespaces()
let l = line(".")
let c = col(".")
%s/\s\+$//e
call cursor(l, c)
endfun
au FileType erlang,python,vim,elixir
\ au BufWritePre <buffer> :call <SID>StripTrailingWhitespaces()
setenv fish_greeting ""
if status --is-login
set PPID (echo (ps --pid %self -o ppid --no-headers) | xargs)
if ps --pid $PPID | grep ssh
tmux has-session -t base; and tmux attach-session -t base; or tmux new-session -s base; and kill %self
echo "tmux failed to start; using plain fish shell"
end
end
if test -d ~/bin
set PATH ~/bin $PATH
end
if test -d ~/.local/bin
set PATH ~/.local/bin $PATH
end
kerly use default
source ~/.kiex/scripts/kiex.fish
set -g __fish_git_prompt_show_informative_status 1
set -g __fish_git_prompt_hide_untrackedfiles 1
set -g __fish_git_prompt_showcolorhints 1
set -g __fish_git_prompt_char_stagedstate "●"
set -g __fish_git_prompt_char_dirtystate "✚"
set -g __fish_git_prompt_char_untrackedfiles "…"
set -g __fish_git_prompt_char_conflictedstate "✖"
set -g __fish_git_prompt_char_cleanstate "✔"
function fish_prompt --description 'Write out the prompt'
set -l last_status $status
if not set -q __fish_prompt_normal
set -g __fish_prompt_normal (set_color normal)
end
if set -q KERL_ENV
echo -n -s (set_color -b blue white) "(erl:" (basename "$KERL_ENV") ")" (set_color normal) " "
end
if set -q ELIXIR_VERSION
echo -n -s (set_color -b blue white) "(iex:$ELIXIR_VERSION)" (set_color normal)
end
printf '%s\n' (__fish_git_prompt)
if not test $last_status -eq 0
set_color $fish_color_error
end
# PWD
set_color $fish_color_cwd
echo -n (prompt_pwd)
set_color normal
echo -ne ' > '
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment