Giter Club home page Giter Club logo

vim-troll-stopper's Issues

Slow on large files or large lines

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.

Stop for certain filetypes?

Is it possible to stop the plugin for certain filetypes? Something like

autocmd FileType mkd let g:loaded_troll_stopper = 0 

may be? (The example above one doesn't work but I use it here only to illustrate the idea...)

EDITED: Or, may be, vice versa, only enable it for some filetypes?

Error when loading

I dropped troll_stopper.vim into my vim\vim74\plugin folder. Upon starting vim, I see this error in a popup:

Error detected while processing C:/vim/App/vim/vim74/plugin/troll_stoppe
r.vim:
line  275:
E713: Cannot use empty key for Dictionary
E15: Invalid expression: { "\u00A0": ' ', "\u2000": ' ', "\u2001": ' ', "\u2002": ' ',

Followed by this red error in the vim window:

Error detected while processing function <SNR>20_HighlightTrolling:
line 2:
E121: Undefined variable: s:troll_regex
E116: Invalid arguments for function matchadd

I'm sure I've either done something wrong in installing, or I'm missing some dependency. Can you give an example of "Use your favorite plugin manager"?

Troll Stopper doesn't work on Vim 7.4.x?

TrollStopper works fine on Vim 8.x, but when I try and use it on Vim 7.4.160 (which is the system Vim that ships with CentOS 7.3) I get the following error:

Error detected while processing function <SNR>28_HighlighTrolling:
line    7:
E118: Too many arguments for function: matchadd

Any ideas?

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.