How to collapse concealed text?

戏子无情 提交于 2019-12-22 10:05:46

问题


The problem is as follows:

  1. This is about a plain .txt file

  2. I have enabled the conceal feature and created this syntax file:

    set conceallevel=3
    syn region cTest conceal start='€£' end='£€'
    hi cTest ctermfg=DarkYellow
    
  3. I write first a summary/skeleton of what I want to say, and put it in between €£ and £€. Then, in the same line, I write a lengthier text following the guidelines of the summary. The whole file contains many (>100) lines.

  4. The conceal feature works very nicely, except for one point: if the ensuing lines are each, e.g., 600 characters long (summary 120, text 480), and if the screen is 80 characters wide, the lines the cursor is not on will display 6 screen lines plus… a void corresponding to the hidden 120 characters.

Is it possible to collapse this void (if I may say so)?

(I could not find any tutorial on the conceal feature except the Tip #1308, and the "conceal" tag is not accepted by Stack Overflow...)


回答1:


Unfortunately, currently there is no way to eliminate this void created by the conceal feature; apparently the development of the conceal feature was very complicated and involved some compromises to get it "out the door" in time for the 7.3 release.

This may be fixed in a future release if someone submits a working patch to Bram Moolenaar and/or the Vim developers mailing list.



来源:https://stackoverflow.com/questions/3897656/how-to-collapse-concealed-text

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!