diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..885c011 --- /dev/null +++ b/.bashrc @@ -0,0 +1,23 @@ +# ALIASES +alias cgrep="grep --color" +alias vim="/Applications/MacVim.app/Contents/bin/mvim -v" +alias utcclock="TZ=UTC vtclock" +alias urldecode='python -c "import sys, urllib as ul; \ + print ul.unquote_plus(sys.argv[1])"' +alias urlencode='python -c "import sys, urllib as ul; \ + print ul.quote_plus(sys.argv[1])"' + +# FUNCTIONS +function sfind(){ + find . -name "$1" -print0 | xargs -0 grep "$2" +} + +function csv2mdt(){ + cat $1 | sed 1p | LC_ALL=C sed -e 's/,/ |\ \;\ \; /g' -e 's/^/| /g' -e 's/$/ |/g' -e '2 s/[^|]/-/g' | LC_ALL=C tr -d $'\r' +} + +# EXPORTS +export PATH=/opt/local/bin:/opt/local/sbin:$PATH +export PS1="\[\e[00;31m\][\h]\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;32m\]\u\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;34m\][\w]\[\e[0m\]\[\e[00;37m\]\n [\#] \\$ \[\e[0m\]" +[ ! -z $TMUX ] || tmux a || tmux +neofetch diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..cefb283 --- /dev/null +++ b/.vimrc @@ -0,0 +1,57 @@ +set nocompatible +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() +Plugin 'VundleVim/Vundle.vim' +Plugin 'Valloric/YouCompleteMe' +Plugin 'chrisbra/csv.vim' +call vundle#end() +" filetype off +filetype plugin indent on + +" Turn syntax highlighting on +syntax on +" No line wrapping +set nowrap +" Line numbers +set nu +" Highlights searches (done by forward slash in normal mode) +set hlsearch +" Make backspace act normal +set backspace=2 +" Disable swap files (no recovery if you dont save!) +set noswapfile +" Set vertical red line at the 80 char column +set colorcolumn=80 +" Set tab = 4 spaces +set tabstop=4 +" Addects >> << ++ and automatic indentation +set shiftwidth=4 +" Sets the tab key to softtabstop / tabstop +set expandtab +" synchronize with system clipboard (yank and paste in normal is effectively +" CMD+C & CMD+V in insert mode +set clipboard=unnamed + +" Folding rules +set foldmethod=indent +set foldnestmax=10 +set foldlevel=2 +set nofoldenable + +" CSV Settings +let g:csv_autocmd_arrange = 1 +let g:csv_autocmd_arrange_size = 1024*1024*10 +let b:csv_arrange_align = 'l*' + +" netrw +let g:netrw_banner = 0 +let g:netrw_liststyle = 4 +let g:netrw_chgwin = 2 + +let g:netrw_browse_split = 3 +" remap shift-enter to fire up the sidebar +" the same remap as above - may be necessary in some distros +nnoremap :leftabove 25vs:e . + +" View *.hex files in hex +au BufReadPost *.hex silent %!xxd