Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using iTerm2 to ssh to various servers. When i use VI to edit a file i get an error that reads 'Terminal Too Wide.' To fix this I use the following command 'stty columns 120.' Is there a setting that I can set in iTerm that will prevent me from having to enter this command?

share|improve this question
Use vim instead. –  Daniel Beck Jan 25 '12 at 14:28
is that the only way? i was really looking for something in iterm specifically. –  aamiri Jan 25 '12 at 19:46
You can always add the stty the the SSH system's shell profile so it's executed automatically. But vi simply cannot handle more columns, unless you patch and compile it. –  Daniel Beck Jan 25 '12 at 20:10

1 Answer 1

Don't make the terminal window too wide (e.g. fullscreen). Both Terminal and iTerm make the terminal as wide as the window can handle by default to not waste screen space. Unfortunately, vi doesn't appear to handle more than a hardcoded number of columns (160, currently).

In the ex-vi source code, Release 050325, check out config.h line 94, and in ex_v.c, the vok function definition that produces this error.

Some Linux distributions apparently patch vi source code to get more columns for bigger screens.

share|improve this answer

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.