Comments (6)
I end up deleting all pointless "ingo#err" and "ingo#msg" to keep my vim lean, fast and clean. Sigh.
from vim-mark.
Anyway, I made a standalone version that does not depend on any library.
https://github.com/ayuanx/vim-mark-standalone
from vim-mark.
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.
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.
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.
FWIW I wasted some time trying to understand why plugin works but throws errors.
from vim-mark.
Related Issues (20)
- :windo add a jumplist HOT 1
- neovim: "invalid address type value: other" HOT 2
- Can't copy marked word? HOT 1
- Installation should mention dependency on vim-ingo-library HOT 1
- cccccclbeccdrbivffhhcenrbbubtiivulrrhdlclvkr HOT 1
- I often encounter this mistake for no reason:mark#UpdateMark HOT 5
- for a multi-line mark, * on cursor degrades to vim search HOT 2
- Setting mark as part of vim modeline HOT 2
- ":NMark pattern" produces "E16: Invalid range" when N exceeds number of lines in buffer HOT 2
- Window with WinBar gets smaller every time add or delete mark HOT 3
- Cannot search github.com for this plugin because it is forked HOT 1
- allow not clearing mark when it re-added HOT 2
- [Unrelated to the plugin] Help creating an anonymizer plugin HOT 5
- Declare dependencies HOT 3
- Ability to use n/N to perform `MarkSearchAnyNext`/`MarkSearchAnyPrev` HOT 2
- Global variable to prevent default mappings HOT 1
- How to delete the slot saved by MarkSave HOT 1
- Tiny Suggestion: Make clearer that one needs to install dependency vim-ingo-library HOT 1
- Sourcing .vimrc file breaks highlighting HOT 3
- add 'missing dependency' error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-mark.