mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:00:04 +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
|
||||
|
||||
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)
|
||||
endif
|
||||
let result = s:COP.systemlist([s:completer, a:CmdLine])
|
||||
@ -18,7 +18,7 @@ endfunction
|
||||
" this is for vim input()
|
||||
|
||||
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)
|
||||
endif
|
||||
let result = s:COP.systemlist([s:completer, a:CmdLine])
|
||||
|
@ -19,4 +19,5 @@ let g:ycm_semantic_triggers = {
|
||||
\ 'ruby' : ['.', '::'],
|
||||
\ 'lua' : ['.', ':'],
|
||||
\ 'erlang' : [':'],
|
||||
\ 'sh' : ['re!\w{2}', '/', '-'],
|
||||
\ }
|
||||
|
Loading…
Reference in New Issue
Block a user