Skip to content

Commit

Permalink
Much needed updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sidneyw committed Jun 26, 2016
1 parent 0ee5a90 commit e40b9e7
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 9 deletions.
17 changes: 12 additions & 5 deletions bash_profile
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# for bash prompt
# Bash prompt variables
_time="\[\e[1;34m\][\[\e[0;32m\]\@\[\e[1;34m\]]"
_user="[\e[0;34m\]\u\[\e[1;34m\]]"
_dir="[\[\e[0;32m\]\w\[\e[1;34m\]]"
_info="\[\e[1;32m\]\$(ls -1 | wc -l | sed 's: ::g') files, \$(du -hs)\[\e[1;34m\]"
_history="[\[\e[0;33m\]\!\[\e[1;34m\]]"
_git_branch="\[\e[1;34m\][\[\e[0;32m\]\$(gitbranch.sh)\[\e[1;34m\]]"

# Bash prompts
Old_PS1="\[\033[32m\]\u:\[\033[31;1m\]\w\[\033[m\]\$ "
OPS1="\n$_time-$_dir\[\e[1;34m\]\n$_history\[\e[0;34m\] -> \[\e[0;32m\]"
GPS1="\n$_time-$_git_branch-$_dir\[\e[1;34m\]\n$_history\[\e[0;34m\] -> \[\e[0;32m\]"
IPS1="\n$_time-$_info-$_dir\[\e[1;34m\]\n$_history\[\e[0;34m\] -> \[\e[0;32m\]"

PS1=$OPS1
# Default
PS1=$GPS1

export CLICOLOR=1
LS_COLORS='di=0;35'
Expand All @@ -20,11 +22,16 @@ export LS_COLORS
# C-x C-e to open vim and edit a command there
EDITOR="vim"

# Shortcuts
vimrc="$HOME/.dot_files/vim/vimrc"
tmux="$HOME/.dot_files/tmux/tmux.conf"
gtd="$HOME/Documents/GTD"

# Aliases go here:
alias ls='ls -GFh'
alias ll='ls -la'

# python
# Python aliases
alias 3='python3'
alias 2='python'

Expand All @@ -33,7 +40,7 @@ alias tmux="tmux -2"
alias ta="tmux attach"
TERM=xterm-256color

# scripts that need to run in current shell alias dt='. dt' alias class='. class'
# Scripts that need to run in current shell
alias idea='. idea'
alias prompt='. prompt'
alias dt='. dt'
Expand All @@ -50,7 +57,7 @@ alias server="python -m SimpleHTTPServer"
alias mygcc="gcc -Wall -pedantic -std=c11"

# open vim with all my todos in splits
alias todo="vim ~/Documents/GTD/daily.txt ~/Documents/GTD/weekly.txt ~/Documents/GTD/monthly.txt -O -c \"windo exe 'normal zR'\""
alias todo="vim $gtd/daily.txt $gtd/weekly.txt $gtd/monthly.txt -O -c \"windo exe 'normal zR'\""

# other
alias c="clear"
Expand Down
28 changes: 28 additions & 0 deletions cheatsheets/vim_cheatsheet
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,31 @@ Command Line FU
<C-u> [...] <C-y> | Yank the current line, run another command, paste the original line
vim -x filename | Encrypt file
<ESC> * | Insert autocompletion results on the command line

Vim Unimpaired
======================

*[a* |:previous|
*]a* |:next|
*[A* |:first|
*]A* |:last|
*[b* |:bprevious|
*]b* |:bnext|
*[B* |:bfirst|
*]B* |:blast|
*[l* |:lprevious|
*]l* |:lnext|
*[L* |:lfirst|
*]L* |:llast|
*[<C-L>* |:lpfile|
*]<C-L>* |:lnfile|
*[q* |:cprevious|
*]q* |:cnext|
*[Q* |:cfirst|
*]Q* |:clast|
*[<C-Q>* |:cpfile| (Note that <C-Q> only works in a terminal if you disable
*]<C-Q>* |:cnfile| flow control: stty -ixon)
*[t* |:tprevious|
*]t* |:tnext|
*[T* |:tfirst|
*]T* |:tlast|
22 changes: 22 additions & 0 deletions gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[user]
name = "SidneyW "
email = [email protected]
[filter "hawser"]
clean = git hawser clean %f
smudge = git hawser smudge %f
required = true
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[push]
default = matching
[alias]
co = checkout
br = branch
ci = commit
st = status
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ln -s $dir/tmux/tmux.conf $HOME/.tmux.conf
ln -s $dir/vim/vimrc $HOME/.vimrc
ln -s $dir/vim $HOME/.vim
ln -s $dir/bash_profile $HOME/.bash_profile
ln -s $dir/gitconfig $HOME/.gitconfig

if [[ -d $HOME/bin ]]
then
Expand Down
2 changes: 1 addition & 1 deletion tmux/tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ source-file ~/.dot_files/tmux/theme.conf

# Allow for open command on mac
set-option -g default-command "reattach-to-user-namespace -l bash"
bind C-t send-keys "vim $(find . -path \"*/factory/test/*.py\" | grep -v init)"
bind C-t setw synchronize-panes
6 changes: 3 additions & 3 deletions vim/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ let g:airline#extensions#whitespace#checks = 'long'
" righteous
" tmux

let g:tmuxline_preset = 'powerline'
let g:tmuxline_preset = 'crosshair'
" let g:tmuxline_theme = 'airline_insert'
" let g:tmuxline_preset = {
" \'a' : '#S:#I',
Expand Down Expand Up @@ -360,7 +360,7 @@ let g:syntastic_mode_map = {'mode': 'active',


let g:syntastic_python_checkers = ['flake8']
let g:syntastic_python_flake8_args='--ignore=E501,E302,E128,W191'
let g:syntastic_python_flake8_args='--ignore=E501,E302,E128,W191,F403'
" let g:syntastic_javascript_checkers = ['jshint']
" let g:syntastic_javascript_checkers = ['jsxhint']
" let g:syntastic_javascript_jsxhint_exec = 'jsx-jshint-wrapper'
Expand All @@ -376,7 +376,7 @@ set runtimepath^=~/.vim/bundle/ctrlp.vim
nnoremap <leader>m :CtrlPMRUFiles<cr>
nnoremap <leader>b :CtrlPBuffer<cr>
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$|node_modules/*'
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$|node_modules/*|build/*'
" }}}

" Fugitive {{{
Expand Down

0 comments on commit e40b9e7

Please sign in to comment.