mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-23 17:49:57 +08:00
Merge pull request #1061 from tracyone/dev
bashcomplete: can not trigger omnicomplete in some pos
This commit is contained in:
commit
91cad9eabc
@ -7,7 +7,7 @@ let s:COP = SpaceVim#api#import('vim#compatible')
|
|||||||
" this is for vim command completion
|
" this is for vim command completion
|
||||||
|
|
||||||
function! s:self.complete(ArgLead, CmdLine, CursorPos) abort
|
function! s:self.complete(ArgLead, CmdLine, CursorPos) abort
|
||||||
if a:CmdLine =~ '^[^ ]*$'
|
if a:CmdLine =~ '^\s\{0,\}\w\+$'
|
||||||
return s:COP.systemlist('compgen -c ' . a:CmdLine)
|
return s:COP.systemlist('compgen -c ' . a:CmdLine)
|
||||||
endif
|
endif
|
||||||
let result = s:COP.systemlist([s:completer, a:CmdLine])
|
let result = s:COP.systemlist([s:completer, a:CmdLine])
|
||||||
@ -18,7 +18,7 @@ endfunction
|
|||||||
" this is for vim input()
|
" this is for vim input()
|
||||||
|
|
||||||
function! s:self.complete_input(ArgLead, CmdLine, CursorPos) abort
|
function! s:self.complete_input(ArgLead, CmdLine, CursorPos) abort
|
||||||
if a:CmdLine =~ '^[^ ]*$'
|
if a:CmdLine =~ '^\s\{0,\}\w\+$'
|
||||||
return s:COP.systemlist('compgen -c ' . a:CmdLine)
|
return s:COP.systemlist('compgen -c ' . a:CmdLine)
|
||||||
endif
|
endif
|
||||||
let result = s:COP.systemlist([s:completer, a:CmdLine])
|
let result = s:COP.systemlist([s:completer, a:CmdLine])
|
||||||
|
@ -19,4 +19,5 @@ let g:ycm_semantic_triggers = {
|
|||||||
\ 'ruby' : ['.', '::'],
|
\ 'ruby' : ['.', '::'],
|
||||||
\ 'lua' : ['.', ':'],
|
\ 'lua' : ['.', ':'],
|
||||||
\ 'erlang' : [':'],
|
\ 'erlang' : [':'],
|
||||||
|
\ 'sh' : ['re!\w{2}', '/', '-'],
|
||||||
\ }
|
\ }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user