Giter Club home page Giter Club logo

Comments (7)

squfrans avatar squfrans commented on August 18, 2024

Recently i was working with long multi-line lists (3000+ lines) in python files, search and replacing, adding deleting. Working with text blocks of this size while having SimpylFold makes undo unusable. In a "normal" workflow this goes unnoticed and it took me a while to narrow it down.

it is very easy to reproduce:

  1. copy print "test" 3000x
  2. :%s/$/ "other string"/
  3. u
  4. wait wait wait

from simpylfold.

tmhoangt avatar tmhoangt commented on August 18, 2024

I confirm that it is very slow with long python file
The current work-around solution for me, while editing the file, is to disable folding.

from simpylfold.

cmcginty avatar cmcginty commented on August 18, 2024

With a 100 line file if I toggle all the lines to comments MacVim will hang for nearly 10 seconds.

from simpylfold.

j3r3miah avatar j3r3miah commented on August 18, 2024

I corroborate the slowness remarks, but honestly I've had the same problem with other folding plugin (for other languages) I've come across and have come to expect it as inherent. Have you ever seen really fast folding in vim?

What I ended up doing is using Pathogen to install SimpylFold then run vim without folding when I'm editing (VIMBLACKLIST=SimpylFold vim) and with folding when I'm browsing/reading... not ideal but practical.

from simpylfold.

morphheus avatar morphheus commented on August 18, 2024

The built-in indent foldmethod is pretty quick even for large files:
autocmd BufEnter * :if line('$') > 1000 | set foldmethod=indent | endif
This prevents the hanging when loading/entering a large buffer, while still providing some form of folding.

from simpylfold.

squfrans avatar squfrans commented on August 18, 2024

foldmethod=indent foldlevel=1 foldnestmax=2
works rather well and it's quick.
perhaps not as nice as SimpylFold, but no lags and got used to it very quickly.

from simpylfold.

nfnty avatar nfnty commented on August 18, 2024

This is solved in #73. Would be great if you could test the PR.

from simpylfold.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.