Code Monkey home page Code Monkey logo

Comments (6)

ayuanx avatar ayuanx commented on August 16, 2024

I end up deleting all pointless "ingo#err" and "ingo#msg" to keep my vim lean, fast and clean. Sigh.

from vim-mark.

ayuanx avatar ayuanx commented on August 16, 2024

Anyway, I made a standalone version that does not depend on any library.
https://github.com/ayuanx/vim-mark-standalone

from vim-mark.

inkarkat avatar inkarkat commented on August 16, 2024

I'd call commenting about issues in an derogatory tone a bad practice, especially because you don't seem to fully understand the issue.

Separating common functions is explicitly recommended by Vim; see :help write-library-script:

Some functionality will be required in several places. When this becomes more
than a few lines you will want to put it in one script and use it from many
scripts. We will call that one script a library script.

The autoload mechanism was created to make this really easy and efficient. Only those scripts that contain functions that are actually used are loaded, the rest is ignored; it just "wastes" the space on disk. (At currently 800 KB / 4.2 MB with Git history, that should today be negligible.) If you really have a problem with Vim not being fast or clean, you need to look elsewhere.

If you only use my Mark plugin, yes, this might look wasteful. But keep in mind that I'm not the original author of this particular plugin, so it doesn't utilize the full potential of reuse yet. (However, my next planned feature for Mark will introduce more use of the ingo-library.) I have published 120+ more plugins (most of which now use ingo-library). Considering that, the decision to extract the common functionality (which caused a lot of effort for me) benefits both users (no duplication, no incompatibilities, faster updates) and me (less overall effort in maintaining, more time for features).

Finally, other plugin authors have done the same (see here).


In the end, this is open source, and you're free to do what you want. If you don't want the dependency and want to spend the effort to pull in the functions, fine. You seem to have "cloned" the code by copying the sources; if you had used GitHub's fork functionality instead, your fork would be linked and easily discoverable by other users through GitHub's network feature. I think it would also make it easier to pull in any future changes happening my side.

from vim-mark.

ayuanx avatar ayuanx commented on August 16, 2024

My point is that vim always needs to read and parse every single line in the bloated library.
One of my favorite parts of vim over emacs is that vim boots in less than 0.01 second, and I am determined to keep it so.
Because I run and close vim hundreds of times per day using it more like a "scribbler".
But thank you for replying any way.

from vim-mark.

inkarkat avatar inkarkat commented on August 16, 2024

My point is that vim always needs to read and parse every single line in the bloated library.

No, that's not how autoload works. Only those files that contain functions that are used are loaded, on first use. So for Mark 3.0.0, that would be autoload/ingo/err.vim, autoload/ingo/msg.vim, and autoload/ingo/cmdargs/pattern.vim; (together 23 KB; a lot of which are comments, which are read, but then discarded). You can check that with :scriptnames after first use of Mark. (Alternatively, you can use :profile, or capture a full log of a Vim session with vim -V20vimlog. After quitting Vim, examine the vimlog log file.) If you see any other reference to autoload/ingo/*, something is wrong with your setup.

from vim-mark.

pacak avatar pacak commented on August 16, 2024

FWIW I wasted some time trying to understand why plugin works but throws errors.

from vim-mark.

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.