From 1212a9d32dbc809bcce679b9d36f3a233af3193e Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Fri, 21 Aug 2015 03:14:10 -0700 Subject: Switch to stow --- vim/.gvimrc | 2 + vim/.vim/autoload/pathogen.vim | 328 ++++++++++++++++++++++++++++++++ vim/.vim/bundle/ctrlp.vim | 1 + vim/.vim/bundle/julia-vim | 1 + vim/.vim/bundle/molokai | 1 + vim/.vim/bundle/nerdtree | 1 + vim/.vim/bundle/pig.vim | 1 + vim/.vim/bundle/python-mode | 1 + vim/.vim/bundle/rainbow_parentheses.vim | 1 + vim/.vim/bundle/sessionman.vim | 1 + vim/.vim/bundle/tagbar | 1 + vim/.vim/bundle/vim-fugitive | 1 + vim/.vim/bundle/vim-ipython | 1 + vim/.vim/bundle/vim-surround | 1 + vim/.vim/bundle/vimwiki | 1 + vim/.vimrc | 123 ++++++++++++ 16 files changed, 466 insertions(+) create mode 100644 vim/.gvimrc create mode 100644 vim/.vim/autoload/pathogen.vim create mode 160000 vim/.vim/bundle/ctrlp.vim create mode 160000 vim/.vim/bundle/julia-vim create mode 160000 vim/.vim/bundle/molokai create mode 160000 vim/.vim/bundle/nerdtree create mode 160000 vim/.vim/bundle/pig.vim create mode 160000 vim/.vim/bundle/python-mode create mode 160000 vim/.vim/bundle/rainbow_parentheses.vim create mode 160000 vim/.vim/bundle/sessionman.vim create mode 160000 vim/.vim/bundle/tagbar create mode 160000 vim/.vim/bundle/vim-fugitive create mode 160000 vim/.vim/bundle/vim-ipython create mode 160000 vim/.vim/bundle/vim-surround create mode 160000 vim/.vim/bundle/vimwiki create mode 100644 vim/.vimrc (limited to 'vim') diff --git a/vim/.gvimrc b/vim/.gvimrc new file mode 100644 index 0000000..6b7b63c --- /dev/null +++ b/vim/.gvimrc @@ -0,0 +1,2 @@ +set guioptions=aeigmt +set gfn="Inconsolata\ Medium\ 12" diff --git a/vim/.vim/autoload/pathogen.vim b/vim/.vim/autoload/pathogen.vim new file mode 100644 index 0000000..16c21fe --- /dev/null +++ b/vim/.vim/autoload/pathogen.vim @@ -0,0 +1,328 @@ +" pathogen.vim - path option manipulation +" Maintainer: Tim Pope +" Version: 2.2 + +" Install in ~/.vim/autoload (or ~\vimfiles\autoload). +" +" For management of individually installed plugins in ~/.vim/bundle (or +" ~\vimfiles\bundle), adding `call pathogen#infect()` to the top of your +" .vimrc is the only other setup necessary. +" +" The API is documented inline below. For maximum ease of reading, +" :set foldmethod=marker + +if exists("g:loaded_pathogen") || &cp + finish +endif +let g:loaded_pathogen = 1 + +function! s:warn(msg) + if &verbose + echohl WarningMsg + echomsg a:msg + echohl NONE + endif +endfunction + +" Point of entry for basic default usage. Give a relative path to invoke +" pathogen#incubate() (defaults to "bundle/{}"), or an absolute path to invoke +" pathogen#surround(). For backwards compatibility purposes, a full path that +" does not end in {} or * is given to pathogen#runtime_prepend_subdirectories() +" instead. +function! pathogen#infect(...) abort " {{{1 + for path in a:0 ? reverse(copy(a:000)) : ['bundle/{}'] + if path =~# '^[^\\/]\+$' + call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') + call pathogen#incubate(path . '/{}') + elseif path =~# '^[^\\/]\+[\\/]\%({}\|\*\)$' + call pathogen#incubate(path) + elseif path =~# '[\\/]\%({}\|\*\)$' + call pathogen#surround(path) + else + call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') + call pathogen#surround(path . '/{}') + endif + endfor + call pathogen#cycle_filetype() + return '' +endfunction " }}}1 + +" Split a path into a list. +function! pathogen#split(path) abort " {{{1 + if type(a:path) == type([]) | return a:path | endif + let split = split(a:path,'\\\@"),'!isdirectory(v:val)')) && (!filereadable(dir.sep.'doc'.sep.'tags') || filewritable(dir.sep.'doc'.sep.'tags')) + helptags `=dir.'/doc'` + endif + endfor + endfor +endfunction " }}}1 + +command! -bar Helptags :call pathogen#helptags() + +" Execute the given command. This is basically a backdoor for --remote-expr. +function! pathogen#execute(...) abort " {{{1 + for command in a:000 + execute command + endfor + return '' +endfunction " }}}1 + +" Like findfile(), but hardcoded to use the runtimepath. +function! pathogen#runtime_findfile(file,count) abort "{{{1 + let rtp = pathogen#join(1,pathogen#split(&rtp)) + let file = findfile(a:file,rtp,a:count) + if file ==# '' + return '' + else + return fnamemodify(file,':p') + endif +endfunction " }}}1 + +" Backport of fnameescape(). +function! pathogen#fnameescape(string) abort " {{{1 + if exists('*fnameescape') + return fnameescape(a:string) + elseif a:string ==# '-' + return '\-' + else + return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','') + endif +endfunction " }}}1 + +if exists(':Vedit') + finish +endif + +let s:vopen_warning = 0 + +function! s:find(count,cmd,file,lcd) " {{{1 + let rtp = pathogen#join(1,pathogen#split(&runtimepath)) + let file = pathogen#runtime_findfile(a:file,a:count) + if file ==# '' + return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'" + endif + if !s:vopen_warning + let s:vopen_warning = 1 + let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE' + else + let warning = '' + endif + if a:lcd + let path = file[0:-strlen(a:file)-2] + execute 'lcd `=path`' + return a:cmd.' '.pathogen#fnameescape(a:file) . warning + else + return a:cmd.' '.pathogen#fnameescape(file) . warning + endif +endfunction " }}}1 + +function! s:Findcomplete(A,L,P) " {{{1 + let sep = pathogen#separator() + let cheats = { + \'a': 'autoload', + \'d': 'doc', + \'f': 'ftplugin', + \'i': 'indent', + \'p': 'plugin', + \'s': 'syntax'} + if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0]) + let request = cheats[a:A[0]].a:A[1:-1] + else + let request = a:A + endif + let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*' + let found = {} + for path in pathogen#split(&runtimepath) + let path = expand(path, ':p') + let matches = split(glob(path.sep.pattern),"\n") + call map(matches,'isdirectory(v:val) ? v:val.sep : v:val') + call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]') + for match in matches + let found[match] = 1 + endfor + endfor + return sort(keys(found)) +endfunction " }}}1 + +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(,'edit',,0) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',,0) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1) + +" vim:set et sw=2: diff --git a/vim/.vim/bundle/ctrlp.vim b/vim/.vim/bundle/ctrlp.vim new file mode 160000 index 0000000..b5d3fe6 --- /dev/null +++ b/vim/.vim/bundle/ctrlp.vim @@ -0,0 +1 @@ +Subproject commit b5d3fe66a58a13d2ff8b6391f4387608496a030f diff --git a/vim/.vim/bundle/julia-vim b/vim/.vim/bundle/julia-vim new file mode 160000 index 0000000..84815ce --- /dev/null +++ b/vim/.vim/bundle/julia-vim @@ -0,0 +1 @@ +Subproject commit 84815cec6c0c277297f2557d563550a0e7e25f5a diff --git a/vim/.vim/bundle/molokai b/vim/.vim/bundle/molokai new file mode 160000 index 0000000..db8ce13 --- /dev/null +++ b/vim/.vim/bundle/molokai @@ -0,0 +1 @@ +Subproject commit db8ce13b3737d3ddea8368498183d7c204a762eb diff --git a/vim/.vim/bundle/nerdtree b/vim/.vim/bundle/nerdtree new file mode 160000 index 0000000..bcf3de4 --- /dev/null +++ b/vim/.vim/bundle/nerdtree @@ -0,0 +1 @@ +Subproject commit bcf3de4fdffae45fc7c85b6b84a01b37177924aa diff --git a/vim/.vim/bundle/pig.vim b/vim/.vim/bundle/pig.vim new file mode 160000 index 0000000..4157cac --- /dev/null +++ b/vim/.vim/bundle/pig.vim @@ -0,0 +1 @@ +Subproject commit 4157cac950c49ca6fb59f1dec2a41f2df90a92e1 diff --git a/vim/.vim/bundle/python-mode b/vim/.vim/bundle/python-mode new file mode 160000 index 0000000..c6a872a --- /dev/null +++ b/vim/.vim/bundle/python-mode @@ -0,0 +1 @@ +Subproject commit c6a872a64530979f4aac46d765c577581cb7fc36 diff --git a/vim/.vim/bundle/rainbow_parentheses.vim b/vim/.vim/bundle/rainbow_parentheses.vim new file mode 160000 index 0000000..eb8baa5 --- /dev/null +++ b/vim/.vim/bundle/rainbow_parentheses.vim @@ -0,0 +1 @@ +Subproject commit eb8baa5428bde10ecc1cb14eed1d6e16f5f24695 diff --git a/vim/.vim/bundle/sessionman.vim b/vim/.vim/bundle/sessionman.vim new file mode 160000 index 0000000..845d35b --- /dev/null +++ b/vim/.vim/bundle/sessionman.vim @@ -0,0 +1 @@ +Subproject commit 845d35b84c5c51f631d8bfa4afe3edc126102ba9 diff --git a/vim/.vim/bundle/tagbar b/vim/.vim/bundle/tagbar new file mode 160000 index 0000000..7b36c46 --- /dev/null +++ b/vim/.vim/bundle/tagbar @@ -0,0 +1 @@ +Subproject commit 7b36c46d17d57db34fdb0adac9ba6382d0bb5e66 diff --git a/vim/.vim/bundle/vim-fugitive b/vim/.vim/bundle/vim-fugitive new file mode 160000 index 0000000..b319b69 --- /dev/null +++ b/vim/.vim/bundle/vim-fugitive @@ -0,0 +1 @@ +Subproject commit b319b694539017dcd789dc2c42f784a30d7b28b8 diff --git a/vim/.vim/bundle/vim-ipython b/vim/.vim/bundle/vim-ipython new file mode 160000 index 0000000..42499f0 --- /dev/null +++ b/vim/.vim/bundle/vim-ipython @@ -0,0 +1 @@ +Subproject commit 42499f094b805b90b683afa5009cee99abd0bb75 diff --git a/vim/.vim/bundle/vim-surround b/vim/.vim/bundle/vim-surround new file mode 160000 index 0000000..2d05440 --- /dev/null +++ b/vim/.vim/bundle/vim-surround @@ -0,0 +1 @@ +Subproject commit 2d05440ad23f97a7874ebd9b5de3a0e65d25d85c diff --git a/vim/.vim/bundle/vimwiki b/vim/.vim/bundle/vimwiki new file mode 160000 index 0000000..cb5c38a --- /dev/null +++ b/vim/.vim/bundle/vimwiki @@ -0,0 +1 @@ +Subproject commit cb5c38a575bcdffa52747aef962dc9d61c7a8207 diff --git a/vim/.vimrc b/vim/.vimrc new file mode 100644 index 0000000..11f9e42 --- /dev/null +++ b/vim/.vimrc @@ -0,0 +1,123 @@ +" basic plugin/ syntax support +execute pathogen#infect() +filetype plugin indent on +syntax on + +autocmd bufwritepost .vimrc source $MYVIMRC + +" theming +set t_Co=256 +set background=dark +colorscheme molokai +set statusline=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P + +set nocompatible + +set wrap +set textwidth=79 +set formatoptions=qrn1 +set colorcolumn=81 + +set modelines=0 +set tabstop=4 +set shiftwidth=4 +set softtabstop=4 +set expandtab +set encoding=utf-8 +set scrolloff=3 +set autoindent +set showmode +set showcmd +set hidden +set wildmenu +set wildmode=list:longest +set visualbell +set cursorline +set ttyfast +set ruler +set backspace=indent,eol,start +set laststatus=2 +set relativenumber +set undofile +set autochdir + +set ignorecase +set smartcase +set gdefault +set incsearch +set showmatch +set hlsearch + +set backup +set noswapfile + +" backups +set undodir=~/.vim/tmp/undo// +set backupdir=~/.vim/tmp/backup// +set directory=~/.vim/tmp/swap// + +if !isdirectory(expand(&undodir)) + call mkdir(expand(&undodir), "p") +endif +if !isdirectory(expand(&backupdir)) + call mkdir(expand(&backupdir), "p") +endif +if !isdirectory(expand(&directory)) + call mkdir(expand(&directory), "p") +endif + +let mapleader = "," +nnoremap :noh +nnoremap % +nnoremap / /\v +vnoremap / /\v +nnoremap +nnoremap +nnoremap +nnoremap +inoremap +inoremap +inoremap +inoremap +nnoremap j gj +nnoremap k gk +nnoremap :NERDTreeToggle +nnoremap :TagbarToggle +nnoremap :RainbowParenthesesToggleAll +nnoremap :CtrlPBuffer +noremap gV '[V'] + +" allows for sequential indent/desindent by reselecting the text +vnoremap < >gv + +" easy window switching +nnoremap h +nnoremap j +nnoremap k +nnoremap l + +" window resizing +nnoremap < +nnoremap > +nnoremap + +nnoremap - + +" text bubbling +" vnoremap xkP'[V'] +nnoremap ddkP +nnoremap ddp +" vnoremap xp'[V'] + +" folding +set foldlevelstart=99 +nnoremap za +nnoremap zA +vnoremap zA + +let g:pymode_lint_write = 0 +let g:pymode_utils_whitespaces = 0 + +autocmd CursorMovedI * if pumvisible() == 0|silent! pclose|endif +autocmd InsertLeave * if pumvisible() == 0|silent! pclose|endif +autocmd FileType mail set fo+=aw spell -- cgit v1.2.3-70-g09d2