Skip to content

Instantly share code, notes, and snippets.

@phamtm
Last active June 4, 2016 00:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phamtm/326096048da31dd7ec5c to your computer and use it in GitHub Desktop.
Save phamtm/326096048da31dd7ec5c to your computer and use it in GitHub Desktop.
# Bash colors #
###############
txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldylw='\e[1;33m' # Yellow
bldblu='\e[1;34m' # Blue
bldpur='\e[1;35m' # Purple
bldcyn='\e[1;36m' # Cyan
bldwht='\e[1;37m' # White
unkblk='\e[4;30m' # Black - Underline
undred='\e[4;31m' # Red
undgrn='\e[4;32m' # Green
undylw='\e[4;33m' # Yellow
undblu='\e[4;34m' # Blue
undpur='\e[4;35m' # Purple
undcyn='\e[4;36m' # Cyan
undwht='\e[4;37m' # White
bakblk='\e[40m' # Black - Background
bakred='\e[41m' # Red
bakgrn='\e[42m' # Green
bakylw='\e[43m' # Yellow
bakblu='\e[44m' # Blue
bakpur='\e[45m' # Purple
bakcyn='\e[46m' # Cyan
bakwht='\e[47m' # White
txtrst='\e[0m' # Text Reset
# Set CLICOLOR if you want Ansi Colors in iTerm2 #
##################################################
export PS1="\[$txtred\]\u@\h \[$txtblu\]\W\$\[\e[0m\] "
export CLICOLOR=1
export PROMPT_COMMAND='echo -ne "\033]0;${PWD/#$HOME/~}\007"'
# Set colors to match iTerm2 Terminal Colors #
##############################################
export TERM=xterm-256color
export PATH="$PATH:~/bin"
export PATH="/usr/local/bin:$PATH"
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
alias psql='/Applications/Postgres.app/Contents/Versions/9.4/bin/psql -p5432'
export PATH="$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin"
# Grep options #
################
export GREP_OPTIONS='-iC1 --color=always'
export PATH="$PATH:/usr/local/sbin"
alias c='clear'
alias ga='git add'
alias gb='git branch'
alias gc='git checkout'
alias gd='git diff'
alias gp='git pull'
alias gs='git status'
alias k='kill'
alias kk='kk'
alias pg='ps aux | grep -C 0'
alias cp='cp -v'
alias mv='mv -v'
alias http='python -m SimpleHTTPServer'
alias maa='mvn clean install eclipse:clean eclipse:eclipse -T 4 -DskipTests'
alias mee='mvn eclipse:clean eclipse:eclipse -T 4 -DskipTests'
alias gl='git log --oneline'
"pathogen setup
"navigate split pane
nnoremap gh <C-W><C-H>
nnoremap gj <C-W><C-J>
nnoremap gk <C-W><C-K>
nnoremap gl <C-W><C-L>
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
"shortcut for closing all files
"nnoremap xx :xa<CR>
nnoremap qq :qa!<CR>
"tagbar
nnoremap - :TagbarToggle<CR>
filetype off
filetype plugin on
filetype plugin indent on
set nocompatible
set splitright
"solarized
set background=dark
colorscheme solarized
"set 256-color scheme
set t_Co=256
"colorscheme grb256
set modelines=0
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set smartindent
set encoding=utf-8
set scrolloff=9999
set autoindent
set showmode
set showcmd
set hidden
set wildmenu
set wildmode=list:longest
"set visualbell
set cursorline
set ttyfast
set ruler
set backspace=indent,eol,start
set laststatus=2
"set relativenumber
"set undofile
let mapleader = ","
" Tame vim searching
nnoremap / /\v
vnoremap / /\v
set ignorecase
set incsearch
set smartcase
set gdefault
set incsearch
set showmatch
set hlsearch
nnoremap <leader><space> :noh<cr>
nnoremap <tab> %
vnoremap <tab> %
" Line wrapping
set wrap
set textwidth=79
set formatoptions=qrn1
"set colorcolumn=85
" Disable arrow keys
" nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
noremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>
noremap j gj
nnoremap k gk
inoremap <F1> <ESC>
nnoremap <F1> <ESC>
vnoremap <F1> <ESC>
nnoremap ; :
nnoremap tn :tabnew
nnoremap q :q!
inoremap jj <ESC>
set number
" colorscheme GitHub
inoremap { {}<Left>
inoremap {<CR> {<CR>}<Esc>O
inoremap {{ {
inoremap {} {}
" Disable spellcheck
set nospell
" Turn backup off
set nobackup
set nowb
set noswapfile
" Map 0 to the first non blank character
map 0 ^
" Map 4-4 to go to end of line
map 44 $
syntax enable
{
"color_scheme": "Packages/sublime-schemes/Chrome_DevTools.tmTheme",
"default_line_ending": "LF",
"drag_text": false,
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
"*.obj",
"*.o",
"*.a",
"*.lib",
"*.so",
"*.dylib",
"*.ncb",
"*.sdf",
"*.suo",
"*.pdb",
"*.idb",
".DS_Store",
"*.class",
"*.psd",
"*.db",
"*.sublime-workspace",
"bundle.js"
],
"folder_exclude_patterns":
[
".git",
".hg",
".svn",
"CVS",
"log",
"logs",
"tmp",
"node_modules",
"bower_components"
],
"font_size": 16,
"highlight_line": true,
"ignored_packages":
[
"Markdown"
],
"rulers":
[
79
],
"show_encoding": true,
"theme": "Soda Light 3.sublime-theme",
"translate_tabs_to_spaces": true,
"tree_animation_enabled": false,
"trim_trailing_white_space_on_save": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment