Home  >  Q&A  >  body text

sublime-text - Performance of vim and sublime when processing large text

As the title states, when processing a text file with tens of thousands of lines, vim has obvious lags when moving the cursor, but sublime is very smooth.

What is the internal principle? Can vim be improved?

Please give me some advice, thank you!

给我你的怀抱给我你的怀抱2683 days ago800

reply all(5)I'll reply

  • PHPz

    PHPz2017-05-16 16:37:49

    Vim has too many functions enabled by default, and many of these functions have poor performance under large files. For example, :set noswapfile禁掉swap file,比如vim -u xxx no plug-in startup, etc.

    The main design of vim is not for large files. It is rare for code files to have tens of thousands of lines or more

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-16 16:37:49

    Use vim8.0 to view the log under ssh. There are 989.31 million lines, which is very smooth.
    The native Windows uses self-compiled gvim8.0 to view it, and it is also very smooth.

    I guess you are using the officially released gvim 7.4 for windows, which is not even supported by +directx.
    What’s the point of using an old version of an open source softwarefor the worst optimized platformcompared with the latest version of commercial software?

    reply
    0
  • 迷茫

    迷茫2017-05-16 16:37:49

    Are you sure your vim is in a Linux environment? I have also opened very large files without any lag, but sublime is also very easy to use

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-16 16:37:49

    Tens of thousands of lines?

    VIM 我最大打开过 2G 的日志文件。没啥问题。打开几百M的文件更是 EASY.
    The original poster can imagine how many lines there are.

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-16 16:37:49

    It must be a network problem that causes the vim editing cursor to freeze in ssh. Not to mention vim, even with a small nano, it is very easy to edit a 100,000-line file. But I am used to using the editor Geany on the Ubuntu desktop.

    reply
    0
  • Cancelreply