martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.24k stars 257 forks source link

folding support? #342

Open lammermann opened 8 years ago

lammermann commented 8 years ago

Could you implement folding in vis? In textadept editor this is done by the language lexers and I think you use the same lexers for vis syntax highlighting. So maybe you could use that to implement something similar in vis.

ghost commented 8 years ago

Here is a message where @martanne talked about folds: https://github.com/martanne/vis/issues/262#issuecomment-209937871

Also the displayed text has to be contiguous i.e. no support for folds etc (not that I miss them, but they should in principle be possible).

Textadept seems to be really minimal yet be a decent editor. Thank you for sharing.

Folding in textadept?

v217 commented 7 years ago

Is it possible to implement folding support that behaves identical to the vim zf command in vis only using the lua api?

martanne commented 7 years ago

@v217 in its current form not, no. The current cursor placement code assumes a contiguous text range. This restriction should eventually be lifted. Proper folding support will require quite a few changes to core editor primitives.