mirror of
https://github.com/tomru/DotfilesOld.git
synced 2026-03-03 06:27:21 +01:00
Completely replace configuration. As base use Marc Harters vimrc from https://github.com/wavded/.vim
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
irssi
|
irssi
|
||||||
|
vim/spell
|
||||||
|
|||||||
15
.gitmodules
vendored
15
.gitmodules
vendored
@@ -1,3 +1,18 @@
|
|||||||
[submodule "oh-my-zsh"]
|
[submodule "oh-my-zsh"]
|
||||||
path = oh-my-zsh
|
path = oh-my-zsh
|
||||||
url = git@github.com:igrat/oh-my-zsh.git
|
url = git@github.com:igrat/oh-my-zsh.git
|
||||||
|
[submodule "vim/bundle/vim-javascript"]
|
||||||
|
path = vim/bundle/vim-javascript
|
||||||
|
url = https://github.com/pangloss/vim-javascript.git
|
||||||
|
[submodule "vim/bundle/fugitive"]
|
||||||
|
path = vim/bundle/vim-fugitive
|
||||||
|
url = https://github.com/igrat/vim-fugitive.git
|
||||||
|
[submodule "vim/bundle/nerdtree"]
|
||||||
|
path = vim/bundle/nerdtree
|
||||||
|
url = https://github.com/scrooloose/nerdtree.git
|
||||||
|
[submodule "vim/bundle/vim-fuzzyfinder"]
|
||||||
|
path = vim/bundle/vim-fuzzyfinder
|
||||||
|
url = git@github.com:igrat/vim-fuzzyfinder.git
|
||||||
|
[submodule "vim/bundle/vim-l9"]
|
||||||
|
path = vim/bundle/vim-l9
|
||||||
|
url = git@github.com:igrat/vim-l9.git
|
||||||
|
|||||||
Submodule oh-my-zsh updated: ab2a7b51a8...23409ca907
2
vim/autocorrect.vim
Normal file
2
vim/autocorrect.vim
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
" Well just a example syntax entry
|
||||||
|
iab teh the
|
||||||
234
vim/autoload/pathogen.vim
Normal file
234
vim/autoload/pathogen.vim
Normal file
@@ -0,0 +1,234 @@
|
|||||||
|
" 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 `filetype 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 (a:list[i] ==# '' && exists('empty')) || has_key(seen,a:list[i])
|
||||||
|
call remove(a:list,i)
|
||||||
|
elseif a:list[i] ==# ''
|
||||||
|
let i += 1
|
||||||
|
let empty = 1
|
||||||
|
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.sep.'doc') == 2 && !empty(glob(dir.sep.'doc'.sep.'*')) && (!filereadable(dir.sep.'doc'.sep.'tags') || filewritable(dir.sep.'doc'.sep.'tags'))
|
||||||
|
helptags `=dir.'/doc'`
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
command! -bar Helptags :call pathogen#helptags()
|
||||||
|
|
||||||
|
" Like findfile(), but hardcoded to use the runtimepath.
|
||||||
|
function! pathogen#runtime_findfile(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,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'"
|
||||||
|
elseif a:lcd
|
||||||
|
let path = file[0:-strlen(a:file)-2]
|
||||||
|
execute 'lcd `=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 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(<count>,'edit<bang>',<q-args>,0)
|
||||||
|
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(<count>,'edit<bang>',<q-args>,0)
|
||||||
|
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(<count>,'edit<bang>',<q-args>,1)
|
||||||
|
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(<count>,'split',<q-args>,<bang>1)
|
||||||
|
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(<count>,'vsplit',<q-args>,<bang>1)
|
||||||
|
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(<count>,'tabedit',<q-args>,<bang>1)
|
||||||
|
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(<count>,'pedit',<q-args>,<bang>1)
|
||||||
|
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(<count>,'read',<q-args>,<bang>1)
|
||||||
|
|
||||||
|
" vim:set ft=vim ts=8 sw=2 sts=2:
|
||||||
1
vim/bundle/nerdtree
Submodule
1
vim/bundle/nerdtree
Submodule
Submodule vim/bundle/nerdtree added at 30f6bcc30c
1
vim/bundle/vim-fugitive
Submodule
1
vim/bundle/vim-fugitive
Submodule
Submodule vim/bundle/vim-fugitive added at 1b7e4070f5
1
vim/bundle/vim-fuzzyfinder
Submodule
1
vim/bundle/vim-fuzzyfinder
Submodule
Submodule vim/bundle/vim-fuzzyfinder added at a3459acf38
1
vim/bundle/vim-javascript
Submodule
1
vim/bundle/vim-javascript
Submodule
Submodule vim/bundle/vim-javascript added at 9990a76769
1
vim/bundle/vim-l9
Submodule
1
vim/bundle/vim-l9
Submodule
Submodule vim/bundle/vim-l9 added at 8ac17871dd
File diff suppressed because it is too large
Load Diff
160
vim/doc/tags
160
vim/doc/tags
@@ -1,160 +0,0 @@
|
|||||||
'Tlist_Auto_Highlight_Tag' taglist.txt /*'Tlist_Auto_Highlight_Tag'*
|
|
||||||
'Tlist_Auto_Open' taglist.txt /*'Tlist_Auto_Open'*
|
|
||||||
'Tlist_Auto_Update' taglist.txt /*'Tlist_Auto_Update'*
|
|
||||||
'Tlist_Close_On_Select' taglist.txt /*'Tlist_Close_On_Select'*
|
|
||||||
'Tlist_Compact_Format' taglist.txt /*'Tlist_Compact_Format'*
|
|
||||||
'Tlist_Ctags_Cmd' taglist.txt /*'Tlist_Ctags_Cmd'*
|
|
||||||
'Tlist_Display_Prototype' taglist.txt /*'Tlist_Display_Prototype'*
|
|
||||||
'Tlist_Display_Tag_Scope' taglist.txt /*'Tlist_Display_Tag_Scope'*
|
|
||||||
'Tlist_Enable_Fold_Column' taglist.txt /*'Tlist_Enable_Fold_Column'*
|
|
||||||
'Tlist_Exit_OnlyWindow' taglist.txt /*'Tlist_Exit_OnlyWindow'*
|
|
||||||
'Tlist_File_Fold_Auto_Close' taglist.txt /*'Tlist_File_Fold_Auto_Close'*
|
|
||||||
'Tlist_GainFocus_On_ToggleOpen' taglist.txt /*'Tlist_GainFocus_On_ToggleOpen'*
|
|
||||||
'Tlist_Highlight_Tag_On_BufEnter' taglist.txt /*'Tlist_Highlight_Tag_On_BufEnter'*
|
|
||||||
'Tlist_Inc_Winwidth' taglist.txt /*'Tlist_Inc_Winwidth'*
|
|
||||||
'Tlist_Max_Submenu_Items' taglist.txt /*'Tlist_Max_Submenu_Items'*
|
|
||||||
'Tlist_Max_Tag_Length' taglist.txt /*'Tlist_Max_Tag_Length'*
|
|
||||||
'Tlist_Process_File_Always' taglist.txt /*'Tlist_Process_File_Always'*
|
|
||||||
'Tlist_Show_Menu' taglist.txt /*'Tlist_Show_Menu'*
|
|
||||||
'Tlist_Show_One_File' taglist.txt /*'Tlist_Show_One_File'*
|
|
||||||
'Tlist_Sort_Type' taglist.txt /*'Tlist_Sort_Type'*
|
|
||||||
'Tlist_Use_Horiz_Window' taglist.txt /*'Tlist_Use_Horiz_Window'*
|
|
||||||
'Tlist_Use_Right_Window' taglist.txt /*'Tlist_Use_Right_Window'*
|
|
||||||
'Tlist_Use_SingleClick' taglist.txt /*'Tlist_Use_SingleClick'*
|
|
||||||
'Tlist_WinHeight' taglist.txt /*'Tlist_WinHeight'*
|
|
||||||
'Tlist_WinWidth' taglist.txt /*'Tlist_WinWidth'*
|
|
||||||
:NERDTree NERD_tree.txt /*:NERDTree*
|
|
||||||
:NERDTreeFromBookmark NERD_tree.txt /*:NERDTreeFromBookmark*
|
|
||||||
:NERDTreeToggle NERD_tree.txt /*:NERDTreeToggle*
|
|
||||||
:Snippet snippets_emu.txt /*:Snippet*
|
|
||||||
:TlistAddFiles taglist.txt /*:TlistAddFiles*
|
|
||||||
:TlistAddFilesRecursive taglist.txt /*:TlistAddFilesRecursive*
|
|
||||||
:TlistClose taglist.txt /*:TlistClose*
|
|
||||||
:TlistDebug taglist.txt /*:TlistDebug*
|
|
||||||
:TlistHighlightTag taglist.txt /*:TlistHighlightTag*
|
|
||||||
:TlistLock taglist.txt /*:TlistLock*
|
|
||||||
:TlistMessages taglist.txt /*:TlistMessages*
|
|
||||||
:TlistOpen taglist.txt /*:TlistOpen*
|
|
||||||
:TlistSessionLoad taglist.txt /*:TlistSessionLoad*
|
|
||||||
:TlistSessionSave taglist.txt /*:TlistSessionSave*
|
|
||||||
:TlistShowPrototype taglist.txt /*:TlistShowPrototype*
|
|
||||||
:TlistShowTag taglist.txt /*:TlistShowTag*
|
|
||||||
:TlistToggle taglist.txt /*:TlistToggle*
|
|
||||||
:TlistUndebug taglist.txt /*:TlistUndebug*
|
|
||||||
:TlistUnlock taglist.txt /*:TlistUnlock*
|
|
||||||
:TlistUpdate taglist.txt /*:TlistUpdate*
|
|
||||||
CreateBundleSnippet snippets_emu.txt /*CreateBundleSnippet*
|
|
||||||
CreateSnippet snippets_emu.txt /*CreateSnippet*
|
|
||||||
NERDChristmasTree NERD_tree.txt /*NERDChristmasTree*
|
|
||||||
NERDTree NERD_tree.txt /*NERDTree*
|
|
||||||
NERDTree-! NERD_tree.txt /*NERDTree-!*
|
|
||||||
NERDTree-? NERD_tree.txt /*NERDTree-?*
|
|
||||||
NERDTree-B NERD_tree.txt /*NERDTree-B*
|
|
||||||
NERDTree-C NERD_tree.txt /*NERDTree-C*
|
|
||||||
NERDTree-D NERD_tree.txt /*NERDTree-D*
|
|
||||||
NERDTree-F NERD_tree.txt /*NERDTree-F*
|
|
||||||
NERDTree-H NERD_tree.txt /*NERDTree-H*
|
|
||||||
NERDTree-J NERD_tree.txt /*NERDTree-J*
|
|
||||||
NERDTree-K NERD_tree.txt /*NERDTree-K*
|
|
||||||
NERDTree-O NERD_tree.txt /*NERDTree-O*
|
|
||||||
NERDTree-P NERD_tree.txt /*NERDTree-P*
|
|
||||||
NERDTree-R NERD_tree.txt /*NERDTree-R*
|
|
||||||
NERDTree-T NERD_tree.txt /*NERDTree-T*
|
|
||||||
NERDTree-U NERD_tree.txt /*NERDTree-U*
|
|
||||||
NERDTree-X NERD_tree.txt /*NERDTree-X*
|
|
||||||
NERDTree-c-j NERD_tree.txt /*NERDTree-c-j*
|
|
||||||
NERDTree-c-k NERD_tree.txt /*NERDTree-c-k*
|
|
||||||
NERDTree-contents NERD_tree.txt /*NERDTree-contents*
|
|
||||||
NERDTree-e NERD_tree.txt /*NERDTree-e*
|
|
||||||
NERDTree-f NERD_tree.txt /*NERDTree-f*
|
|
||||||
NERDTree-go NERD_tree.txt /*NERDTree-go*
|
|
||||||
NERDTree-gtab NERD_tree.txt /*NERDTree-gtab*
|
|
||||||
NERDTree-m NERD_tree.txt /*NERDTree-m*
|
|
||||||
NERDTree-o NERD_tree.txt /*NERDTree-o*
|
|
||||||
NERDTree-p NERD_tree.txt /*NERDTree-p*
|
|
||||||
NERDTree-q NERD_tree.txt /*NERDTree-q*
|
|
||||||
NERDTree-r NERD_tree.txt /*NERDTree-r*
|
|
||||||
NERDTree-t NERD_tree.txt /*NERDTree-t*
|
|
||||||
NERDTree-tab NERD_tree.txt /*NERDTree-tab*
|
|
||||||
NERDTree-u NERD_tree.txt /*NERDTree-u*
|
|
||||||
NERDTree-x NERD_tree.txt /*NERDTree-x*
|
|
||||||
NERDTreeAuthor NERD_tree.txt /*NERDTreeAuthor*
|
|
||||||
NERDTreeAutoCenter NERD_tree.txt /*NERDTreeAutoCenter*
|
|
||||||
NERDTreeAutoCenterThreshold NERD_tree.txt /*NERDTreeAutoCenterThreshold*
|
|
||||||
NERDTreeBookmarkCommands NERD_tree.txt /*NERDTreeBookmarkCommands*
|
|
||||||
NERDTreeBookmarkTable NERD_tree.txt /*NERDTreeBookmarkTable*
|
|
||||||
NERDTreeBookmarks NERD_tree.txt /*NERDTreeBookmarks*
|
|
||||||
NERDTreeBookmarksFile NERD_tree.txt /*NERDTreeBookmarksFile*
|
|
||||||
NERDTreeCaseSensitiveSort NERD_tree.txt /*NERDTreeCaseSensitiveSort*
|
|
||||||
NERDTreeChDirMode NERD_tree.txt /*NERDTreeChDirMode*
|
|
||||||
NERDTreeChangelog NERD_tree.txt /*NERDTreeChangelog*
|
|
||||||
NERDTreeCredits NERD_tree.txt /*NERDTreeCredits*
|
|
||||||
NERDTreeFilesysMenu NERD_tree.txt /*NERDTreeFilesysMenu*
|
|
||||||
NERDTreeFunctionality NERD_tree.txt /*NERDTreeFunctionality*
|
|
||||||
NERDTreeGlobalCommands NERD_tree.txt /*NERDTreeGlobalCommands*
|
|
||||||
NERDTreeHighlightCursorline NERD_tree.txt /*NERDTreeHighlightCursorline*
|
|
||||||
NERDTreeIgnore NERD_tree.txt /*NERDTreeIgnore*
|
|
||||||
NERDTreeInvalidBookmarks NERD_tree.txt /*NERDTreeInvalidBookmarks*
|
|
||||||
NERDTreeLicense NERD_tree.txt /*NERDTreeLicense*
|
|
||||||
NERDTreeMappings NERD_tree.txt /*NERDTreeMappings*
|
|
||||||
NERDTreeMouseMode NERD_tree.txt /*NERDTreeMouseMode*
|
|
||||||
NERDTreeOptionDetails NERD_tree.txt /*NERDTreeOptionDetails*
|
|
||||||
NERDTreeOptionSummary NERD_tree.txt /*NERDTreeOptionSummary*
|
|
||||||
NERDTreeOptions NERD_tree.txt /*NERDTreeOptions*
|
|
||||||
NERDTreePublicFunctions NERD_tree.txt /*NERDTreePublicFunctions*
|
|
||||||
NERDTreeQuitOnOpen NERD_tree.txt /*NERDTreeQuitOnOpen*
|
|
||||||
NERDTreeShowBookmarks NERD_tree.txt /*NERDTreeShowBookmarks*
|
|
||||||
NERDTreeShowFiles NERD_tree.txt /*NERDTreeShowFiles*
|
|
||||||
NERDTreeShowHidden NERD_tree.txt /*NERDTreeShowHidden*
|
|
||||||
NERDTreeShowLineNumbers NERD_tree.txt /*NERDTreeShowLineNumbers*
|
|
||||||
NERDTreeSortOrder NERD_tree.txt /*NERDTreeSortOrder*
|
|
||||||
NERDTreeTodo NERD_tree.txt /*NERDTreeTodo*
|
|
||||||
NERDTreeWinPos NERD_tree.txt /*NERDTreeWinPos*
|
|
||||||
NERDTreeWinSize NERD_tree.txt /*NERDTreeWinSize*
|
|
||||||
NERD_tree.txt NERD_tree.txt /*NERD_tree.txt*
|
|
||||||
Tlist_Get_Tag_Prototype_By_Line() taglist.txt /*Tlist_Get_Tag_Prototype_By_Line()*
|
|
||||||
Tlist_Get_Tagname_By_Line() taglist.txt /*Tlist_Get_Tagname_By_Line()*
|
|
||||||
Tlist_Set_App() taglist.txt /*Tlist_Set_App()*
|
|
||||||
Tlist_Update_File_Tags() taglist.txt /*Tlist_Update_File_Tags()*
|
|
||||||
basic-snippet snippets_emu.txt /*basic-snippet*
|
|
||||||
creating-snippets snippets_emu.txt /*creating-snippets*
|
|
||||||
loaded_nerd_tree NERD_tree.txt /*loaded_nerd_tree*
|
|
||||||
named-tags snippets_emu.txt /*named-tags*
|
|
||||||
snip-advanced-tag-commands snippets_emu.txt /*snip-advanced-tag-commands*
|
|
||||||
snip-buffer-specific snippets_emu.txt /*snip-buffer-specific*
|
|
||||||
snip-bundles snippets_emu.txt /*snip-bundles*
|
|
||||||
snip-contact-details snippets_emu.txt /*snip-contact-details*
|
|
||||||
snip-contributors snippets_emu.txt /*snip-contributors*
|
|
||||||
snip-detailed-explanations snippets_emu.txt /*snip-detailed-explanations*
|
|
||||||
snip-elem-delimiter snippets_emu.txt /*snip-elem-delimiter*
|
|
||||||
snip-ftplugin snippets_emu.txt /*snip-ftplugin*
|
|
||||||
snip-limitations snippets_emu.txt /*snip-limitations*
|
|
||||||
snip-menu snippets_emu.txt /*snip-menu*
|
|
||||||
snip-remap-key snippets_emu.txt /*snip-remap-key*
|
|
||||||
snip-snippet-commands snippets_emu.txt /*snip-snippet-commands*
|
|
||||||
snip-special-vars snippets_emu.txt /*snip-special-vars*
|
|
||||||
snip-start-end-tags snippets_emu.txt /*snip-start-end-tags*
|
|
||||||
snip-tag-name-syntax snippets_emu.txt /*snip-tag-name-syntax*
|
|
||||||
snippet-commands snippets_emu.txt /*snippet-commands*
|
|
||||||
snippets_emu-bugs snippets_emu.txt /*snippets_emu-bugs*
|
|
||||||
snippets_emu-features snippets_emu.txt /*snippets_emu-features*
|
|
||||||
snippets_emu-options snippets_emu.txt /*snippets_emu-options*
|
|
||||||
snippets_emu-troubleshooting snippets_emu.txt /*snippets_emu-troubleshooting*
|
|
||||||
snippets_emu.txt snippets_emu.txt /*snippets_emu.txt*
|
|
||||||
taglist-commands taglist.txt /*taglist-commands*
|
|
||||||
taglist-debug taglist.txt /*taglist-debug*
|
|
||||||
taglist-extend taglist.txt /*taglist-extend*
|
|
||||||
taglist-faq taglist.txt /*taglist-faq*
|
|
||||||
taglist-functions taglist.txt /*taglist-functions*
|
|
||||||
taglist-install taglist.txt /*taglist-install*
|
|
||||||
taglist-internet taglist.txt /*taglist-internet*
|
|
||||||
taglist-intro taglist.txt /*taglist-intro*
|
|
||||||
taglist-keys taglist.txt /*taglist-keys*
|
|
||||||
taglist-license taglist.txt /*taglist-license*
|
|
||||||
taglist-menu taglist.txt /*taglist-menu*
|
|
||||||
taglist-options taglist.txt /*taglist-options*
|
|
||||||
taglist-requirements taglist.txt /*taglist-requirements*
|
|
||||||
taglist-session taglist.txt /*taglist-session*
|
|
||||||
taglist-todo taglist.txt /*taglist-todo*
|
|
||||||
taglist-using taglist.txt /*taglist-using*
|
|
||||||
taglist.txt taglist.txt /*taglist.txt*
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
"PEP 8 Friendly
|
|
||||||
setlocal tabstop=4
|
|
||||||
setlocal softtabstop=4
|
|
||||||
setlocal shiftwidth=4
|
|
||||||
setlocal textwidth=80
|
|
||||||
setlocal smarttab
|
|
||||||
setlocal expandtab
|
|
||||||
setlocal smartindent
|
|
||||||
|
|
||||||
" Code completion
|
|
||||||
autocmd FileType python set omnifunc=pythoncomplete#Complete
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,357 +0,0 @@
|
|||||||
" Vim syntax file
|
|
||||||
" Language: Python
|
|
||||||
" Maintainer: Dmitry Vasiliev <dima@hlabs.spb.ru>
|
|
||||||
" URL: http://www.hlabs.spb.ru/vim/python3.0.vim
|
|
||||||
" Last Change: 2008-12-07
|
|
||||||
" Filenames: *.py
|
|
||||||
" Version: 3.0.0
|
|
||||||
"
|
|
||||||
" Based on python.vim (from Vim 6.1 distribution)
|
|
||||||
" by Neil Schemenauer <nas@python.ca>
|
|
||||||
"
|
|
||||||
" Thanks:
|
|
||||||
"
|
|
||||||
" Jeroen Ruigrok van der Werven
|
|
||||||
" for the idea to highlight erroneous operators
|
|
||||||
" Pedro Algarvio
|
|
||||||
" for the patch to enable spell checking only for the right spots
|
|
||||||
" (strings and comments)
|
|
||||||
" John Eikenberry
|
|
||||||
" for the patch fixing small typo
|
|
||||||
|
|
||||||
"
|
|
||||||
" Options:
|
|
||||||
"
|
|
||||||
" For set option do: let OPTION_NAME = 1
|
|
||||||
" For clear option do: let OPTION_NAME = 0
|
|
||||||
"
|
|
||||||
" Option names:
|
|
||||||
"
|
|
||||||
" For highlight builtin functions:
|
|
||||||
" python_highlight_builtins
|
|
||||||
"
|
|
||||||
" For highlight standard exceptions:
|
|
||||||
" python_highlight_exceptions
|
|
||||||
"
|
|
||||||
" For highlight string formatting:
|
|
||||||
" python_highlight_string_formatting
|
|
||||||
"
|
|
||||||
" For highlight str.format syntax:
|
|
||||||
" python_highlight_string_format
|
|
||||||
"
|
|
||||||
" For highlight string.Template syntax:
|
|
||||||
" python_highlight_string_templates
|
|
||||||
"
|
|
||||||
" For highlight indentation errors:
|
|
||||||
" python_highlight_indent_errors
|
|
||||||
"
|
|
||||||
" For highlight trailing spaces:
|
|
||||||
" python_highlight_space_errors
|
|
||||||
"
|
|
||||||
" For highlight doc-tests:
|
|
||||||
" python_highlight_doctests
|
|
||||||
"
|
|
||||||
" If you want all Python highlightings above:
|
|
||||||
" python_highlight_all
|
|
||||||
" (This option not override previously set options)
|
|
||||||
"
|
|
||||||
" For fast machines:
|
|
||||||
" python_slow_sync
|
|
||||||
|
|
||||||
" For version 5.x: Clear all syntax items
|
|
||||||
" For version 6.x: Quit when a syntax file was already loaded
|
|
||||||
if version < 600
|
|
||||||
syntax clear
|
|
||||||
elseif exists("b:current_syntax")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
if exists("python_highlight_all") && python_highlight_all != 0
|
|
||||||
" Not override previously set options
|
|
||||||
if !exists("python_highlight_builtins")
|
|
||||||
let python_highlight_builtins = 1
|
|
||||||
endif
|
|
||||||
if !exists("python_highlight_exceptions")
|
|
||||||
let python_highlight_exceptions = 1
|
|
||||||
endif
|
|
||||||
if !exists("python_highlight_string_formatting")
|
|
||||||
let python_highlight_string_formatting = 1
|
|
||||||
endif
|
|
||||||
if !exists("python_highlight_string_format")
|
|
||||||
let python_highlight_string_format = 1
|
|
||||||
endif
|
|
||||||
if !exists("python_highlight_string_templates")
|
|
||||||
let python_highlight_string_templates = 1
|
|
||||||
endif
|
|
||||||
if !exists("python_highlight_indent_errors")
|
|
||||||
let python_highlight_indent_errors = 1
|
|
||||||
endif
|
|
||||||
if !exists("python_highlight_space_errors")
|
|
||||||
let python_highlight_space_errors = 1
|
|
||||||
endif
|
|
||||||
if !exists("python_highlight_doctests")
|
|
||||||
let python_highlight_doctests = 1
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Keywords
|
|
||||||
syn keyword pythonStatement break continue del
|
|
||||||
syn keyword pythonStatement exec return as
|
|
||||||
syn keyword pythonStatement pass raise
|
|
||||||
syn keyword pythonStatement global assert
|
|
||||||
syn keyword pythonStatement lambda yield
|
|
||||||
syn keyword pythonStatement with nonlocal
|
|
||||||
syn keyword pythonStatement False None True
|
|
||||||
syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite
|
|
||||||
syn match pythonFunction "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
|
|
||||||
syn keyword pythonRepeat for while
|
|
||||||
syn keyword pythonConditional if elif else
|
|
||||||
syn keyword pythonImport import from
|
|
||||||
syn keyword pythonException try except finally
|
|
||||||
syn keyword pythonOperator and in is not or
|
|
||||||
|
|
||||||
" Decorators (new in Python 2.4)
|
|
||||||
syn match pythonDecorator "@" display nextgroup=pythonFunction skipwhite
|
|
||||||
|
|
||||||
" Comments
|
|
||||||
syn match pythonComment "#.*$" display contains=pythonTodo,@Spell
|
|
||||||
syn match pythonRun "\%^#!.*$"
|
|
||||||
syn match pythonCoding "\%^.*\%(\n.*\)\?#.*coding[:=]\s*[0-9A-Za-z-_.]\+.*$"
|
|
||||||
syn keyword pythonTodo TODO FIXME XXX contained
|
|
||||||
|
|
||||||
" Errors
|
|
||||||
" syn match pythonError "\<\d\+\D\+\>" display
|
|
||||||
syn match pythonError "[$?]" display
|
|
||||||
syn match pythonError "[&|]\{2,}" display
|
|
||||||
syn match pythonError "[=]\{3,}" display
|
|
||||||
|
|
||||||
syn match pythonError "^\s*def\s\+\w\+(.*)\s*$" display
|
|
||||||
syn match pythonError "^\s*class\s\+\w\+(.*)\s*$" display
|
|
||||||
syn match pythonError "^\s*for\s.*[^:]$" display
|
|
||||||
syn match pythonError "^\s*except\s*$" display
|
|
||||||
syn match pythonError "^\s*finally\s*$" display
|
|
||||||
syn match pythonError "^\s*try\s*$" display
|
|
||||||
syn match pythonError "^\s*else\s*$" display
|
|
||||||
syn match pythonError "^\s*else\s*[^:].*" display
|
|
||||||
syn match pythonError "^\s*if\s.*[^\:]$" display
|
|
||||||
syn match pythonError "^\s*except\s.*[^\:]$" display
|
|
||||||
syn match pythonError "[;]$" display
|
|
||||||
syn keyword pythonError do
|
|
||||||
|
|
||||||
" TODO: Mixing spaces and tabs also may be used for pretty formatting multiline
|
|
||||||
" statements. For now I don't know how to work around this.
|
|
||||||
if exists("python_highlight_indent_errors") && python_highlight_indent_errors != 0
|
|
||||||
syn match pythonIndentError "^\s*\%( \t\|\t \)\s*\S"me=e-1 display
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Trailing space errors
|
|
||||||
if exists("python_highlight_space_errors") && python_highlight_space_errors != 0
|
|
||||||
syn match pythonSpaceError "\s\+$" display
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Strings
|
|
||||||
syn region pythonString start=+'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonEscape,pythonEscapeError,@Spell
|
|
||||||
syn region pythonString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonEscape,pythonEscapeError,@Spell
|
|
||||||
syn region pythonString start=+"""+ end=+"""+ keepend contains=pythonEscape,pythonEscapeError,pythonDocTest2,pythonSpaceError,@Spell
|
|
||||||
syn region pythonString start=+'''+ end=+'''+ keepend contains=pythonEscape,pythonEscapeError,pythonDocTest,pythonSpaceError,@Spell
|
|
||||||
|
|
||||||
syn match pythonEscape +\\[abfnrtv'"\\]+ display contained
|
|
||||||
syn match pythonEscape "\\\o\o\=\o\=" display contained
|
|
||||||
syn match pythonEscapeError "\\\o\{,2}[89]" display contained
|
|
||||||
syn match pythonEscape "\\x\x\{2}" display contained
|
|
||||||
syn match pythonEscapeError "\\x\x\=\X" display contained
|
|
||||||
syn match pythonEscape "\\$"
|
|
||||||
syn match pythonEscape "\\u\x\{4}" display contained
|
|
||||||
syn match pythonEscapeError "\\u\x\{,3}\X" display contained
|
|
||||||
syn match pythonEscape "\\U\x\{8}" display contained
|
|
||||||
syn match pythonEscapeError "\\U\x\{,7}\X" display contained
|
|
||||||
syn match pythonEscape "\\N{[A-Z ]\+}" display contained
|
|
||||||
syn match pythonEscapeError "\\N{[^A-Z ]\+}" display contained
|
|
||||||
|
|
||||||
" Raw strings
|
|
||||||
syn region pythonRawString start=+[rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
|
|
||||||
syn region pythonRawString start=+[rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
|
|
||||||
syn region pythonRawString start=+[rR]"""+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
|
|
||||||
syn region pythonRawString start=+[rR]'''+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
|
|
||||||
|
|
||||||
syn match pythonRawEscape +\\['"]+ display transparent contained
|
|
||||||
|
|
||||||
" Bytes
|
|
||||||
syn region pythonBytes start=+[bB]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesContent,pythonBytesError,pythonBytesEscape,pythonBytesEscapeError,@Spell
|
|
||||||
syn region pythonBytes start=+[bB]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesContent,pythonBytesError,pythonBytesEscape,pythonBytesEscapeError,@Spell
|
|
||||||
syn region pythonBytes start=+[bB]"""+ end=+"""+ keepend contains=pythonBytesContent,pythonBytesError,pythonBytesEscape,pythonBytesEscapeError,pythonDocTest2,pythonSpaceError,@Spell
|
|
||||||
syn region pythonBytes start=+[bB]'''+ end=+'''+ keepend contains=pythonBytesContent,pythonBytesError,pythonBytesEscape,pythonBytesEscapeError,pythonDocTest,pythonSpaceError,@Spell
|
|
||||||
|
|
||||||
syn match pythonBytesContent "[\u0001-\u007f]\+" display contained
|
|
||||||
syn match pythonBytesError "[^\u0001-\u007f]\+" display contained
|
|
||||||
|
|
||||||
syn match pythonBytesEscape +\\[abfnrtv'"\\]+ display contained
|
|
||||||
syn match pythonBytesEscape "\\\o\o\=\o\=" display contained
|
|
||||||
syn match pythonBytesEscapeError "\\\o\{,2}[89]" display contained
|
|
||||||
syn match pythonBytesEscape "\\x\x\{2}" display contained
|
|
||||||
syn match pythonBytesEscapeError "\\x\x\=\X" display contained
|
|
||||||
syn match pythonBytesEscape "\\$"
|
|
||||||
|
|
||||||
if exists("python_highlight_string_formatting") && python_highlight_string_formatting != 0
|
|
||||||
" String formatting
|
|
||||||
syn match pythonStrFormatting "%\%(([^)]\+)\)\=[-#0 +]*\d*\%(\.\d\+\)\=[hlL]\=[diouxXeEfFgGcrs%]" contained containedin=pythonString,pythonRawString
|
|
||||||
syn match pythonStrFormatting "%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)\=[hlL]\=[diouxXeEfFgGcrs%]" contained containedin=pythonString,pythonRawString
|
|
||||||
endif
|
|
||||||
|
|
||||||
if exists("python_highlight_string_format") && python_highlight_string_format != 0
|
|
||||||
" str.format syntax
|
|
||||||
syn match pythonStrFormat "{{\|}}" contained containedin=pythonString,pythonRawString
|
|
||||||
syn match pythonStrFormat "{\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)\%(\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_*\)\|\[\%(\d\+\|[^!:\}]\+\)\]\)*\%(![rsa]\)\=\%(:\%({\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)}\|\%([^}]\=[<>=^]\)\=[ +-]\=#\=0\=\d*\%(\.\d\+\)\=[bcdeEfFgGnoxX%]\=\)\=\)\=}" contained containedin=pythonString,pythonRawString
|
|
||||||
endif
|
|
||||||
|
|
||||||
if exists("python_highlight_string_templates") && python_highlight_string_templates != 0
|
|
||||||
" String templates
|
|
||||||
syn match pythonStrTemplate "\$\$" contained containedin=pythonString,pythonRawString
|
|
||||||
syn match pythonStrTemplate "\${[a-zA-Z_][a-zA-Z0-9_]*}" contained containedin=pythonString,pythonRawString
|
|
||||||
syn match pythonStrTemplate "\$[a-zA-Z_][a-zA-Z0-9_]*" contained containedin=pythonString,pythonRawString
|
|
||||||
endif
|
|
||||||
|
|
||||||
if exists("python_highlight_doctests") && python_highlight_doctests != 0
|
|
||||||
" DocTests
|
|
||||||
syn region pythonDocTest start="^\s*>>>" end=+'''+he=s-1 end="^\s*$" contained
|
|
||||||
syn region pythonDocTest2 start="^\s*>>>" end=+"""+he=s-1 end="^\s*$" contained
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Numbers (ints, longs, floats, complex)
|
|
||||||
syn match pythonHexError "\<0[xX]\x*[g-zG-Z]\x*\>" display
|
|
||||||
|
|
||||||
syn match pythonHexNumber "\<0[xX]\x\+\>" display
|
|
||||||
syn match pythonOctNumber "\<0[oO]\o\+\>" display
|
|
||||||
syn match pythonBinNumber "\<0[bB][01]\+\>" display
|
|
||||||
|
|
||||||
syn match pythonNumber "\<\d\>" display
|
|
||||||
syn match pythonNumber "\<[1-9]\d\+\>" display
|
|
||||||
syn match pythonNumber "\<\d\+[jJ]\>" display
|
|
||||||
syn match pythonNumberError "\<0\d\+\>" display
|
|
||||||
|
|
||||||
syn match pythonFloat "\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>" display
|
|
||||||
syn match pythonFloat "\<\d\+[eE][+-]\=\d\+[jJ]\=\>" display
|
|
||||||
syn match pythonFloat "\<\d\+\.\d*\%([eE][+-]\=\d\+\)\=[jJ]\=" display
|
|
||||||
|
|
||||||
syn match pythonOctError "\<0[oO]\=\o*[8-9]\d*\>" display
|
|
||||||
syn match pythonBinError "\<0[bB][01]*[2-9]\d*\>" display
|
|
||||||
|
|
||||||
if exists("python_highlight_builtins") && python_highlight_builtins != 0
|
|
||||||
" Builtin functions, types and objects
|
|
||||||
syn keyword pythonBuiltinObj Ellipsis NotImplemented
|
|
||||||
syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__
|
|
||||||
|
|
||||||
syn keyword pythonBuiltinFunc __import__ abs all any ascii
|
|
||||||
syn keyword pythonBuiltinFunc bin bool bytearray bytes
|
|
||||||
syn keyword pythonBuiltinFunc chr classmethod cmp compile complex
|
|
||||||
syn keyword pythonBuiltinFunc delattr dict dir divmod enumerate eval
|
|
||||||
syn keyword pythonBuiltinFunc exec filter float format frozenset getattr
|
|
||||||
syn keyword pythonBuiltinFunc globals hasattr hash hex id
|
|
||||||
syn keyword pythonBuiltinFunc input int isinstance
|
|
||||||
syn keyword pythonBuiltinFunc issubclass iter len list locals map max
|
|
||||||
syn keyword pythonBuiltinFunc memoryview min next object oct open ord
|
|
||||||
syn keyword pythonBuiltinFunc pow print property range
|
|
||||||
syn keyword pythonBuiltinFunc repr reversed round set setattr
|
|
||||||
syn keyword pythonBuiltinFunc slice sorted staticmethod str sum super tuple
|
|
||||||
syn keyword pythonBuiltinFunc type vars zip
|
|
||||||
endif
|
|
||||||
|
|
||||||
if exists("python_highlight_exceptions") && python_highlight_exceptions != 0
|
|
||||||
" Builtin exceptions and warnings
|
|
||||||
syn keyword pythonExClass BaseException
|
|
||||||
syn keyword pythonExClass Exception ArithmeticError
|
|
||||||
syn keyword pythonExClass LookupError EnvironmentError
|
|
||||||
|
|
||||||
syn keyword pythonExClass AssertionError AttributeError BufferError EOFError
|
|
||||||
syn keyword pythonExClass FloatingPointError GeneratorExit IOError
|
|
||||||
syn keyword pythonExClass ImportError IndexError KeyError
|
|
||||||
syn keyword pythonExClass KeyboardInterrupt MemoryError NameError
|
|
||||||
syn keyword pythonExClass NotImplementedError OSError OverflowError
|
|
||||||
syn keyword pythonExClass ReferenceError RuntimeError StopIteration
|
|
||||||
syn keyword pythonExClass SyntaxError IndentationError TabError
|
|
||||||
syn keyword pythonExClass SystemError SystemExit TypeError
|
|
||||||
syn keyword pythonExClass UnboundLocalError UnicodeError
|
|
||||||
syn keyword pythonExClass UnicodeEncodeError UnicodeDecodeError
|
|
||||||
syn keyword pythonExClass UnicodeTranslateError ValueError VMSError
|
|
||||||
syn keyword pythonExClass WindowsError ZeroDivisionError
|
|
||||||
|
|
||||||
syn keyword pythonExClass Warning UserWarning BytesWarning DeprecationWarning
|
|
||||||
syn keyword pythonExClass PendingDepricationWarning SyntaxWarning
|
|
||||||
syn keyword pythonExClass RuntimeWarning FutureWarning
|
|
||||||
syn keyword pythonExClass ImportWarning UnicodeWarning
|
|
||||||
endif
|
|
||||||
|
|
||||||
if exists("python_slow_sync") && python_slow_sync != 0
|
|
||||||
syn sync minlines=2000
|
|
||||||
else
|
|
||||||
" This is fast but code inside triple quoted strings screws it up. It
|
|
||||||
" is impossible to fix because the only way to know if you are inside a
|
|
||||||
" triple quoted string is to start from the beginning of the file.
|
|
||||||
syn sync match pythonSync grouphere NONE "):$"
|
|
||||||
syn sync maxlines=200
|
|
||||||
endif
|
|
||||||
|
|
||||||
if version >= 508 || !exists("did_python_syn_inits")
|
|
||||||
if version <= 508
|
|
||||||
let did_python_syn_inits = 1
|
|
||||||
command -nargs=+ HiLink hi link <args>
|
|
||||||
else
|
|
||||||
command -nargs=+ HiLink hi def link <args>
|
|
||||||
endif
|
|
||||||
|
|
||||||
HiLink pythonStatement Statement
|
|
||||||
HiLink pythonImport Statement
|
|
||||||
HiLink pythonFunction Function
|
|
||||||
HiLink pythonConditional Conditional
|
|
||||||
HiLink pythonRepeat Repeat
|
|
||||||
HiLink pythonException Exception
|
|
||||||
HiLink pythonOperator Operator
|
|
||||||
|
|
||||||
HiLink pythonDecorator Define
|
|
||||||
|
|
||||||
HiLink pythonComment Comment
|
|
||||||
HiLink pythonCoding Special
|
|
||||||
HiLink pythonRun Special
|
|
||||||
HiLink pythonTodo Todo
|
|
||||||
|
|
||||||
HiLink pythonError Error
|
|
||||||
HiLink pythonIndentError Error
|
|
||||||
HiLink pythonSpaceError Error
|
|
||||||
|
|
||||||
HiLink pythonString String
|
|
||||||
HiLink pythonRawString String
|
|
||||||
HiLink pythonEscape Special
|
|
||||||
HiLink pythonEscapeError Error
|
|
||||||
|
|
||||||
HiLink pythonBytes String
|
|
||||||
HiLink pythonBytesContent String
|
|
||||||
HiLink pythonBytesError Error
|
|
||||||
HiLink pythonBytesEscape Special
|
|
||||||
HiLink pythonBytesEscapeError Error
|
|
||||||
|
|
||||||
HiLink pythonStrFormatting Special
|
|
||||||
HiLink pythonStrFormat Special
|
|
||||||
HiLink pythonStrTemplate Special
|
|
||||||
|
|
||||||
HiLink pythonDocTest Special
|
|
||||||
HiLink pythonDocTest2 Special
|
|
||||||
|
|
||||||
HiLink pythonNumber Number
|
|
||||||
HiLink pythonHexNumber Number
|
|
||||||
HiLink pythonOctNumber Number
|
|
||||||
HiLink pythonBinNumber Number
|
|
||||||
HiLink pythonFloat Float
|
|
||||||
HiLink pythonNumberError Error
|
|
||||||
HiLink pythonOctError Error
|
|
||||||
HiLink pythonHexError Error
|
|
||||||
HiLink pythonBinError Error
|
|
||||||
|
|
||||||
HiLink pythonBuiltinObj Structure
|
|
||||||
HiLink pythonBuiltinFunc Function
|
|
||||||
|
|
||||||
HiLink pythonExClass Structure
|
|
||||||
|
|
||||||
delcommand HiLink
|
|
||||||
endif
|
|
||||||
|
|
||||||
let b:current_syntax = "python"
|
|
||||||
501
vimrc
501
vimrc
@@ -1,232 +1,277 @@
|
|||||||
" .vimrc
|
" FULL VIM
|
||||||
|
|
||||||
" Use Vim not vi settings
|
|
||||||
set nocompatible
|
set nocompatible
|
||||||
|
|
||||||
" gui appearence
|
" PATHOGEN
|
||||||
if has("gui_running")
|
filetype off
|
||||||
colorscheme slate
|
silent! call pathogen#runtime_append_all_bundles()
|
||||||
set guifont=Terminus\ 8
|
silent! call pathogen#helptags()
|
||||||
endif
|
|
||||||
|
|
||||||
" term appearence
|
|
||||||
set background=dark
|
|
||||||
|
|
||||||
" always show ruler
|
|
||||||
set ruler
|
|
||||||
|
|
||||||
"of course
|
|
||||||
syntax on
|
|
||||||
|
|
||||||
" I work with buffers, when I open a buffer that is recently open in a window,
|
|
||||||
" don't open this buffer twice: switch to the already open one! Nice for :make, :cn, ... ;-)
|
|
||||||
set switchbuf=useopen
|
|
||||||
" title
|
|
||||||
set titlestring=%<%F\ %M%=%l/%L\ -\ %p%% titlelen=70
|
|
||||||
|
|
||||||
" display linenumber
|
|
||||||
set number
|
|
||||||
|
|
||||||
" search related settings
|
|
||||||
|
|
||||||
" show parial pattern matches in real time
|
|
||||||
set incsearch
|
|
||||||
" I like highlighted search pattern
|
|
||||||
set hlsearch
|
|
||||||
" search for upper and lowercase
|
|
||||||
set ignorecase
|
|
||||||
" but if user type uppercase - search exaclty
|
|
||||||
set smartcase
|
|
||||||
|
|
||||||
|
|
||||||
" no backup, we got scm :)
|
|
||||||
set nobackup
|
|
||||||
|
|
||||||
"use a scrollable menu for filename completions
|
|
||||||
set wildmenu
|
|
||||||
|
|
||||||
"ignore class and object files
|
|
||||||
set wildignore=*.class,*.o,*.bak,*.swp,*.pyc
|
|
||||||
|
|
||||||
|
|
||||||
" spelling stuff
|
|
||||||
if version >= 700
|
|
||||||
" spelling files:
|
|
||||||
" http://ftp.vim.org/pub/vim/runtime/spell/
|
|
||||||
" move de.latin1.spl and de.latin1.sug to RUNTIME/spell
|
|
||||||
set spelllang=de
|
|
||||||
set sps=best,10
|
|
||||||
set omnifunc=ccomplete#Complete
|
|
||||||
map <S-h> gT
|
|
||||||
map <S-l> gt
|
|
||||||
else
|
|
||||||
" spell check for the folloging files
|
|
||||||
let spell_auto_type = "tex,mail,text,human"
|
|
||||||
let spell_markup_ft = ",tex,mail,text,human"
|
|
||||||
let spell_guess_language_ft = ""
|
|
||||||
endif
|
|
||||||
|
|
||||||
"maximum mumber of undos
|
|
||||||
set undolevels=1000
|
|
||||||
|
|
||||||
" indent stuff, tab stuff for all files
|
|
||||||
set autoindent
|
|
||||||
set smartindent
|
|
||||||
set tabstop=4
|
|
||||||
set softtabstop=4
|
|
||||||
set shiftwidth=4
|
|
||||||
|
|
||||||
" no swp file cluttering in workdir
|
|
||||||
set directory=~/.vimswp
|
|
||||||
|
|
||||||
"I need more information
|
|
||||||
set statusline=%<%F%=\ [%1*%M%*%n%R%H%Y]\ \ %-25(%3l,%c%03V\ \ %P\ (%L)%)%12o'%03b''%03B'
|
|
||||||
"always show statusline
|
|
||||||
set laststatus=2
|
|
||||||
|
|
||||||
"modus (insert,visual ...)
|
|
||||||
highlight modeMsg cterm=bold ctermfg=white ctermbg=blue
|
|
||||||
"active statusLine
|
|
||||||
highlight statusLine cterm=bold ctermfg=yellow ctermbg=red
|
|
||||||
"inactive statusLine
|
|
||||||
highlight statusLineNC cterm=bold ctermfg=black ctermbg=white
|
|
||||||
"visual mode
|
|
||||||
highlight visual cterm=bold ctermfg=yellow ctermbg=red
|
|
||||||
"cursor colors
|
|
||||||
highlight cursor cterm=bold
|
|
||||||
"vertical line on split screen
|
|
||||||
highlight VertSplit cterm=bold ctermfg=yellow ctermbg=yellow
|
|
||||||
|
|
||||||
" highlight spell errors
|
|
||||||
highlight SpellErrors ctermfg=Red cterm=underline term=reverse
|
|
||||||
|
|
||||||
|
|
||||||
" set whitespace characters to something more readable
|
|
||||||
set listchars=tab:▸\ ,eol:¬
|
|
||||||
|
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
||||||
" TEXT FORMATING
|
|
||||||
|
|
||||||
|
|
||||||
if has("autocmd")
|
|
||||||
|
|
||||||
filetype on
|
|
||||||
augroup filetype
|
|
||||||
filetype plugin indent on
|
|
||||||
autocmd BufNewFile,BufRead *.txt set filetype=human
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
"vim jumps always to the last edited line, if possible
|
|
||||||
"autocmd BufRead *,.* :normal '"
|
|
||||||
autocmd BufReadPost *
|
|
||||||
\ if line("'\"") > 0 && line("'\"") <= line("$") |
|
|
||||||
\ exe "normal g`\"" |
|
|
||||||
\ endif
|
|
||||||
|
|
||||||
"in human-language files, automatically format everything at 78 chars:
|
|
||||||
autocmd FileType mail,human
|
|
||||||
\ set spelllang=de formatoptions+=t textwidth=78 nocindent dictionary=/usr/share/dict/words
|
|
||||||
|
|
||||||
|
|
||||||
"LaTeX to the fullest! ...dislike overlong lines:
|
|
||||||
autocmd FileType tex set formatoptions+=t textwidth=80 nocindent
|
|
||||||
autocmd FileType tex set makeprg=pdflatex\ %
|
|
||||||
|
|
||||||
"for C-like programming, have automatic indentation:
|
|
||||||
autocmd FileType slang set cindent tabstop=4 shiftwidth=4 tw=78
|
|
||||||
|
|
||||||
|
|
||||||
"for actual C programming where comments have explicit end
|
|
||||||
"characters, if starting a new line in the middle of a comment automatically
|
|
||||||
"insert the comment leader characters:
|
|
||||||
"for a more _weighty_ comments use: comments=sl:/*,mb:**,elx:*/
|
|
||||||
autocmd FileType c,cpp set formatoptions+=ro dictionary=$HOME/.vim/c_dictionary
|
|
||||||
\ tw=78 tabstop=4 shiftwidth=4 noexpandtab cindent
|
|
||||||
|
|
||||||
|
|
||||||
" indent xml code
|
|
||||||
augroup xml
|
|
||||||
map ,mf !xmllint --format --recover - 2>/dev/null<CR>
|
|
||||||
" au!
|
|
||||||
" autocmd BufWrite *xml exe ":silent 1,$!xmllint --format --recover - 2>/dev/null"
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
"for both CSS and HTML, use genuine tab characters for indentation, to make
|
|
||||||
"files a few bytes smaller:
|
|
||||||
autocmd FileType html,css set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4
|
|
||||||
|
|
||||||
"in makefiles, don't expand tabs to spaces, since actual tab characters are
|
|
||||||
"needed, and have indentation at 8 chars to be sure that all indents are tabs
|
|
||||||
"(despite the mappings later):
|
|
||||||
autocmd FileType make set noexpandtab shiftwidth=8
|
|
||||||
autocmd FileType automake set noexpandtab shiftwidth=8
|
|
||||||
|
|
||||||
endif " has("autocmd")
|
|
||||||
|
|
||||||
|
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
||||||
" OMNICOMPLETION
|
|
||||||
|
|
||||||
autocmd FileType python set omnifunc=pythoncomplete#Complete
|
|
||||||
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
|
|
||||||
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
|
|
||||||
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
|
|
||||||
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
|
|
||||||
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
|
|
||||||
autocmd FileType c set omnifunc=ccomplete#Complete
|
|
||||||
autocmd FileType rb,ruby,eruby set omnifunc=rubycomplete#Complete
|
|
||||||
autocmd FileType sql set omnifunc=sqlcomplete#Complete
|
|
||||||
autocmd Filetype * set omnifunc=syntaxcomplete#Complete
|
|
||||||
|
|
||||||
|
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
||||||
" MAPPINGS
|
|
||||||
|
|
||||||
"" Function Keys Sector
|
|
||||||
|
|
||||||
"write a changelog entry upon pressing F1
|
|
||||||
"nnoremap <silent> <F1> :r !date<CR>Thomas Ruoff <ThomasRuoff@gmail.com><CR><CR>
|
|
||||||
"F2 -> F4 == misc
|
|
||||||
"search the current word under cursor in all files in working directory
|
|
||||||
nnoremap <silent> <F2> vawy:! grep -n -H <C-R>" .* *<CR>
|
|
||||||
|
|
||||||
nnoremap <silent> <F3> :NERDTreeToggle<CR>
|
|
||||||
|
|
||||||
"compile, translate, ...
|
|
||||||
map <F5> :make<CR>
|
|
||||||
|
|
||||||
" F9 F11 Shift-F11 and F12 are used in python mode
|
|
||||||
|
|
||||||
set pastetoggle=<F10>
|
|
||||||
|
|
||||||
"F11 -> F12 == resize window
|
|
||||||
"map <F11> <ESC>:resize -5 <CR>
|
|
||||||
"map <F12> <ESC>:resize +5 <CR>
|
|
||||||
|
|
||||||
python << EOF
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import vim
|
|
||||||
for p in sys.path:
|
|
||||||
if os.path.isdir(p):
|
|
||||||
vim.command(r"set path+=%s" % (p.replace(" ", r"\ ")))
|
|
||||||
EOF
|
|
||||||
"use ctags
|
|
||||||
set tags+=$HOME/.vim/tags/python.ctags
|
|
||||||
"remap tag jumping
|
|
||||||
map <silent><C-Left> <C-T>
|
|
||||||
map <silent><C-Right> <C-]>
|
|
||||||
"remap code complete to ctrl space
|
|
||||||
inoremap <Nul> <C-x><C-o>
|
|
||||||
"tab nav with alt left or right
|
|
||||||
map <silent><A-Right> :tabnext<CR>
|
|
||||||
map <silent><A-Left> :tabprevious<CR>
|
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
python << EOL
|
|
||||||
import vim
|
|
||||||
def EvaluateCurrentRange():
|
|
||||||
eval(compile('\n'.join(vim.current.range),'','exec'),globals())
|
|
||||||
EOL
|
|
||||||
map <C-h> :py EvaluateCurrentRange()
|
|
||||||
|
|
||||||
" vim:set ts=2 tw=80:
|
" MAP LEADER
|
||||||
|
noremap , \
|
||||||
|
let mapleader = ","
|
||||||
|
|
||||||
|
" CONFIGURATION MAPPING
|
||||||
|
set scrolloff=3 " show 3 lines of context around the cursor
|
||||||
|
set autoread " set to auto read when a file is changed from the outside
|
||||||
|
set mouse=a " allow for full mouse support
|
||||||
|
set autowrite
|
||||||
|
set showcmd " show typed commands
|
||||||
|
|
||||||
|
set wildmenu " turn on WiLd menu
|
||||||
|
set wildmode=list:longest,list:full " activate TAB auto-completion for file paths
|
||||||
|
set wildignore+=*.o,.git,.svn,node_modules
|
||||||
|
|
||||||
|
set ruler " always show current position
|
||||||
|
set backspace=indent,eol,start " set backspace config, backspace as normal
|
||||||
|
set nomodeline " security
|
||||||
|
set encoding=utf8
|
||||||
|
|
||||||
|
set hlsearch " highlight search things
|
||||||
|
set incsearch " go to search results as typing
|
||||||
|
set smartcase " but case-sensitive if expression contains a capital letter.
|
||||||
|
set ignorecase " ignore case when searching
|
||||||
|
set gdefault " assume global when searching or substituting
|
||||||
|
set magic " set magic on, for regular expressions
|
||||||
|
set showmatch " show matching brackets when text indicator is over them
|
||||||
|
|
||||||
|
set lazyredraw " don't redraw screen during macros
|
||||||
|
set ttyfast " improves redrawing for newer computers
|
||||||
|
set fileformats=unix,mac,dos
|
||||||
|
|
||||||
|
set nobackup " prevent backups of files, since using versioning mostly and undofile
|
||||||
|
set nowritebackup
|
||||||
|
set noswapfile
|
||||||
|
set directory=~/.vim/.swp,/tmp " swap directory
|
||||||
|
set shiftwidth=4 " set tab width
|
||||||
|
set softtabstop=4
|
||||||
|
set tabstop=4
|
||||||
|
set smarttab
|
||||||
|
set expandtab
|
||||||
|
set autoindent " set automatic code indentation
|
||||||
|
set hidden
|
||||||
|
|
||||||
|
set wrap " wrap lines
|
||||||
|
set linebreak " this will not break whole words while wrap is enabled
|
||||||
|
set showbreak=…
|
||||||
|
set cursorline " highlight current line
|
||||||
|
set list listchars=tab:\ \ ,trail:· " show · for trailing space, \ \ for trailing tab
|
||||||
|
set spelllang=en,de " set spell check language
|
||||||
|
set noeb vb t_vb= " disable audio and visual bells
|
||||||
|
au GUIEnter * set vb t_vb=
|
||||||
|
|
||||||
|
syntax enable " enable syntax highlighting
|
||||||
|
|
||||||
|
" VIM 7.3 FEATURES
|
||||||
|
|
||||||
|
if v:version >= 703
|
||||||
|
set undofile
|
||||||
|
set undodir=$HOME/.vim/.undo
|
||||||
|
set undolevels=1000
|
||||||
|
set undoreload=10000
|
||||||
|
set colorcolumn=115 " show a right margin column
|
||||||
|
endif
|
||||||
|
|
||||||
|
" COLOR SCHEME
|
||||||
|
set t_Co=256
|
||||||
|
set background=dark
|
||||||
|
"colorscheme solarized
|
||||||
|
"if has("gui_running")
|
||||||
|
" colorscheme railscast
|
||||||
|
"endif
|
||||||
|
|
||||||
|
" FOLDING
|
||||||
|
set foldenable " enable folding
|
||||||
|
set foldmethod=marker " detect triple-{ style fold markers
|
||||||
|
set foldlevel=99
|
||||||
|
|
||||||
|
" ADDITIONAL KEY MAPPINGS
|
||||||
|
" fast saving
|
||||||
|
nmap <leader>w :up<cr>
|
||||||
|
" fast escaping
|
||||||
|
imap jj <ESC>
|
||||||
|
" prevent accidental striking of F1 key
|
||||||
|
map <F1> <ESC>
|
||||||
|
imap <F1> <ESC>
|
||||||
|
" clear highlight
|
||||||
|
nnoremap <leader><space> :noh<cr>
|
||||||
|
" map Y to match C and D behavior
|
||||||
|
nnoremap Y y$
|
||||||
|
" yank entire file (global yank)
|
||||||
|
nmap gy ggVGy
|
||||||
|
" ignore lines when going up or down
|
||||||
|
nnoremap j gj
|
||||||
|
nnoremap k gk
|
||||||
|
" auto complete {} indent and position the cursor in the middle line
|
||||||
|
inoremap {<CR> {<CR>}<Esc>O
|
||||||
|
inoremap (<CR> (<CR>)<Esc>O
|
||||||
|
inoremap [<CR> [<CR>]<Esc>O
|
||||||
|
" fast window switching
|
||||||
|
map <leader>, <C-W>w
|
||||||
|
" cycle between buffers
|
||||||
|
map <leader>. :b#<cr>
|
||||||
|
" change directory to current buffer
|
||||||
|
map <leader>cd :cd %:p:h<cr>
|
||||||
|
" swap implementations of ` and ' jump to prefer row and column jumping
|
||||||
|
nnoremap ' `
|
||||||
|
nnoremap ` '
|
||||||
|
" indent visual selected code without unselecting and going back to normal mode
|
||||||
|
vmap > >gv
|
||||||
|
vmap < <gv
|
||||||
|
" pull word under cursor into lhs of a substitute (for quick search and replace)
|
||||||
|
nmap <leader>r :%s#\<<C-r>=expand("<cword>")<CR>\>#
|
||||||
|
" strip all trailing whitespace in the current file
|
||||||
|
nnoremap <leader>W :%s/\s\+$//e<cr>:let @/=''<CR>
|
||||||
|
" insert path of current file into a command
|
||||||
|
cmap <C-P> <C-R>=expand("%:p:h") . "/" <CR>
|
||||||
|
" fast editing of the .vimrc
|
||||||
|
nmap <silent> <leader>ev :e $MYVIMRC<cr>
|
||||||
|
nmap <silent> <leader>sv :so $MYVIMRC<cr>
|
||||||
|
" allow saving when you forgot sudo
|
||||||
|
cmap w!! w !sudo tee % >/dev/null
|
||||||
|
" turn on spell checking
|
||||||
|
map <leader>spl :setlocal spell!<cr>
|
||||||
|
" spell checking shortcuts
|
||||||
|
map <leader>sn ]s
|
||||||
|
map <leader>sp [s
|
||||||
|
map <leader>sa zg
|
||||||
|
map <leader>s? z=
|
||||||
|
|
||||||
|
"" ADDITIONAL AUTOCOMMANDS
|
||||||
|
|
||||||
|
" saving when focus lost (after tabbing away or switching buffers)
|
||||||
|
au FocusLost,BufLeave,WinLeave,TabLeave * silent! up
|
||||||
|
" open in last edit place
|
||||||
|
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
|
||||||
|
au QuickFixCmdPost *grep* cwindow
|
||||||
|
|
||||||
|
|
||||||
|
"" ADDITIONAL GUI SETTINGS
|
||||||
|
|
||||||
|
if has("gui_running")
|
||||||
|
set guioptions-=T
|
||||||
|
" set guioptions-=m
|
||||||
|
set linespace=6
|
||||||
|
set columns=160 lines=26
|
||||||
|
set guioptions-=T
|
||||||
|
|
||||||
|
" crazy hack to get gvim to remove all scrollbars
|
||||||
|
set guioptions+=LlRrb
|
||||||
|
set guioptions-=LlRrb
|
||||||
|
|
||||||
|
if has("mac")
|
||||||
|
set guifont=DejaVu\ Sans\ Mono\:h14
|
||||||
|
else
|
||||||
|
set guifont=Ubuntu\ Mono\ 11
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
"" ABBREVIATIONS
|
||||||
|
source $HOME/.vim/autocorrect.vim
|
||||||
|
|
||||||
|
"" PLUGIN SETTINGS
|
||||||
|
|
||||||
|
" NERDTree
|
||||||
|
nmap <leader>n :NERDTreeToggle<CR>
|
||||||
|
let g:NERDChristmasTree=1
|
||||||
|
let g:NERDTreeDirArrows=1
|
||||||
|
let g:NERDTreeQuitOnOpen=1
|
||||||
|
let g:NERDTreeShowHidden=1
|
||||||
|
|
||||||
|
" Super Tab
|
||||||
|
" let g:SuperTabDefaultCompletionType = "context"
|
||||||
|
|
||||||
|
" Unimpaired
|
||||||
|
" bubble single lines
|
||||||
|
nmap <C-Up> [e
|
||||||
|
nmap <C-Down> ]e
|
||||||
|
" bubble multiple lines
|
||||||
|
vmap <C-Up> [egv
|
||||||
|
vmap <C-Down> ]egv
|
||||||
|
|
||||||
|
" Command-T
|
||||||
|
let g:CommandTMaxHeight=20
|
||||||
|
|
||||||
|
" Ack
|
||||||
|
set grepprg=ack
|
||||||
|
nnoremap <leader>a :Ack<space>
|
||||||
|
let g:ackhighlight=1
|
||||||
|
let g:ackprg="ack-grep -H --type-set jade=.jade --type-set stylus=.styl --type-set coffee=.coffee --nocolor --nogroup --column --ignore-dir=node_modules -G '^((?!min\.).)*$'"
|
||||||
|
|
||||||
|
" CoffeeScript
|
||||||
|
au FileType coffee set expandtab tabstop=3 shiftwidth=3
|
||||||
|
map <leader>cc :CoffeeCompile<cr>
|
||||||
|
map <silent> <leader>cm :CoffeeMake<cr> <cr>
|
||||||
|
au BufNewFile,BufReadPost *.coffee setl foldmethod=indent nofoldenable
|
||||||
|
|
||||||
|
"" LANGUAGE SPECIFIC
|
||||||
|
|
||||||
|
" CSS
|
||||||
|
au FileType css set expandtab tabstop=2 shiftwidth=2
|
||||||
|
|
||||||
|
" HTML
|
||||||
|
au FileType html,xhtml set formatoptions+=tl
|
||||||
|
au FileType html,xhtml set foldmethod=indent smartindent
|
||||||
|
au FileType html,xhtml set expandtab tabstop=3 shiftwidth=3
|
||||||
|
au FileType html,php,xhtml,jsp,ejs let b:delimitMate_matchpairs = "(:),[:],{:}"
|
||||||
|
|
||||||
|
" Ruby
|
||||||
|
au FileType ruby setlocal ts=2 sts=2 sw=2 expandtab foldmethod=syntax
|
||||||
|
|
||||||
|
" Python
|
||||||
|
au FileType python set noexpandtab
|
||||||
|
|
||||||
|
" JavaScript
|
||||||
|
au FileType javascript setlocal ts=2 sts=2 sw=2
|
||||||
|
au BufRead,BufNewFile *.json set ft=json
|
||||||
|
|
||||||
|
"" STATUS LINE
|
||||||
|
|
||||||
|
set laststatus=2 " always hide the statusline
|
||||||
|
set statusline= " clear the statusline for when vimrc is reloaded
|
||||||
|
set statusline+=%-2.2n\ " buffer number
|
||||||
|
set statusline+=%f\ " tail of the filename
|
||||||
|
|
||||||
|
"display a warning if fileformat isnt unix
|
||||||
|
set statusline+=%#warningmsg#
|
||||||
|
set statusline+=%{&ff!='unix'?'['.&ff.']':''}
|
||||||
|
set statusline+=%*
|
||||||
|
|
||||||
|
"display a warning if file encoding isnt utf-8
|
||||||
|
set statusline+=%#warningmsg#
|
||||||
|
set statusline+=%{(&fenc!='utf-8'&&&fenc!='')?'['.&fenc.']':''}
|
||||||
|
set statusline+=%*
|
||||||
|
|
||||||
|
set statusline+=%h "help file flag
|
||||||
|
set statusline+=%y\ "filetype
|
||||||
|
set statusline+=%r "read only flag
|
||||||
|
set statusline+=%m "modified flag
|
||||||
|
|
||||||
|
" display the filesize
|
||||||
|
set statusline+=[%{FileSize()}]
|
||||||
|
set statusline+=\
|
||||||
|
" display current git branch
|
||||||
|
set statusline+=%{fugitive#statusline()}
|
||||||
|
set statusline+=\
|
||||||
|
" display a warning with Syntastic, of validation errors and syntax checkers
|
||||||
|
set statusline+=%#warningmsg#
|
||||||
|
set statusline+=%*
|
||||||
|
|
||||||
|
set statusline+=%= "left/right separator
|
||||||
|
|
||||||
|
set statusline+=%c, " cursor column
|
||||||
|
set statusline+=%l/%L " cursor line/total lines
|
||||||
|
set statusline+=\ %P\ " percent through file
|
||||||
|
set laststatus=2 " always show status line
|
||||||
|
|
||||||
|
function! FileSize()
|
||||||
|
let bytes = getfsize(expand("%:p"))
|
||||||
|
if bytes <= 0
|
||||||
|
return ""
|
||||||
|
endif
|
||||||
|
if bytes < 1024
|
||||||
|
return bytes . " Bytes"
|
||||||
|
else
|
||||||
|
return (bytes / 1024) . "kB"
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user