Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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).

Please look at the picture below to see the problem:

At the time of issue, the values of relevant environment variables are,

$  echo $LINES
$  echo $COLUMNS

insalled 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


share|improve this question

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

share|improve this answer
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 '12 at 12:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.