Tuesday 15 March 2011

vim - Fold the code only if file has more than 200 lines -


I have the default rounding enabled in my vimrc file (indent method) only when I want to add If there are more than 200 lines when the file is opened

How to make Vima aware The basic question is that when I open a file, can I get the number of lines in VIM?

You can get the number of lines in the buffer by using the line function With the '$' ' parameter.

For example, : echo line ('$') will show the line count in the status bar.

to change your settings to load your code based on your length. BufRead should be able to use it in combination with .

No comments:

Post a Comment