mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated all the plugins. Removed powerline. Added vim-airline (replacement for powerline). Added vim-fugitive.
This commit is contained in:
@ -22,17 +22,18 @@ let s:c.read_snippets_cached = get(s:c, 'read_snippets_cached', {'func' : functi
|
||||
|
||||
" if filetype is objc, cpp, cs or cu also append snippets from scope 'c'
|
||||
" you can add multiple by separating scopes by ',', see s:AddScopeAliases
|
||||
" TODO add documentation to doc/*
|
||||
let s:c.scope_aliases = get(s:c, 'scope_aliases', {})
|
||||
let s:c.scope_aliases.objc = get(s:c.scope_aliases, 'objc', 'c')
|
||||
let s:c.scope_aliases.cpp = get(s:c.scope_aliases, 'cpp', 'c')
|
||||
let s:c.scope_aliases.cu = get(s:c.scope_aliases, 'cu', 'c')
|
||||
let s:c.scope_aliases.xhtml = get(s:c.scope_aliases, 'xhtml', 'html')
|
||||
let s:c.scope_aliases.html = get(s:c.scope_aliases, 'html', 'javascript')
|
||||
let s:c.scope_aliases.php = get(s:c.scope_aliases, 'php', 'php,html,javascript')
|
||||
let s:c.scope_aliases.ur = get(s:c.scope_aliases, 'ur', 'html,javascript')
|
||||
let s:c.scope_aliases.mxml = get(s:c.scope_aliases, 'mxml', 'actionscript')
|
||||
let s:c.scope_aliases.eruby = get(s:c.scope_aliases, 'eruby', 'eruby-rails,html')
|
||||
if !exists('g:snipMate_no_default_aliases') || !g:snipMate_no_default_aliases
|
||||
let s:c.scope_aliases.objc = get(s:c.scope_aliases, 'objc', 'c')
|
||||
let s:c.scope_aliases.cpp = get(s:c.scope_aliases, 'cpp', 'c')
|
||||
let s:c.scope_aliases.cu = get(s:c.scope_aliases, 'cu', 'c')
|
||||
let s:c.scope_aliases.xhtml = get(s:c.scope_aliases, 'xhtml', 'html')
|
||||
let s:c.scope_aliases.html = get(s:c.scope_aliases, 'html', 'javascript')
|
||||
let s:c.scope_aliases.php = get(s:c.scope_aliases, 'php', 'php,html,javascript')
|
||||
let s:c.scope_aliases.ur = get(s:c.scope_aliases, 'ur', 'html,javascript')
|
||||
let s:c.scope_aliases.mxml = get(s:c.scope_aliases, 'mxml', 'actionscript')
|
||||
let s:c.scope_aliases.eruby = get(s:c.scope_aliases, 'eruby', 'eruby-rails,html')
|
||||
endif
|
||||
|
||||
" set this to "\<tab>" to make snipmate not swallow tab (make sure to not have
|
||||
" expandtab set). Remember that you can always enter tabs by <c-v> <tab> then
|
||||
@ -181,7 +182,7 @@ fun! s:ProcessSnippet(snip)
|
||||
endif
|
||||
|
||||
if &et " Expand tabs to spaces if 'expandtab' is set.
|
||||
return substitute(snippet, '\t', repeat(' ', &sts ? &sts : &sw), 'g')
|
||||
return substitute(snippet, '\t', repeat(' ', (&sts > 0) ? &sts : &sw), 'g')
|
||||
endif
|
||||
return snippet
|
||||
endf
|
||||
@ -722,10 +723,8 @@ fun! snipMate#ShowAvailableSnips()
|
||||
return ''
|
||||
endf
|
||||
|
||||
|
||||
" user interface implementation {{{1
|
||||
|
||||
fun! snipMate#TriggerSnippet()
|
||||
" Pass an argument to force snippet expansion instead of triggering or jumping
|
||||
function! snipMate#TriggerSnippet(...)
|
||||
if exists('g:SuperTabMappingForward')
|
||||
if g:SuperTabMappingForward == "<tab>"
|
||||
let SuperTabPlug = maparg('<Plug>SuperTabForward', 'i')
|
||||
@ -752,7 +751,7 @@ fun! snipMate#TriggerSnippet()
|
||||
call feedkeys("\<tab>") | return ''
|
||||
endif
|
||||
|
||||
if exists('b:snip_state')
|
||||
if exists('b:snip_state') && a:0 == 0 " Jump only if no arguments
|
||||
let jump = b:snip_state.jump_stop(0)
|
||||
if type(jump) == 1 " returned a string
|
||||
return jump
|
||||
@ -788,8 +787,7 @@ fun! snipMate#TriggerSnippet()
|
||||
return word == ''
|
||||
\ ? "\<tab>"
|
||||
\ : "\<c-r>=snipMate#ShowAvailableSnips()\<cr>"
|
||||
endf
|
||||
|
||||
endfunction
|
||||
|
||||
fun! snipMate#BackwardsSnippet()
|
||||
if exists('b:snip_state') | return b:snip_state.jump_stop(1) | endif
|
||||
@ -819,5 +817,4 @@ fun! snipMate#BackwardsSnippet()
|
||||
return "\<s-tab>"
|
||||
endf
|
||||
|
||||
|
||||
" vim:noet:sw=4:ts=4:ft=vim
|
||||
|
Reference in New Issue
Block a user