Skip to content

Commit

Permalink
terminal:update mapping
Browse files Browse the repository at this point in the history
Signed-off-by: tracyone <tracyone@live.cn>
  • Loading branch information
tracyone committed Jan 14, 2022
1 parent 3732079 commit 1e41ea1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion autoload/te/feat.vim
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function! te#feat#gen_feature_vim(reset) abort
endif
let l:temp2=te#feat#get_vim_version()
if v:shell_error != 0
let g:vinux_version='vinux V1.4.0'.' @'.l:temp2[0].'.'.l:temp2[1]
let g:vinux_version='vinux V1.4.9'.' @'.l:temp2[0].'.'.l:temp2[1]
else
let l:temp = matchstr(l:vinux_version[-1],'.*\(-\d\+-\w\+\)\@=')
if l:temp !=# ''
Expand Down
8 changes: 3 additions & 5 deletions autoload/te/terminal.vim
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ function! te#terminal#jump_to_floating_win(num) abort
elseif l:no_of_term == 1 && a:num != -5
call te#terminal#open_term(l:term_list[0])
else
let l:last_close_bufnr = s:last_close_bufnr
if te#terminal#is_term_buf(bufnr('%')) == v:true
let l:current_term_buf = bufnr('%')
let l:last_close_bufnr = s:last_close_bufnr
call te#terminal#hide_popup()
endif
if a:num == -4
Expand All @@ -140,6 +140,8 @@ function! te#terminal#jump_to_floating_win(num) abort
:Leaderf term
elseif g:fuzzysearcher_plugin_name.cur_val == 'ctrlp'
:call te#ctrlp#term#start()
else
call te#terminal#open_term(l:last_close_bufnr)
endif
elseif a:num >= 0
"in terminal or out out terminal
Expand Down Expand Up @@ -172,10 +174,6 @@ function! te#terminal#jump_to_floating_win(num) abort
endif
endif
elseif a:num == -3
if l:current_term_buf < 0
call te#utils#EchoWarning("Only support in terminal")
return
endif
call te#terminal#open_term(l:last_close_bufnr)
elseif a:num == -5
if l:current_term_buf < 0
Expand Down
1 change: 1 addition & 0 deletions rc/mappings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ nnoremap si zi
" close all buffer
map <Leader>ba :bufdo bd<cr>
nnoremap <silent><leader>jf :call te#terminal#jump_to_floating_win(-4)<cr>
nnoremap <silent><leader>jt :call te#terminal#jump_to_floating_win(-3)<cr>
nnoremap <silent><leader>j0 :call te#terminal#jump_to_floating_win(0)<cr>
nnoremap <silent><leader>j1 :call te#terminal#jump_to_floating_win(1)<cr>
nnoremap <silent><leader>j2 :call te#terminal#jump_to_floating_win(2)<cr>
Expand Down

0 comments on commit 1e41ea1

Please sign in to comment.