Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
47
$  echo $COLUMNS
198

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

Thanks

share|improve this question
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.