3

I am using terminator as terminal emulator. Terminator allows to increase/decrease font size and also modifies the $COLUMNS and $LINES environment variables properly. less and nano seem to understand this change and display long files properly. But vi/vim does not seem to pick up this change and does not layout well (it does not display from the first line of the file).

At the time this occurs, the values of relevant environment variables are:

$  echo $LINES
47
$  echo $COLUMNS
198

installed software:

ii  vim                                                         2:7.3.429-2ubuntu2.1                       Vi IMproved - enhanced vi editor
ii  terminator                                                  0.96-0ubuntu1                              multiple GNOME terminals in one window

1 Answer 1

1

You can use stty columns <arg> to change column width of window or stty rows <arg> to change the row height of the window.

For more info on stty refer this page

In vi/vim it uses the same settings as your terminal. In gvim or terminator to change the font size you can use :set guifont=<value> or you can set this value permanently in .vimrc file

Refer Vim wiki on how to change the font.

Hope this helps

1
  • my stty settings are the same as reported by eliminator. when eliminator says 88 * 50. this is the output of stty -a reports rows:50, columns:88. At this point, i still have the same issue of vi not displaying files from line one. Or may be I did not understand what you meant. Please explain. thanks.
    – raghavan
    Sep 12, 2012 at 12:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .