一个简单的快速打开关闭 terminal 的 vim8.1 插件。

2018-06-19 20:02:05 +08:00
 maxxxxx
Vimscript 写的不多,实现也很简单,不过也是满足日常使用了。主要是希望大家能多提一下想要的 feature。送上 github 地址:
https://github.com/PangPangPangPangPang/vim-terminal
6062 次点击
所在节点    Vim
9 条回复
mikac
2018-06-19 20:38:37 +08:00
看起来听不错
maxxxxx
2018-06-19 20:57:16 +08:00
@mikac vim 里面管理 terminal 没有其他编辑器好用,好在可定制性在那儿了,搞完确实方便多了,这个星期再把管理多个 terminal 的能力加上!
KentY
2018-06-19 22:51:59 +08:00
c-z & fg
maxxxxx
2018-06-19 23:28:37 +08:00
@KentY 经常会用到 gui 的,特别是 mac 终端,稍微跑几个插件就性能特别差…
mikac
2018-06-19 23:35:01 +08:00
@maxxxxx 其实也想说 ctrl-z & fg 很方便很实用的,当然你写的这个插件也适用一些人(喜欢平铺窗口),多种选择总是好的 :)
glues
2018-06-20 00:41:14 +08:00
不错
kran
2018-06-20 09:58:00 +08:00
建议针对 tab 打开终端。之前自己改的一个:

function! Term_toggle(height)
if exists("t:term_win") && win_gotoid(t:term_win)
let t:term_hight = winheight("")
hide
if exists("t:term_org_win")
call win_gotoid(t:term_org_win)
endif
else
let t:term_org_win = win_getid()
botright new

if exists("t:term_hight")
exec "resize " . t:term_hight
else
exec "resize " . a:height
endif


try
exec "buffer " . t:term_buf
catch
call termopen($SHELL, {"detach": 0})
let t:term_buf = bufnr("")
endtry
startinsert!
let t:term_win = win_getid()
endif
endfunction
maxxxxx
2018-06-20 11:49:23 +08:00
@kran 针对 tab 的在计划之中~谢谢建议
maxxxxx
2018-06-21 16:40:23 +08:00
捞一下,支持了新的多 tab 功能。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/464200

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX