vim python

编程入门 行业动态 更新时间:2024-10-26 00:29:07
vim python-mode垂直窗口(vim python-mode vertical windows)

我正在使用带有python-mode插件的vim。 由python-mode打开的所有窗口(运行时,文档,错误等)水平分割窗口。 如何更改默认行为以垂直拆分?

I'm using vim with the python-mode plugin. All windows (runtime, documentation, Error, etc) opened by python-mode split the window horizontally. How can I change the default behavior to split vertically?

最满意答案

python-mode似乎没有提供允许您控制其拆分方向的选项。 但是,您可以创建一个自动命令,该窗口在打开时会自动将窗口移动到右侧。

autocmd BufEnter {window_name_list} :wincmd L

所以对于python-mode,命令应如下所示:

autocmd BufEnter __run__,__doc__ :wincmd L

注意

此自动命令会将窗口移动到屏幕的最右侧。 如果要将L分割为左侧而不是右侧,则可以将L替换为H

如果您需要有关自动命令和wincmd的帮助,请阅读以下帮助主题:

:help :autocmd :help autocmd-events :help :wincmd :help CTRL-W

It doesn't appear that python-mode provides an option that allows you to control the direction of its splits. However, you can create an autocommand which will automatically move the window to the right side when it opens.

autocmd BufEnter {window_name_list} :wincmd L

So for python-mode, the command should look like this:

autocmd BufEnter __run__,__doc__ :wincmd L

NOTE

This autocommand will move the window to the very right of the screen. You can replace L with H if you want it to split to the left instead of the right.

If you need help on autocommands and wincmd, read these help topics:

:help :autocmd :help autocmd-events :help :wincmd :help CTRL-W

更多推荐

本文发布于:2023-07-09 02:25:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1082900.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:vim   python

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!