diff --git a/.bash_aliases b/.bash_aliases deleted file mode 120000 index 486f06b..0000000 --- a/.bash_aliases +++ /dev/null @@ -1 +0,0 @@ -../.bash_aliases \ No newline at end of file diff --git a/.bashrc b/.bashrc deleted file mode 120000 index 988a415..0000000 --- a/.bashrc +++ /dev/null @@ -1 +0,0 @@ -../.bashrc \ No newline at end of file diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..f91fa65 --- /dev/null +++ b/.bashrc @@ -0,0 +1,121 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=10000 +HISTFILESIZE=20000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color|*-256color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;36m\]\w\[\033[00m\] ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h \w ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +# colored GCC warnings and errors +#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# some more ls aliases +alias ll='ls -alF' +alias la='ls -A' +alias l='ls -CF' + +# Add an "alert" alias for long running commands. Use like so: +# sleep 10; alert +alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + +set -o vi + +alias pvol="pactl set-sink-volume 0" diff --git a/.helpfile b/.helpfile deleted file mode 120000 index 3f56538..0000000 --- a/.helpfile +++ /dev/null @@ -1 +0,0 @@ -../.helpfile \ No newline at end of file diff --git a/.notes b/.notes deleted file mode 120000 index aa7d193..0000000 --- a/.notes +++ /dev/null @@ -1 +0,0 @@ -../.notes \ No newline at end of file diff --git a/.profile b/.profile deleted file mode 120000 index 8f4d7af..0000000 --- a/.profile +++ /dev/null @@ -1 +0,0 @@ -../.profile \ No newline at end of file diff --git a/.vimrc b/.vimrc deleted file mode 120000 index f67022e..0000000 --- a/.vimrc +++ /dev/null @@ -1 +0,0 @@ -../.vimrc \ No newline at end of file diff --git a/.vimrc b/.vimrc new file mode 100755 index 0000000..fa89200 --- /dev/null +++ b/.vimrc @@ -0,0 +1,223 @@ +" disable builtin filetype feature (turned back on later) +set nocompatible +filetype off +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() + +" This is Vundle, which can be found in Github at gmarik/vundle.git +" specify GitHub repos with 'user/repository' format +Plugin 'VundleVim/Vundle.vim' + +" nerdtree allows filesystem navigation while in vim +" :help NERD_tree.txt +Plugin 'scrooloose/nerdtree.git' +Plugin 'scrooloose/nerdcommenter' + +" ctrl-p file search +Plugin 'kien/ctrlp.vim' + +" To get plugins from vim scripts, reference the plugin by name as it appears +" on the site +Plugin 'jeetsukumaran/vim-buffergator' + +" git integration +Plugin 'tpope/vim-fugitive' +" cs command for changing 'surroundings' ie quotes, brackets and tags +" counterpart to builtin ci command +Plugin 'tpope/vim-surround' +" repeat integration for other tpope extensions +Plugin 'tpope/vim-repeat' + +" git autocomplete +"Plugin 'Valloric/YouCompleteMe' +" python autocomplete +Plugin 'davidhalter/jedi-vim' + +" python folding +Plugin 'tmhedberg/SimpylFold' + +" ack search tool +Plugin 'mileszs/ack.vim' +" ag plugin for ack.vim, for speedup +Plugin 'ggreer/the_silver_searcher' + +" superawesome color schemes +Plugin 'flazz/vim-colorschemes' + +" python syntax +Plugin 'hdima/python-syntax' +" javascript syntax +Plugin 'jelera/vim-javascript-syntax' +Plugin 'scrooloose/syntastic' + +" code tag listing: see methods and members of an object +"Plugin 'vim-scripts/taglist-plus' +Plugin 'majutsushi/tagbar' + +" status +Plugin 'bling/vim-airline' + +" most recently used files +Plugin 'vim-scripts/mru.vim' + +" aka zencoding: +Plugin 'mattn/emmet-vim' + +call vundle#end() + + + +" all plugins must be declared before this point +" turn filetype functionality back on. +filetype plugin indent on + +" custom options +" line numbering +set number +" tab size +set tabstop=4 +set shiftwidth=4 +" convert tabs to spaces +set expandtab + +" instant search: jump to results on keydown +set incsearch +" highlight search results +set hlsearch + +" number of lines to keep below/above cursor, ie scroll when cursor gets +" within 10 spaces top/bottom of screen +set scrolloff=6 + +" indentation +set autoindent +set smartindent + +set t_Co=256 +" color apprentice +" color BadWolf +color atom +" color automation +" color codeschool + +" YouCompleteMe plugin keymaps +" GoTo tries GoToDefinition then GoToDeclaration +"nnoremap gd :YcmCompleter GoTo +"nnoremap gD :YcmCompleter GoToDeclaration + +" vim-jedi equivalents of YCM (see above) +map gd :call jedi#goto() +map gD :call jedi#goto_assignments() + +" SimplyIFold plugin keymaps +" fold docstrings +let g:SimpylFold_docstring_preview = 0 + +autocmd BufWinEnter *.py setlocal foldexpr=SimpylFold(v:lnum) foldmethod=expr +autocmd BufWinLeave *.py setlocal foldexpr< foldmethod< + +autocmd BufRead *.py normal zR + +" ctrlp plugin options +" working path always stays in start directory +let g:ctrlp_working_path_mode = 0 +" index everything (rather than only marked directories) +let g:ctrlp_root_markers = [''] +" infinite max files +let g:ctrlp_max_files = 0 +" near-infinite max depth. Whee! +" +let g:ctrlp_max_depth = 99 +" sane custom ignore +let g:ctrlp_custom_ignore = { + \ 'dir': '\.git$\|\.hg$\|\.svn$\|\.yardoc\|public\/images\|public\/system\|tmp$', + \ 'file': '\.exe$\|\.so$\|\.dat$\|\.jar$\|\.pyc$\|\.pdf$\|\.ipynb$\|\.ico$\|\.png$\|\.jpg$\|\.gif$\|\.bmp$\|\.svg$\|\.xcf$\|\.swf$\|\.pst$\|\.swc$\|\.zip$\|\.gz$\|\.tar$' + \ } + + +" default indexing root is workspace +map :CtrlP /home/dev/workspace + +"autocmd ColorScheme * highlight ExtraWhitespace ctermbg=black guibg=black +"highlight ExtraWhitespace ctermbg=black guibg=black + +" ack and ag +" set silver_searcher as default codesearching tool +" -S: case sensitive only if query includes capital letters +" --max-count: sanity check, stop searching after 100 hits +" --nogroup: don't search file names (use CtrlP for searching filenames) +" --column: print column numbers in results +let g:ackprg = 'ag --nogroup --column -S --max-count 100' + + +" buffergator: no more cts! +" switch windows using g rather than +map gwh h +map gwl l +map gwj j +map gwk k +" move windows using g rather than +map gwH H +map gwL L +map gwJ J +map gwK K +" open windows using t +map wh +map wl +map wj +map wk + +" NERD tree +map nn :NERDTreeFind +map nf :NERDTreeToggle +map nb :NERDTreeFromBookmark + +" taglist-plus +map tl :TagbarToggle + +" syntastic options: defaults +"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 = 1 +"let g:syntastic_check_on_wq = 0 + +" tabs: no more cts +" switch tabs with gt +map gtl :tabn +map gth :tabp +map gt0 :tabfirst +" move tabs with gt +map gtL :execute 'silent! tabmove ' . tabpagenr() +map gtH :execute 'silent! tabmove ' . (tabpagenr()-2) +" new tab with gtn ('go tab new'). TODO definitely needs to be changed +map gtn :tabedit +" close tab with ZT +map ZT :tabclose + + +" NERDCommenter +" add 1 space between comment character and commented text +let NERDSpaceDelims=1 + + +" Ack: TODO NEEDS WORK +" searches for visually highlighted text, using register 'a' +" \av: searches visually highlighted text +" copies visual into 'a' register, yanks, calls :Ack, escapes and +" enters contents of 'a' +map av "ay:Ack =fnameescape(@a) +" \aw: searches for word under cursor +" yanks in word into 'a' register, calls :Ack, escapes and enters contents of +" 'a' +map aw "ayiw:Ack =fnameescape(@a) +" \aW: searches for whitespace-delimited text under cursor +map aW "ayiW:Ack =fnameescape(@a) +" \aa: open Ack +map aa :Ack +" \a%: search for current file name by accessing the % (filename) register and +" removing the path +map a% :Ack =expand('%:t')