mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-23 17:49:57 +08:00
Update perl support (#2570)
This commit is contained in:
parent
1c2aab9c55
commit
972fb6d04d
@ -6,6 +6,7 @@
|
|||||||
" License: GPLv3
|
" License: GPLv3
|
||||||
"=============================================================================
|
"=============================================================================
|
||||||
|
|
||||||
|
" let s:SYS = SpaceVim#api#import('system')
|
||||||
|
|
||||||
function! SpaceVim#layers#lang#perl#plugins() abort
|
function! SpaceVim#layers#lang#perl#plugins() abort
|
||||||
let plugins = []
|
let plugins = []
|
||||||
@ -17,9 +18,17 @@ endfunction
|
|||||||
|
|
||||||
function! SpaceVim#layers#lang#perl#config() abort
|
function! SpaceVim#layers#lang#perl#config() abort
|
||||||
let g:perldoc_no_default_key_mappings = 1
|
let g:perldoc_no_default_key_mappings = 1
|
||||||
call SpaceVim#plugins#runner#reg_runner('perl', 'perl %s')
|
call SpaceVim#plugins#runner#reg_runner('perl', {
|
||||||
|
\ 'exe' : 'perl',
|
||||||
|
\ 'opt' : ['-'],
|
||||||
|
\ 'usestdin' : 1,
|
||||||
|
\ })
|
||||||
call SpaceVim#mapping#space#regesit_lang_mappings('perl', function('s:language_specified_mappings'))
|
call SpaceVim#mapping#space#regesit_lang_mappings('perl', function('s:language_specified_mappings'))
|
||||||
call SpaceVim#plugins#repl#reg('perl', ['perl', '-de', '42'])
|
" if executable('perli')
|
||||||
|
" call SpaceVim#plugins#repl#reg('perl', ['perli'. (s:SYS.isWindows ? '.CMD' : '')])
|
||||||
|
" else
|
||||||
|
call SpaceVim#plugins#repl#reg('perl', ['perl', '-del'])
|
||||||
|
" endif
|
||||||
endfunction
|
endfunction
|
||||||
function! s:language_specified_mappings() abort
|
function! s:language_specified_mappings() abort
|
||||||
nnoremap <silent><buffer> K :Perldoc<CR>
|
nnoremap <silent><buffer> K :Perldoc<CR>
|
||||||
|
@ -49,7 +49,7 @@ lang: cn
|
|||||||
|
|
||||||
### 交互式编程
|
### 交互式编程
|
||||||
|
|
||||||
启动 `perl -de 42` 交互进程,快捷键为: `SPC l s i`。
|
启动 `perl -del` 交互进程,快捷键为: `SPC l s i`。
|
||||||
|
|
||||||
将代码传输给 REPL 进程执行:
|
将代码传输给 REPL 进程执行:
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ within Perl doc windows, you can use `s` to toggle source code and the documenta
|
|||||||
|
|
||||||
### Inferior REPL process
|
### Inferior REPL process
|
||||||
|
|
||||||
Start a `perl` inferior REPL process with `SPC l s i`.
|
Start a `perl -del` inferior REPL process with `SPC l s i`.
|
||||||
|
|
||||||
Send code to inferior process commands:
|
Send code to inferior process commands:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user