Vim:映射GNU屏幕命令 [英] Vim: map GNU Screen command
问题描述
很抱歉,是否曾经有人问过这个问题,但是我对Vim文档感到不知所措,而且我似乎无法弄清楚.
Apologies if this has been asked before, but I feel overwhelmed with the Vim docs and I can't seem to figure this out.
我想在Vim中映射 F5 键来完成以下操作:
I want to map the F5 key in Vim to accomplish the following actions:
-
从Vim的视觉选择中提取文本.
Yank text from the visual selection in Vim.
在另一个名为ipython
的GNU Screen会话中执行文本的被选中部分.
Execute the yanked portion of the text in another GNU Screen session named ipython
.
第二部分可以通过发出以下命令行参数来实现(通过:!
),前提是只有我能够找到一种在该行的双引号之间粘贴寄存器内容的方法(但是我不能找出方法):
The second portion could be achieved by issuing the following command line argument (via :!
), if only I was able to find a way to paste the register content between the double quotes of that line (but I can't figure out how):
map <F5> :!screen -x ipython -X stuff "[REGISTER 0 CONTENT]"<CR><CR>
任何帮助将不胜感激!
推荐答案
在这里我复制也许这两个插件之一是您所需要的:
Maybe one of these two plugins is what you need:
- slime is
screen
-based. - tslime is a
tmux
-based version of slime.
这篇关于Vim:映射GNU屏幕命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!