1
0
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:
Wang Shidong 2017-12-03 05:54:12 -06:00 committed by GitHub
commit 91cad9eabc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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])

View File

@ -19,4 +19,5 @@ let g:ycm_semantic_triggers = {
\ 'ruby' : ['.', '::'],
\ 'lua' : ['.', ':'],
\ 'erlang' : [':'],
\ 'sh' : ['re!\w{2}', '/', '-'],
\ }