From d4b6606075dcbba401a8f8bde9dc9be4c2e881bd Mon Sep 17 00:00:00 2001 From: Alex Kelly Date: Fri, 24 Oct 2014 22:48:44 -0400 Subject: [PATCH] Initial checkin of dotfiles --- README.md | 15 +++++++++ vim/vimrc | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ zsh/zshrc | 62 +++++++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+) create mode 100644 vim/vimrc create mode 100644 zsh/zshrc diff --git a/README.md b/README.md index e69de29..d2f5f67 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,15 @@ +My Dotfiles +----------- + +Here are my configuration files that I use on my system. I use Vundle (https://github.com/gmarik/Vundle.vim) for all of my plugin management, so in order to get most of the things working, you need to have that installed first. + + +File Naming ++++++++++++ +You should clone this to your home directory, and then create a symlink for the files. For example, if you want to use my .vimrc, you would: + +#. cd ~ +#. ln -s ~dotfiles/vim/vimrc .vimrc + +At some point I may make a utility to manage those, but that's the way to do it for now + diff --git a/vim/vimrc b/vim/vimrc new file mode 100644 index 0000000..e133960 --- /dev/null +++ b/vim/vimrc @@ -0,0 +1,97 @@ +set nocompatible +set splitright +filetype off +" Handy hack to force a write using sudo when you forget to sudo vi +cmap w!! w !sudo tee > /dev/null % + +"Make python-friendly tabs +set tabstop=4 +set shiftwidth=4 +set smarttab +set softtabstop=4 +set autoindent +set rtp+=~/.vim/bundle/vundle/ +set pastetoggle= +call vundle#rc() + +" let Vundle manage Vundle +" required! +Plugin 'gmarik/vundle' +Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'} +Plugin 'tpope/vim-fugitive' +Plugin 'scrooloose/nerdtree' +Plugin 'klen/python-mode' +Plugin 'davidhalter/jedi-vim' +Plugin 'ervandew/supertab' +Plugin 'Rykka/riv.vim' +Plugin 'Rykka/clickable.vim' +Plugin 'seveas/bind.vim' +Plugin 'altercation/vim-colors-solarized' +Plugin 'flazz/vim-colorschemes' + +filetype plugin indent on + +augroup vimrc_autocmds + autocmd! + " highlight characters past column 80 + autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black + autocmd FileType python match Excess /\%80v.*/ + autocmd FileType python set nowrap +augroup END + +"Powerline setup +set guifont=PowerLineSymbols\ DejaVu\ Sans\ Mono\ for\ Powerline\ 9 +let g:Powerline_symbols = 'fancy' +set laststatus=2 + +"NerdTree map to +map :NERDTreeToggle + +" Python-mode +" Activate rope +" Keys: +" K Show python docs +" Rope autocomplete +" g Rope goto definition +" d Rope show documentation +" f Rope find occurrences +" b Set, unset breakpoint (g:pymode_breakpoint enabled) +" [[ Jump on previous class or function (normal, visual, operator +" modes) +" ]] Jump on next class or function (normal, visual, operator +" modes) +" [M Jump on previous class or method (normal, visual, operator +" modes) +" ]M Jump on next class or method (normal, visual, operator +" modes) +let g:pymode_rope = 0 + +" Documentation +let g:pymode_doc = 1 +let g:pymode_doc_key = 'K' + +"Linting +let g:pymode_lint = 1 +let g:pymode_lint_checker = "pyflakes,pep8" +" Auto check on save +let g:pymode_lint_write = 1 + +" Support virtualenv +let g:pymode_virtualenv = 1 + +" Enable breakpoints plugin +let g:pymode_breakpoint = 1 +let g:pymode_breakpoint_key = 'b' + +" syntax highlighting +let g:pymode_syntax = 1 +let g:pymode_syntax_all = 1 +let g:pymode_syntax_indent_errors = g:pymode_syntax_all +let g:pymode_syntax_space_errors = g:pymode_syntax_all + +" Don't autofold code +let g:pymode_folding = 0 +let g:riv_fold_level = 0 +let g:riv_fold_auto_update = 0 + +colorscheme jellybeans diff --git a/zsh/zshrc b/zsh/zshrc new file mode 100644 index 0000000..d26e957 --- /dev/null +++ b/zsh/zshrc @@ -0,0 +1,62 @@ +# Lines configured by zsh-newuser-install +HISTFILE=~/.histfile +HISTSIZE=1000 +SAVEHIST=1000 +bindkey -e +# End of lines configured by zsh-newuser-install +# The following lines were added by compinstall + +zstyle ':completion:*' completer _expand _complete _ignored +zstyle ':completion:*' list-colors '' +zstyle ':completion:*' menu select=3 +zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s +zstyle :compinstall filename '/home/kellya/.zshrc' + +autoload -Uz compinit +compinit +# End of lines added by compinstall +# create a zkbd compatible hash; +# to add other keys to this hash, see: man 5 terminfo +typeset -A key + +key[Home]=${terminfo[khome]} + +key[End]=${terminfo[kend]} +key[Insert]=${terminfo[kich1]} +key[Delete]=${terminfo[kdch1]} +key[Up]=${terminfo[kcuu1]} +key[Down]=${terminfo[kcud1]} +key[Left]=${terminfo[kcub1]} +key[Right]=${terminfo[kcuf1]} +key[PageUp]=${terminfo[kpp]} +key[PageDown]=${terminfo[knp]} + +# setup key accordingly +[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line +[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line +[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode +[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char +[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history +[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history +[[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char +[[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char +[[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" beginning-of-buffer-or-history +[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" end-of-buffer-or-history + +# Finally, make sure the terminal is in application mode, when zle is +# active. Only then are the values from $terminfo valid. +if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then + function zle-line-init () { + printf '%s' "${terminfo[smkx]}" + } + function zle-line-finish () { + printf '%s' "${terminfo[rmkx]}" + } + zle -N zle-line-init + zle -N zle-line-finish +fi +# Messing with the prompt +autoload -U promptinit +promptinit +source /home/kellya/dotfiles/zsh/zsh-git-prompt/zshrc.sh +RPS1='$(git_super_status)'