LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   vi question (https://www.linuxquestions.org/questions/linux-newbie-8/vi-question-669470/)

HarryBoy 09-12-2008 08:32 AM

vi question
 
When I do 'vi filename' it opens up fullscreen even though there are only a few lines in the file.
How can I make it open up to only the size of the file?

Thanks

lipun4u 09-12-2008 08:50 AM

use following command at the command mode

:set lines=20 columns=22

here 20 is the no. of lines and 22 is the no of columns
if u don't know the no of lines inside the files, use following command in bash shell

wc -l file_name

to make this change visible always, modify .exrc file

HarryBoy 09-12-2008 09:35 AM

thank you :)


All times are GMT -5. The time now is 03:15 PM.