vim changes, goodbye ohmyzsh, hello prezto

This commit is contained in:
Tyrel Souza 2017-04-26 23:00:30 -04:00
parent e590542f82
commit caf125f2d4
No known key found for this signature in database
GPG Key ID: 2EECB5087209E6A5
10 changed files with 1258 additions and 33 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
vim/bundle/
vim/view
.netrwhist
config/fish/fishd.*

View File

@ -8,8 +8,9 @@ if [[ $OSTYPE == darwin* ]]; then
~/bin/setup-usr-local.sh
fi
# install oh my zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
rm -rf ~/.zprezto
git clone --recursive https://github.com/sorin-ionescu/prezto.git ~/.zprezto
# delete existing dotfiles
rm -rf ~/.bash_aliases
@ -20,8 +21,14 @@ rm -rf ~/.hushlogin
rm -rf ~/.vim
rm -rf ~/.vimrc
rm -rf ~/.zshrc
rm -rf ~/.oh-my-zsh/themes/tyrel.zsh-theme
rm -rf ~/.pythonstartup.py
rm -rf ~/.zlogin
rm -rf ~/.zlogout
rm -rf ~/.zpreztorc
rm -rf ~/.zprofile
rm -rf ~/.zshenv
rm -rf ~/.zshrc
# set Symlinks to configs
ln -s $(pwd)/bash_aliases ~/.bash_aliases
ln -s $(pwd)/gitconfig ~/.gitconfig
@ -31,9 +38,14 @@ ln -s $(pwd)/hushlogin ~/.hushlogin
ln -s $(pwd)/vim ~/.vim
ln -s $(pwd)/vimrc ~/.vimrc
ln -s $(pwd)/zshrc ~/.zshrc
ln -s $(pwd)/tyrel.zsh-theme ~/.oh-my-zsh/themes/tyrel.zsh-theme
ln -s $(pwd)/pythonstartup.py ~/.pythonstartup.py
ln -s $(pwd)/zprofile ~/.zprofile
ln -s $(pwd)/zpreztorc ~/.zpreztorc
ln -s $(pwd)/zprofile.local ~/.zprofile.local
ln -s /Users/tyrel/.zprezto/runcoms/zlogin ~/.zlogin
ln -s /Users/tyrel/.zprezto/runcoms/zlogout ~/.zlogout
ln -s /Users/tyrel/.zprezto/runcoms/zshenv ~/.zshenv
ln -s /Users/tyrel/.zprezto/runcoms/zshrc ~/.zshrc
# cleanup fish config
mkdir -p ~/.config/fish
@ -44,13 +56,14 @@ ln -s $(pwd)/config/fish ~/.config/fish
mkdir -p ~/.vim/bundle
cd ~/.vim/bundle
# Put Bundles Here
git clone https://github.com/kien/ctrlp.vim.git
git clone https://github.com/scrooloose/nerdtree.git
git clone https://github.com/danro/rename.vim.git
git clone https://github.com/scrooloose/syntastic.git
git clone https://github.com/vim-airline/vim-airline.git
git clone https://github.com/vim-airline/vim-airline-themes.git
git clone https://github.com/croaky/vim-colors-github.git
git clone https://github.com/pbrisbin/vim-mkdir.git
git clone https://github.com/tpope/vim-surround.git
git clone git@github.com:Shougo/denite.nvim.git
git clone git@github.com:spolu/dwm.vim.git
git clone git@github.com:croaky/vim-colors-github.git
git clone git@github.com:danro/rename.vim.git
git clone git@github.com:fatih/vim-go.git
git clone git@github.com:kien/ctrlp.vim.git
git clone git@github.com:mileszs/ack.vim.git
git clone git@github.com:pbrisbin/vim-mkdir.git
git clone git@github.com:scrooloose/syntastic.git
git clone git@github.com:vim-airline/vim-airline-themes.git
git clone git@github.com:vim-airline/vim-airline.git

View File

@ -1,3 +1,4 @@
#!/usr/local/bin/zsh
export HOMEBREW_GITHUB_API_TOKEN="caf4cd85c6eb6ddcf006d4571d4a294c0b0592e4"
alias ag='\ag --pager="less"'
alias cg='cd "$(git rev-parse --show-toplevel)"'
@ -16,3 +17,32 @@ alias sl='source local.env'
if [[ $OSTYPE == darwin* ]]; then
alias rm=trash;
fi;
function adtest () {
no_slashes="$(echo "$1" | sed -e 's/\//\./g')";
a_test="$(echo "$no_slashes" | sed -e 's/.py//g')";
a_project=$(echo -n "$a_test" | python -c "import sys; print sys.stdin.read().split('.', 1)[0]");
run_test=$(echo "bin/manage_$a_project.py test $a_test");
echo "Evaling $run_test";
eval $run_test;
}
function dots(){
cd $(dirname `readlink ~/.vim`)
}
function adg () {
workon addgene-core
}
function cpbr () {
if branch=$(git symbolic-ref --short -q HEAD)
then
printf "$branch" | pbcopy
osascript -e "display notification \"$branch copied to clipboard\" with title \"cpbr\""
else
echo "no branch, can't copy"
fi
}
function hidden() { ls -a "$@" | grep '^\.'; }

View File

@ -3,7 +3,7 @@ set -e
set -x
set -v
if [[ $OSTYPE == "*darwin*" ]];then
if [ $OSTYPE = "darwin16.0" ];then
umount /Volumes/ramdisk
mysql.server stop
killall mysqld

View File

@ -1,2 +0,0 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =0

1117
vim/colors/solarized.vim Normal file

File diff suppressed because it is too large Load Diff

18
vimrc
View File

@ -4,9 +4,11 @@ set nocompatible
execute pathogen#infect()
syntax on
colorscheme monokai
set noshowmode
set mouse-=a
syntax enable
set background=dark
colorscheme solarized
" Leader
let mapleader = " "
@ -90,6 +92,7 @@ if executable('ag')
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
let g:ackprg = 'ag --vimgrep'
" ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
@ -98,21 +101,12 @@ endif
" Toggle line numbers with F1 - no more stupid help!
nmap <silent> <F1> :set invnumber<CR>
"NerdTree, show if open vim without file
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
nmap <C-n> :NERDTreeToggle<CR>
autocmd StdinReadPre * let s:std_in=1
hi Normal ctermbg=none
" Local config
if filereadable($HOME . "/.vimrc.local")
source ~/.vimrc.local
endif
set background=dark
let NERDTreeIgnore = ['\.pyc$']
let g:go_fmt_command = "goimports"
:nnoremap <leader><tab> :buffers<CR>:buffer<Space>

33
zpreztorc Normal file
View File

@ -0,0 +1,33 @@
zstyle ':prezto:*:*' color 'yes'
zstyle ':prezto:load' zmodule 'attr' 'stat'
zstyle ':prezto:load' zfunction 'zargs' 'zmv'
zstyle ':prezto:load' pmodule \
'environment' \
'terminal' \
'editor' \
'history' \
'history-substring-search' \
'directory' \
'utility' \
'completion' \
'homebrew' \
'osx' \
'git' \
'node' \
'python' \
'syntax-highlighting' \
'tmux' \
'prompt'
zstyle ':prezto:module:autosuggestions:color' found ''
zstyle ':prezto:module:editor' key-bindings 'emacs'
zstyle ':prezto:module:editor' dot-expansion 'yes'
zstyle ':prezto:module:editor' ps-context 'yes'
zstyle ':prezto:module:git:status:ignore' submodules 'all'
zstyle ':prezto:module:prompt' theme 'paradox'
zstyle ':prezto:module:prompt' long-pwd 'yes'
zstyle ':prezto:module:terminal' auto-title 'yes'
zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s'
zstyle ':prezto:module:terminal:tab-title' format '%m: %s'
zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
zstyle ':prezto:module:tmux:iterm' integrate 'yes'

40
zprofile_tyrel Normal file
View File

@ -0,0 +1,40 @@
export EDITOR=vim
export GOPATH=$HOME/go
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LESS=' -R '
export LESSOPEN="| /usr/local/bin/src-hilite-lesspipe.sh %s"
export NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"
export NPM_PACKAGES="${HOME}/.npm-packages"
export PHP_AUTOCONF="/usr/local/bin/autoconf"
# Virtualenv + Wrapper
export PROJECT_HOME=$HOME/AddGeneProjects
export WORKON_HOME=$HOME/.virtualenvs
if [ -e $HOME/.local/bin/virtualenvwrapper.sh ];then
source $HOME/.local/bin/virtualenvwrapper.sh
fi
if [ -e /usr/local/bin/virtualenvwrapper.sh ]; then
source /usr/local/bin/virtualenvwrapper.sh
fi
export PATH="$NPM_PACKAGES/bin:$GOPATH/bin:$HOME/bin:$PATH"
if [[ $OSTYPE == "*darwin*" ]];then
export PATH="/usr/local/opt/gnupg/libexec/gpgbin:$PATH"
fi
#
if [ -z "$SSH_AUTH_SOCK" ] ; then
eval `ssh-agent -s`
ssh-add ~/.ssh/id_rsa
fi
#
if [ -e ~/.ssh/id_addgene ];then
ssh-add ~/.ssh/id_addgene
fi
export MP_FULLNAME="Tyrel Souza"
source ~/.bash_aliases
if [ -e $HOME/.credentials ];then
source $HOME/.credentials
fi
export PYTHONSTARTUP=$HOME/.pythonstartup.py
eval "$(pyenv init -)"

3
zshrc
View File

@ -7,8 +7,6 @@ else
ZSH_THEME="tyrel"
export VIRTUAL_ENV_DISABLE_PROMPT=1
fi
source $ZSH/oh-my-zsh.sh
##### ^^^ Oh my ZSH ^^^^ #####
export EDITOR=vim
export GOPATH=$HOME/go
@ -92,3 +90,4 @@ function adtest () {
function dots(){
cd $(dirname `readlink ~/.zshrc`)
}
eval "$(pyenv init -)"