我正在使用带有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-WIt 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 LSo for python-mode, the command should look like this:
autocmd BufEnter __run__,__doc__ :wincmd LNOTE
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更多推荐
发布评论