:set co
は列数を返します。
'columns' 'co' number (default 80 or terminal width)
global
{not in Vi}
Number of columns of the screen. Normally this is set by the terminal
initialization and does not have to be set by hand. Also see
|posix-screen-size|.
When Vim is running in the GUI or in a resizable window, setting this
option will cause the window size to be changed. When you only want
to use the size for the GUI, put the command in your |gvimrc| file.
When you set this option and Vim is unable to change the physical
number of columns of the display, the display may be messed up. For
the GUI it is always possible and Vim limits the number of columns to
what fits on the screen. You can use this command to get the widest
window possible: >
:set columns=9999
< Minimum value is 12, maximum value is 10000.
'columns = 204'を返すのですが、' substitute'を使ってその番号だけを取るのは簡単ですので、私の問題を解決します。どうもありがとう! –
@MichalKrejčíは変数を直接( '&'で)使用します。例えば。 'echo&columns' –
@RandyMorris素晴らしいよ!あなたがた両方に感謝します。 –