简体   繁体   中英

vim python-mode vertical windows

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM