Skip to content

Instantly share code, notes, and snippets.

@jonberliner
Created March 23, 2018 22:19
Show Gist options
  • Save jonberliner/7c0531d83d3b3e33b9ded2b9d2e83649 to your computer and use it in GitHub Desktop.
Save jonberliner/7c0531d83d3b3e33b9ded2b9d2e83649 to your computer and use it in GitHub Desktop.
export CLICOLOR=1
alias ebp="vim ~/.bashrc"
alias rbp=". ~/.bashrc"
alias evp="vim ~/.vimrc"
alias l="ls"
alias ll="ls -GFlash"
alias la="ls -a"
alias vim="mvim -v"
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/jsb/Downloads/google-cloud-sdk/path.bash.inc' ]; then source '/Users/jsb/Downloads/google-cloud-sdk/path.bash.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/jsb/Downloads/google-cloud-sdk/completion.bash.inc' ]; then source '/Users/jsb/Downloads/google-cloud-sdk/completion.bash.inc'; fi
# export PATH='/usr/local/lib/:'$PATH
# export PYTHONPATH=$PYTHONPOTH:`brew --prefix`/lib/python3.6/site-packages:
alias p2='workon p27'
alias p3='workon p36'
export PYTHONPATH=/Users/jsb/repos/PyGaze/:$PYTHONPATH
# export PYTHONPATH=/Users/jsb/Documents/lib/:$PYTHONPATH
# export PYTHONPATH=/Users/jsb/FreenomeComputationalResearch/:$PYTHONPATH
export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
alias vim='mvim -v'
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
export VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh
source /usr/local/bin/virtualenvwrapper.sh
# -- Improved X11 forwarding through GNU Screen (or tmux).
# If not in screen or tmux, update the DISPLAY cache.
# If we are, update the value of DISPLAY to be that in the cache.
function update-x11-forwarding
{
if [ -z "$STY" -a -z "$TMUX" ]; then
echo $DISPLAY > ~/.display.txt
else
export DISPLAY=`cat ~/.display.txt`
fi
}
# This is run before every command.
preexec() {
# Don't cause a preexec for PROMPT_COMMAND.
# Beware! This fails if PROMPT_COMMAND is a string containing more than one command.
[ "$BASH_COMMAND" = "$PROMPT_COMMAND" ] && return
update-x11-forwarding
# Debugging.
#echo DISPLAY = $DISPLAY, display.txt = `cat ~/.display.txt`, STY = $STY, TMUX = $TMUX
}
trap 'preexec' DEBUG
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
Plugin 'flazz/vim-colorschemes'
Plugin 'tmhedberg/SimpylFold'
" Plugin 'scrooloose/syntastic'
Plugin 'scrooloose/nerdtree'
Plugin 'Valloric/YouCompleteMe'
" Plugin 'kien/ctrlp.vim'
" Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
Plugin 'tpope/vim-commentary'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
" Plugin 'andviro/flake8-vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree
let python_highlight_all=1
syntax on
set t_Co=256
:nmap <C-t> :NERDTreeToggle<CR>
:nmap ; :
"This unsets the "last search pattern" register by hitting return
nnoremap <CR> :noh<CR>
nnoremap <C-n> :noh<CR>
" yank to clipboard
" set clipboard=unnamed,unnamedplus
set clipboard=unnamedplus,autoselect,exclude:cons\\\\|linux
" make backspace work
:set backspace=indent,eol,start
:colorscheme jellybeans
" Send more characters for redraws
set ttyfast
set ttymouse=xterm2
set mouse=a
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
set expandtab " tabs are spaces
set number " show line numbers
set cursorline " highlight current line
filetype indent on " load filetype-specific indent files
set wildmenu " visual autocomplete for command menu
set showmatch " highlight matching [{()}]
set incsearch " search as characters are entered
set hlsearch " highlight matches
" allows cursor change in tmux mode
if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
else
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
endif
" Enable folding
set foldmethod=indent
set foldlevel=99
" Enable folding with the spacebar
nnoremap <space> za
" PEP8 indentation
au BufNewFile,BufRead *.test set tabstop=4
\softtabstop=4
\shiftwidth=4
\textwidth=790
\expandtab
\autoindent
\fileformat=unix
au BufNewFile,BufRead *.js, *.html, *.css, *.wppl
\ set tabstop=2
\ set softtabstop=2
\ set shiftwidth=2
augroup filetypedetect
au BufRead,BufNewFile *.wppl set filetype=javascript
augroup END
set encoding=utf-8
set term=screen-256color
let g:airline#extensions#tabline#enabled = 0
let airline_theme='raven'
" linting config
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 0
let g:syntastic_check_on_wq = 1
" more sensible splits navigation and creation
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
set splitbelow
set splitright
" always show status bar
:set laststatus=2
" allow buffer switch without save
:set hidden
" you complete me config
let g:PyFlakeOnWrite = 0
let g:PyFlakeCheckers = 'pep8,mccabe,pyflakes'
let g:ycm_autoclose_preview_window_after_completion=1
map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
let g:ycm_server_keep_logfiles = 1
let g:ycm_server_log_level = 'debug'
" strip trailing whitespace on save
fun! <SID>StripTrailingWhitespaces()
let l = line(".")
let c = col(".")
%s/\s\+$//e
call cursor(l, c)
endfun
autocmd BufWritePre * :call <SID>StripTrailingWhitespaces()
:set noswapfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment