Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow on large files or large lines #7

Open
denilsonsa opened this issue Jun 13, 2016 · 1 comment
Open

Slow on large files or large lines #7

denilsonsa opened this issue Jun 13, 2016 · 1 comment

Comments

@denilsonsa
Copy link

I have 175KB plaintext file with some very large lines. The largest one has 20K characters. All characters are standard ASCII chars, none of them are trollish.

If I open this file and :set nowrap, Vim becomes very slow and laggy. Disabling vim-troll-stopper plugin solves it.

The same happens when I open an SVG file, because several lines are very long.

Ideas for solutions:

  • Add some commands: :TrollStart to enable it; :TrollStop to disable it (I think this is already implemented); :TrollToggle to toggle it. Alternatively, could be :TrollOn and TrollOff. Maybe even :Trollolo to toggle it.
  • Add an option to have the plugin off by default.
  • The plugin could be off by default, but it could check for troll characters only once (on file load, or something), and if any troll character is found, a warning message could be shown at the status bar: Troll characters were found, run :TrollStart to highlight them.
@bruno-
Copy link
Collaborator

bruno- commented Oct 15, 2018

Sorry for the late reply here. I think this issue is legit, although I haven't had any noticeable issues with this.

To help with this issue, PR #10 was just merged.
As far as selectively and intentionally starting the plugin, vim 8's 'packages' feature could help here. It has a new opt directory that allows the plugins to be started selectively from vim's command line. I think this feature would do for now? More about the 'packages' feature http://vimcasts.org/episodes/packages/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants