forked from colonelpanic/dotfiles
Remove vim.
This commit is contained in:
parent
aa94752861
commit
414a42bcb6
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +0,0 @@
|
||||
[submodule "dotfiles/vim/bundle/vundle"]
|
||||
path = dotfiles/vim/bundle/vundle
|
||||
url = https://github.com/gmarik/Vundle.vim.git
|
@ -1,230 +0,0 @@
|
||||
" pathogen.vim - path option manipulation
|
||||
" Maintainer: Tim Pope <http://tpo.pe/>
|
||||
" Version: 2.0
|
||||
|
||||
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
|
||||
"
|
||||
" For management of individually installed plugins in ~/.vim/bundle (or
|
||||
" ~\vimfiles\bundle), adding `call pathogen#infect()` to your .vimrc
|
||||
" prior to `fileype plugin indent on` 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
|
||||
|
||||
" Point of entry for basic default usage. Give a directory name to invoke
|
||||
" pathogen#runtime_append_all_bundles() (defaults to "bundle"), or a full path
|
||||
" to invoke pathogen#runtime_prepend_subdirectories(). Afterwards,
|
||||
" pathogen#cycle_filetype() is invoked.
|
||||
function! pathogen#infect(...) abort " {{{1
|
||||
let source_path = a:0 ? a:1 : 'bundle'
|
||||
if source_path =~# '[\\/]'
|
||||
call pathogen#runtime_prepend_subdirectories(source_path)
|
||||
else
|
||||
call pathogen#runtime_append_all_bundles(source_path)
|
||||
endif
|
||||
call pathogen#cycle_filetype()
|
||||
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,'\\\@<!\%(\\\\\)*\zs,')
|
||||
return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
|
||||
endfunction " }}}1
|
||||
|
||||
" Convert a list to a path.
|
||||
function! pathogen#join(...) abort " {{{1
|
||||
if type(a:1) == type(1) && a:1
|
||||
let i = 1
|
||||
let space = ' '
|
||||
else
|
||||
let i = 0
|
||||
let space = ''
|
||||
endif
|
||||
let path = ""
|
||||
while i < a:0
|
||||
if type(a:000[i]) == type([])
|
||||
let list = a:000[i]
|
||||
let j = 0
|
||||
while j < len(list)
|
||||
let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
|
||||
let path .= ',' . escaped
|
||||
let j += 1
|
||||
endwhile
|
||||
else
|
||||
let path .= "," . a:000[i]
|
||||
endif
|
||||
let i += 1
|
||||
endwhile
|
||||
return substitute(path,'^,','','')
|
||||
endfunction " }}}1
|
||||
|
||||
" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
|
||||
function! pathogen#legacyjoin(...) abort " {{{1
|
||||
return call('pathogen#join',[1] + a:000)
|
||||
endfunction " }}}1
|
||||
|
||||
" Remove duplicates from a list.
|
||||
function! pathogen#uniq(list) abort " {{{1
|
||||
let i = 0
|
||||
let seen = {}
|
||||
while i < len(a:list)
|
||||
if has_key(seen,a:list[i])
|
||||
call remove(a:list,i)
|
||||
else
|
||||
let seen[a:list[i]] = 1
|
||||
let i += 1
|
||||
endif
|
||||
endwhile
|
||||
return a:list
|
||||
endfunction " }}}1
|
||||
|
||||
" \ on Windows unless shellslash is set, / everywhere else.
|
||||
function! pathogen#separator() abort " {{{1
|
||||
return !exists("+shellslash") || &shellslash ? '/' : '\'
|
||||
endfunction " }}}1
|
||||
|
||||
" Convenience wrapper around glob() which returns a list.
|
||||
function! pathogen#glob(pattern) abort " {{{1
|
||||
let files = split(glob(a:pattern),"\n")
|
||||
return map(files,'substitute(v:val,"[".pathogen#separator()."/]$","","")')
|
||||
endfunction "}}}1
|
||||
|
||||
" Like pathogen#glob(), only limit the results to directories.
|
||||
function! pathogen#glob_directories(pattern) abort " {{{1
|
||||
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
|
||||
endfunction "}}}1
|
||||
|
||||
" Turn filetype detection off and back on again if it was already enabled.
|
||||
function! pathogen#cycle_filetype() " {{{1
|
||||
if exists('g:did_load_filetypes')
|
||||
filetype off
|
||||
filetype on
|
||||
endif
|
||||
endfunction " }}}1
|
||||
|
||||
" Checks if a bundle is 'disabled'. A bundle is considered 'disabled' if
|
||||
" its 'basename()' is included in g:pathogen_disabled[]' or ends in a tilde.
|
||||
function! pathogen#is_disabled(path) " {{{1
|
||||
if a:path =~# '\~$'
|
||||
return 1
|
||||
elseif !exists("g:pathogen_disabled")
|
||||
return 0
|
||||
endif
|
||||
let sep = pathogen#separator()
|
||||
return index(g:pathogen_disabled, strpart(a:path, strridx(a:path, sep)+1)) != -1
|
||||
endfunction "}}}1
|
||||
|
||||
" Prepend all subdirectories of path to the rtp, and append all 'after'
|
||||
" directories in those subdirectories.
|
||||
function! pathogen#runtime_prepend_subdirectories(path) " {{{1
|
||||
let sep = pathogen#separator()
|
||||
let before = filter(pathogen#glob_directories(a:path.sep."*"), '!pathogen#is_disabled(v:val)')
|
||||
let after = filter(pathogen#glob_directories(a:path.sep."*".sep."after"), '!pathogen#is_disabled(v:val[0:-7])')
|
||||
let rtp = pathogen#split(&rtp)
|
||||
let path = expand(a:path)
|
||||
call filter(rtp,'v:val[0:strlen(path)-1] !=# path')
|
||||
let &rtp = pathogen#join(pathogen#uniq(before + rtp + after))
|
||||
return &rtp
|
||||
endfunction " }}}1
|
||||
|
||||
" For each directory in rtp, check for a subdirectory named dir. If it
|
||||
" exists, add all subdirectories of that subdirectory to the rtp, immediately
|
||||
" after the original directory. If no argument is given, 'bundle' is used.
|
||||
" Repeated calls with the same arguments are ignored.
|
||||
function! pathogen#runtime_append_all_bundles(...) " {{{1
|
||||
let sep = pathogen#separator()
|
||||
let name = a:0 ? a:1 : 'bundle'
|
||||
if "\n".s:done_bundles =~# "\\M\n".name."\n"
|
||||
return ""
|
||||
endif
|
||||
let s:done_bundles .= name . "\n"
|
||||
let list = []
|
||||
for dir in pathogen#split(&rtp)
|
||||
if dir =~# '\<after$'
|
||||
let list += filter(pathogen#glob_directories(substitute(dir,'after$',name,'').sep.'*[^~]'.sep.'after'), '!pathogen#is_disabled(v:val[0:-7])') + [dir]
|
||||
else
|
||||
let list += [dir] + filter(pathogen#glob_directories(dir.sep.name.sep.'*[^~]'), '!pathogen#is_disabled(v:val)')
|
||||
endif
|
||||
endfor
|
||||
let &rtp = pathogen#join(pathogen#uniq(list))
|
||||
return 1
|
||||
endfunction
|
||||
|
||||
let s:done_bundles = ''
|
||||
" }}}1
|
||||
|
||||
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
|
||||
function! pathogen#helptags() " {{{1
|
||||
let sep = pathogen#separator()
|
||||
for dir in pathogen#split(&rtp)
|
||||
if (dir.sep)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir.'/doc') == 2 && !empty(glob(dir.'/doc/*')) && (!filereadable(dir.'/doc/tags') || filewritable(dir.'/doc/tags'))
|
||||
helptags `=dir.'/doc'`
|
||||
endif
|
||||
endfor
|
||||
endfunction " }}}1
|
||||
|
||||
command! -bar Helptags :call pathogen#helptags()
|
||||
|
||||
" Like findfile(), but hardcoded to use the runtimepath.
|
||||
function! pathogen#rtpfindfile(file,count) "{{{1
|
||||
let rtp = pathogen#join(1,pathogen#split(&rtp))
|
||||
return fnamemodify(findfile(a:file,rtp,a:count),':p')
|
||||
endfunction " }}}1
|
||||
|
||||
function! s:find(count,cmd,file,...) " {{{1
|
||||
let rtp = pathogen#join(1,pathogen#split(&runtimepath))
|
||||
let file = pathogen#rtpfindfile(a:file,a:count)
|
||||
if file ==# ''
|
||||
return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'"
|
||||
elseif a:0
|
||||
let path = file[0:-strlen(a:file)-2]
|
||||
execute a:1.' `=path`'
|
||||
return a:cmd.' '.fnameescape(a:file)
|
||||
else
|
||||
return a:cmd.' '.fnameescape(file)
|
||||
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 matches = split(glob(path.sep.pattern),"\n")
|
||||
call map(matches,'isdirectory(v:val) ? v:val.sep : v:val')
|
||||
call map(matches,'v:val[strlen(path)+1:-1]')
|
||||
for match in matches
|
||||
let found[match] = 1
|
||||
endfor
|
||||
endfor
|
||||
return sort(keys(found))
|
||||
endfunction " }}}1
|
||||
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(<count>,'edit<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(<count>,'edit<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(<count>,'split<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(<count>,'vsplit<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(<count>,'tabedit<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(<count>,'pedit<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(<count>,'read<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(<count>,'edit<bang>',<q-args>,'lcd')
|
||||
|
||||
" vim:set ft=vim ts=8 sw=2 sts=2:
|
@ -1 +0,0 @@
|
||||
Subproject commit 0b28e334e65b6628b0a61c412fcb45204a2f2bab
|
@ -1,211 +0,0 @@
|
||||
" Vim color file
|
||||
"
|
||||
" Author: Tomas Restrepo <tomas@winterdom.com>
|
||||
"
|
||||
" Note: Based on the monokai theme for textmate
|
||||
" by Wimer Hazenberg and its darker variant
|
||||
" by Hamish Stuart Macpherson
|
||||
"
|
||||
|
||||
hi clear
|
||||
|
||||
set background=dark
|
||||
if version > 580
|
||||
" no guarantees for version 5.8 and below, but this makes it stop
|
||||
" complaining
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
endif
|
||||
let g:colors_name="molokai"
|
||||
|
||||
if exists("g:molokai_original")
|
||||
let s:molokai_original = g:molokai_original
|
||||
else
|
||||
let s:molokai_original = 0
|
||||
endif
|
||||
|
||||
|
||||
hi Boolean guifg=#AE81FF
|
||||
hi Character guifg=#E6DB74
|
||||
hi Number guifg=#AE81FF
|
||||
hi String guifg=#E6DB74
|
||||
hi Conditional guifg=#F92672 gui=bold
|
||||
hi Constant guifg=#AE81FF gui=bold
|
||||
hi Cursor guifg=#000000 guibg=#F8F8F0
|
||||
hi Debug guifg=#BCA3A3 gui=bold
|
||||
hi Define guifg=#66D9EF
|
||||
hi Delimiter guifg=#8F8F8F
|
||||
hi DiffAdd guibg=#13354A
|
||||
hi DiffChange guifg=#89807D guibg=#4C4745
|
||||
hi DiffDelete guifg=#960050 guibg=#1E0010
|
||||
hi DiffText guibg=#4C4745 gui=italic,bold
|
||||
|
||||
hi Directory guifg=#A6E22E gui=bold
|
||||
hi Error guifg=#960050 guibg=#1E0010
|
||||
hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold
|
||||
hi Exception guifg=#A6E22E gui=bold
|
||||
hi Float guifg=#AE81FF
|
||||
hi FoldColumn guifg=#465457 guibg=#000000
|
||||
hi Folded guifg=#465457 guibg=#000000
|
||||
hi Function guifg=#A6E22E
|
||||
hi Identifier guifg=#FD971F
|
||||
hi Ignore guifg=#808080 guibg=bg
|
||||
hi IncSearch guifg=#C4BE89 guibg=#000000
|
||||
|
||||
hi Keyword guifg=#F92672 gui=bold
|
||||
hi Label guifg=#E6DB74 gui=none
|
||||
hi Macro guifg=#C4BE89 gui=italic
|
||||
hi SpecialKey guifg=#66D9EF gui=italic
|
||||
|
||||
hi MatchParen guifg=#000000 guibg=#FD971F gui=bold
|
||||
hi ModeMsg guifg=#E6DB74
|
||||
hi MoreMsg guifg=#E6DB74
|
||||
hi Operator guifg=#F92672
|
||||
|
||||
" complete menu
|
||||
hi Pmenu guifg=#66D9EF guibg=#000000
|
||||
hi PmenuSel guibg=#808080
|
||||
hi PmenuSbar guibg=#080808
|
||||
hi PmenuThumb guifg=#66D9EF
|
||||
|
||||
hi PreCondit guifg=#A6E22E gui=bold
|
||||
hi PreProc guifg=#A6E22E
|
||||
hi Question guifg=#66D9EF
|
||||
hi Repeat guifg=#F92672 gui=bold
|
||||
hi Search guifg=#FFFFFF guibg=#455354
|
||||
" marks column
|
||||
hi SignColumn guifg=#A6E22E guibg=#232526
|
||||
hi SpecialChar guifg=#F92672 gui=bold
|
||||
hi SpecialComment guifg=#465457 gui=bold
|
||||
hi Special guifg=#66D9EF guibg=bg gui=italic
|
||||
hi SpecialKey guifg=#888A85 gui=italic
|
||||
if has("spell")
|
||||
hi SpellBad guisp=#FF0000 gui=undercurl
|
||||
hi SpellCap guisp=#7070F0 gui=undercurl
|
||||
hi SpellLocal guisp=#70F0F0 gui=undercurl
|
||||
hi SpellRare guisp=#FFFFFF gui=undercurl
|
||||
endif
|
||||
hi Statement guifg=#F92672 gui=bold
|
||||
hi StatusLine guifg=#455354 guibg=fg
|
||||
hi StatusLineNC guifg=#808080 guibg=#080808
|
||||
hi StorageClass guifg=#FD971F gui=italic
|
||||
hi Structure guifg=#66D9EF
|
||||
hi Tag guifg=#F92672 gui=italic
|
||||
hi Title guifg=#ef5939
|
||||
hi Todo guifg=#FFFFFF guibg=bg gui=bold
|
||||
|
||||
hi Typedef guifg=#66D9EF
|
||||
hi Type guifg=#66D9EF gui=none
|
||||
hi Underlined guifg=#808080 gui=underline
|
||||
|
||||
hi VertSplit guifg=#808080 guibg=#080808 gui=bold
|
||||
hi VisualNOS guibg=#403D3D
|
||||
hi Visual guibg=#403D3D
|
||||
hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold
|
||||
hi WildMenu guifg=#66D9EF guibg=#000000
|
||||
|
||||
if s:molokai_original == 1
|
||||
hi Normal guifg=#F8F8F2 guibg=#272822
|
||||
hi Comment guifg=#75715E
|
||||
hi CursorLine guibg=#3E3D32
|
||||
hi CursorColumn guibg=#3E3D32
|
||||
hi LineNr guifg=#BCBCBC guibg=#3B3A32
|
||||
hi NonText guifg=#BCBCBC guibg=#3B3A32
|
||||
else
|
||||
hi Normal guifg=#F8F8F2 guibg=#1B1D1E
|
||||
hi Comment guifg=#465457
|
||||
hi CursorLine guibg=#293739
|
||||
hi CursorColumn guibg=#293739
|
||||
hi LineNr guifg=#BCBCBC guibg=#232526
|
||||
hi NonText guifg=#BCBCBC guibg=#232526
|
||||
end
|
||||
|
||||
"
|
||||
" Support for 256-color terminal
|
||||
"
|
||||
if &t_Co > 255
|
||||
hi Boolean ctermfg=135
|
||||
hi Character ctermfg=144
|
||||
hi Number ctermfg=135
|
||||
hi String ctermfg=144
|
||||
hi Conditional ctermfg=161 cterm=bold
|
||||
hi Constant ctermfg=135 cterm=bold
|
||||
hi Cursor ctermfg=16 ctermbg=253
|
||||
hi Debug ctermfg=225 cterm=bold
|
||||
hi Define ctermfg=81
|
||||
hi Delimiter ctermfg=241
|
||||
|
||||
hi DiffAdd ctermbg=24
|
||||
hi DiffChange ctermfg=181 ctermbg=239
|
||||
hi DiffDelete ctermfg=162 ctermbg=53
|
||||
hi DiffText ctermbg=102 cterm=bold
|
||||
|
||||
hi Directory ctermfg=118 cterm=bold
|
||||
hi Error ctermfg=219 ctermbg=89
|
||||
hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold
|
||||
hi Exception ctermfg=118 cterm=bold
|
||||
hi Float ctermfg=135
|
||||
hi FoldColumn ctermfg=67 ctermbg=16
|
||||
hi Folded ctermfg=67 ctermbg=16
|
||||
hi Function ctermfg=118
|
||||
hi Identifier ctermfg=208
|
||||
hi Ignore ctermfg=244 ctermbg=232
|
||||
hi IncSearch ctermfg=193 ctermbg=16
|
||||
|
||||
hi Keyword ctermfg=161 cterm=bold
|
||||
hi Label ctermfg=229 cterm=none
|
||||
hi Macro ctermfg=193
|
||||
hi SpecialKey ctermfg=81
|
||||
|
||||
hi MatchParen ctermfg=16 ctermbg=208 cterm=bold
|
||||
hi ModeMsg ctermfg=229
|
||||
hi MoreMsg ctermfg=229
|
||||
hi Operator ctermfg=161
|
||||
|
||||
" complete menu
|
||||
hi Pmenu ctermfg=81 ctermbg=16
|
||||
hi PmenuSel ctermbg=244
|
||||
hi PmenuSbar ctermbg=232
|
||||
hi PmenuThumb ctermfg=81
|
||||
|
||||
hi PreCondit ctermfg=118 cterm=bold
|
||||
hi PreProc ctermfg=118
|
||||
hi Question ctermfg=81
|
||||
hi Repeat ctermfg=161 cterm=bold
|
||||
hi Search ctermfg=253 ctermbg=66
|
||||
|
||||
" marks column
|
||||
hi SignColumn ctermfg=118 ctermbg=235
|
||||
hi SpecialChar ctermfg=161 cterm=bold
|
||||
hi SpecialComment ctermfg=245 cterm=bold
|
||||
hi Special ctermfg=81 ctermbg=232
|
||||
hi SpecialKey ctermfg=245
|
||||
|
||||
hi Statement ctermfg=161 cterm=bold
|
||||
hi StatusLine ctermfg=238 ctermbg=253
|
||||
hi StatusLineNC ctermfg=244 ctermbg=232
|
||||
hi StorageClass ctermfg=208
|
||||
hi Structure ctermfg=81
|
||||
hi Tag ctermfg=161
|
||||
hi Title ctermfg=166
|
||||
hi Todo ctermfg=231 ctermbg=232 cterm=bold
|
||||
|
||||
hi Typedef ctermfg=81
|
||||
hi Type ctermfg=81 cterm=none
|
||||
hi Underlined ctermfg=244 cterm=underline
|
||||
|
||||
hi VertSplit ctermfg=244 ctermbg=232 cterm=bold
|
||||
hi VisualNOS ctermbg=238
|
||||
hi Visual ctermbg=235
|
||||
hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold
|
||||
hi WildMenu ctermfg=81 ctermbg=16
|
||||
|
||||
hi Normal ctermfg=252 ctermbg=233
|
||||
hi Comment ctermfg=59
|
||||
hi CursorLine ctermbg=234 cterm=none
|
||||
hi CursorColumn ctermbg=234
|
||||
hi LineNr ctermfg=250 ctermbg=234
|
||||
hi NonText ctermfg=250 ctermbg=234
|
||||
end
|
245
dotfiles/vimrc
245
dotfiles/vimrc
@ -1,245 +0,0 @@
|
||||
" General " {{{
|
||||
|
||||
colorscheme molokai
|
||||
set background=dark
|
||||
set number
|
||||
set showmode " display the current mode
|
||||
set wrap " always wrap
|
||||
set title " show title in console title bar
|
||||
set laststatus=2 " always show statusline
|
||||
|
||||
" highlighting
|
||||
syntax enable
|
||||
set showmatch " highlight block ends
|
||||
set cursorline " highlight the cursor line
|
||||
|
||||
" display tabs and trailing whitespace
|
||||
set list
|
||||
set listchars=tab:⇥·,trail:·
|
||||
match Error /\v\s+$/ " use the Error colors for trailing whitespace
|
||||
|
||||
" indents
|
||||
set cindent
|
||||
set autoindent
|
||||
set indentkeys-=0# " do not break indent on #
|
||||
set tabstop=4
|
||||
|
||||
if has('mac')
|
||||
set expandtab
|
||||
set shiftwidth=4
|
||||
endif
|
||||
|
||||
" tab completion
|
||||
set wildmenu
|
||||
set wildmode=full
|
||||
|
||||
" no backup
|
||||
set nobackup
|
||||
set nowritebackup
|
||||
set noswapfile
|
||||
|
||||
" search
|
||||
set ignorecase " case insensitive search
|
||||
set smartcase " upper case search only matches uppercase
|
||||
set hlsearch " highlight search results
|
||||
set incsearch " search as you type
|
||||
set scrolljump=5 " lines to scroll when cursor leaves screen
|
||||
set scrolloff=3 " minimum lines to keep above and below cursor
|
||||
|
||||
" windows
|
||||
set equalalways
|
||||
set splitbelow splitright
|
||||
|
||||
" ignore these
|
||||
set wildignore=.svn,CVS,.git,.hg
|
||||
set wildignore+=*.o,*.a,*.class,*.mo,*.la,*.so,*.obj
|
||||
set wildignore+=*.sw*,*.jpg,*.png,*.xpm,*.gif
|
||||
set wildignore+=*.pyc,*templates/*.py,*.log
|
||||
|
||||
set mouse=a
|
||||
|
||||
" line at 80
|
||||
if exists("&colorcolumn")
|
||||
set colorcolumn=80
|
||||
endif
|
||||
|
||||
" }}}
|
||||
|
||||
" Remaps " {{{
|
||||
|
||||
" strip trailing whitespace (\ss)
|
||||
function! StripWhitespace()
|
||||
let save_cursor = getpos(".")
|
||||
let old_query = getreg('/')
|
||||
:%s/\s\+$//e
|
||||
call setpos('.', save_cursor)
|
||||
call setreg('/', old_query)
|
||||
endfunction
|
||||
noremap <leader>ss :call StripWhitespace()<CR>
|
||||
|
||||
" ipdb
|
||||
map <leader>db A<CR>import ipdb; ipdb.set_trace()<ESC>
|
||||
|
||||
" pastebinit
|
||||
map <leader>pb :w !pastebinit -<CR>
|
||||
|
||||
" directory of current buffer
|
||||
cnoremap $$ <C-R>=expand('%:h').'/'<cr>
|
||||
|
||||
" one keystroke to change buffers
|
||||
map <C-h> <C-w>h
|
||||
map <C-j> <C-w>j
|
||||
map <C-k> <C-w>k
|
||||
map <C-l> <C-w>l
|
||||
|
||||
" }}}
|
||||
|
||||
" Bundles " {{{
|
||||
|
||||
filetype off
|
||||
|
||||
set rtp+=~/.vim/bundle/vundle/
|
||||
call vundle#rc()
|
||||
|
||||
Bundle 'gmarik/vundle'
|
||||
|
||||
" CamelCaseMotion " {{{
|
||||
|
||||
Bundle 'bkad/CamelCaseMotion'
|
||||
|
||||
" Replace the default 'w', 'b' and 'e' mappings for CamelCase (and_underscore)
|
||||
map <silent> w <Plug>CamelCaseMotion_w
|
||||
map <silent> b <Plug>CamelCaseMotion_b
|
||||
map <silent> e <Plug>CamelCaseMotion_e
|
||||
sunmap w
|
||||
sunmap b
|
||||
sunmap e
|
||||
|
||||
" Replace default 'iw' text-object and define 'ib' and 'ie' motions:
|
||||
omap <silent> iw <Plug>CamelCaseMotion_iw
|
||||
xmap <silent> iw <Plug>CamelCaseMotion_iw
|
||||
omap <silent> ib <Plug>CamelCaseMotion_ib
|
||||
xmap <silent> ib <Plug>CamelCaseMotion_ib
|
||||
omap <silent> ie <Plug>CamelCaseMotion_ie
|
||||
xmap <silent> ie <Plug>CamelCaseMotion_ie
|
||||
|
||||
" }}}
|
||||
|
||||
" Programming " {{{
|
||||
|
||||
Bundle 'vim-scripts/python.vim'
|
||||
let python_highlight_all = 1
|
||||
|
||||
" }}}
|
||||
|
||||
|
||||
" Powerline " {{{
|
||||
|
||||
Bundle 'Lokaltog/vim-powerline'
|
||||
|
||||
" }}}
|
||||
|
||||
" Neocomplcache " {{{
|
||||
|
||||
Bundle 'vim-scripts/neocomplcache'
|
||||
let g:neocomplcache_enable_at_startup = 1
|
||||
|
||||
" }}}
|
||||
|
||||
" TagBar " {{{
|
||||
|
||||
Bundle 'majutsushi/tagbar'
|
||||
nmap \t :TagbarOpen['j']<CR>
|
||||
|
||||
" }}}
|
||||
|
||||
" CtrlP " {{{
|
||||
|
||||
Bundle 'kien/ctrlp.vim'
|
||||
let g:ctrlp_working_path_mode = 'ra'
|
||||
let g:ctrlp_user_command = 'find %s -type f'
|
||||
let g:ctrlp_custom_ignore = {
|
||||
\ 'dir': '\v[\/]\.(git|hg|svn)$',
|
||||
\ 'file': '\v\.(exe|so|dll)$',
|
||||
\ }
|
||||
|
||||
" CommandT
|
||||
map \e :CommandT<cr>
|
||||
let g:CommandTMaxFiles=100000
|
||||
|
||||
" }}}
|
||||
|
||||
" jedi-vim " {{{
|
||||
|
||||
Bundle 'davidhalter/jedi-vim'
|
||||
let g:jedi#use_tabs_not_buffers = 0
|
||||
let g:jedi#popup_on_dot = 0
|
||||
|
||||
" disable auto select first candidate in popup menu
|
||||
inoremap <buffer> . .<C-R>=jedi#do_popup_on_dot() ? "\<lt>C-X>\<lt>C-O>\<lt>C-P>" : ""<CR>
|
||||
|
||||
" }}}
|
||||
|
||||
" Git " {{{
|
||||
|
||||
Bundle 'tpope/vim-fugitive'
|
||||
|
||||
nnoremap <leader>b :Gblame<CR>
|
||||
|
||||
" }}}
|
||||
|
||||
" Syntax " {{{
|
||||
|
||||
" Bundle 'vim-scripts/Syntastic'
|
||||
Bundle 'pyflakes.vim'
|
||||
|
||||
" }}}
|
||||
|
||||
" Rainbow Parens {{{
|
||||
|
||||
Bundle 'kien/rainbow_parentheses.vim'
|
||||
|
||||
au VimEnter * RainbowParenthesesToggle
|
||||
au Syntax * RainbowParenthesesLoadRound
|
||||
au Syntax * RainbowParenthesesLoadSquare
|
||||
au Syntax * RainbowParenthesesLoadBraces
|
||||
|
||||
let g:rbpt_colorpairs = [
|
||||
\ ['brown', 'RoyalBlue3'],
|
||||
\ ['Darkblue', 'SeaGreen3'],
|
||||
\ ['darkgray', 'DarkOrchid3'],
|
||||
\ ['darkgreen', 'firebrick3'],
|
||||
\ ['darkcyan', 'RoyalBlue3'],
|
||||
\ ['darkred', 'SeaGreen3'],
|
||||
\ ['darkmagenta', 'DarkOrchid3'],
|
||||
\ ['brown', 'firebrick3'],
|
||||
\ ['gray', 'RoyalBlue3'],
|
||||
\ ['black', 'SeaGreen3'],
|
||||
\ ['darkmagenta', 'DarkOrchid3'],
|
||||
\ ['Darkblue', 'firebrick3'],
|
||||
\ ['darkgreen', 'RoyalBlue3'],
|
||||
\ ['darkcyan', 'SeaGreen3'],
|
||||
\ ['darkred', 'DarkOrchid3'],
|
||||
\ ['red', 'firebrick3'],
|
||||
\ ]
|
||||
|
||||
" }}}
|
||||
|
||||
" move " {{{
|
||||
|
||||
Bundle 'vim-scripts/move'
|
||||
|
||||
" }}}
|
||||
|
||||
filetype plugin indent on
|
||||
|
||||
" }}}
|
||||
|
||||
" Commented Shit " {{{
|
||||
"
|
||||
" CommandT
|
||||
" map \e :CommandT<cr>
|
||||
" let g:CommandTMaxFiles=100000
|
||||
"
|
||||
" }}}
|
||||
|
Loading…
Reference in New Issue
Block a user