mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 17:50:04 +08:00
Fix vim support
This commit is contained in:
parent
a2c443e33a
commit
1c48fafbc4
@ -190,7 +190,11 @@ function! s:self.send(id, data) abort
|
||||
if has_key(self.jobs, a:id)
|
||||
let job = get(self.jobs, a:id)
|
||||
let chanel = job_getchannel(job)
|
||||
call ch_sendraw(chanel, a:data . "\n")
|
||||
if type(a:data) == type('')
|
||||
call ch_sendraw(chanel, a:data . "\n")
|
||||
else
|
||||
call ch_sendraw(chanel, join(a:data, "\n"))
|
||||
endif
|
||||
else
|
||||
call self.warn('No job with such id')
|
||||
endif
|
||||
|
@ -31,7 +31,11 @@ function! SpaceVim#layers#lang#python#config() abort
|
||||
\ '']
|
||||
\ )
|
||||
let g:no_autoflake_maps = 1
|
||||
call SpaceVim#plugins#repl#reg('python', 'python')
|
||||
if executable('ipython')
|
||||
call SpaceVim#plugins#repl#reg('python', 'ipython')
|
||||
elseif executable('python')
|
||||
call SpaceVim#plugins#repl#reg('python', 'python')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:language_specified_mappings() abort
|
||||
|
@ -32,9 +32,9 @@ endfunction
|
||||
|
||||
function! SpaceVim#plugins#repl#send(type) abort
|
||||
if a:type ==# 'line'
|
||||
call s:JOB.send(s:job_id, [getline('.')])
|
||||
call s:JOB.send(s:job_id, [getline('.'), ''])
|
||||
elseif a:type ==# 'buffer'
|
||||
call s:JOB.send(s:job_id, [getline(1, '$')])
|
||||
call s:JOB.send(s:job_id, getline(1, '$') + [''])
|
||||
elseif a:type ==# 'selection'
|
||||
else
|
||||
endif
|
||||
|
@ -71,7 +71,7 @@ pip install --user isort
|
||||
|
||||
### Inferior REPL process
|
||||
|
||||
Start a Python or iPython inferior REPL process with `SPC l s i`. If ipython is available in system executable search paths, ipython will be used to launch python shell; otherwise, default python interpreter will be used. You may change your system executable search path by activating a virtual environment.
|
||||
Start a Python or iPython inferior REPL process with `SPC l s i`. If `ipython` is available in system executable search paths, `ipython` will be used to launch python shell; otherwise, default `python` interpreter will be used. You may change your system executable search path by activating a virtual environment.
|
||||
|
||||
Send code to inferior process commands:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user