Vim: Marks across files

Created on 4 Jul 2016  Â·  12Comments  Â·  Source: VSCodeVim/Vim

We now have marks, which are cool.

But you know what is cooler than marks?

Marks that work _across files._ 😲

Lower case marks only work within the same file. Upper case marks work in between files.

help wanted kinfeature sizS statuduplicate

All 12 comments

I'm going to give this a shot.

I worked on marks across files for a bit but I have not finished yet. Some input from others would be helpful.

Marks are currently stored in each document's historyTracker. I'm thinking to add a static (i.e. shared between all instances of historyTracker) list of uppercase marks. I will also add a nullable document field to marks and track a mark's document if the mark isUppercaseMark. Since there probably won't be many global marks, I think the performance impact of frequently traversing the uppercase mark list is acceptable.

Any comments or concerns are welcome. Mostly I want to know if there is a different approach that I should consider instead.

Awesome, @arussellk! I would encourage you to go ahead and open up a WIP PR so your work is visible and we can give suggestions or whatever.

Your approach sounds good to me. I wouldn't be concerned with perf impacts as we have a very small number of marks. :)

@johnfn Ok. Is there anything special about a WIP PR? Should I include WIP in the title?

Yeah, just put WIP in the title so we can easily identify it.

On Thursday, August 4, 2016, Russell Kennington [email protected]
wrote:

@johnfn https://github.com/johnfn Ok. Is there anything special about a
WIP PR? Should I include WIP in the title?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/VSCodeVim/Vim/issues/389#issuecomment-237691779, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAKPQerBS4VUDdJQwf37U_oTQpN5kqHvks5qclvvgaJpZM4JEdXa
.

Grant

@arussellk is working on this issue over here: https://github.com/VSCodeVim/Vim/pull/564

Since school is starting, I'm pretty sure I'm not going to get this done. Please remove the in-progress label. You can leave #564 as a starting point for the next person if you wish.

Thanks for letting us know, @arussellk. Thanks for your progress so far :)

Closing this in favor of https://github.com/VSCodeVim/Vim/issues/1692 as it's more clearer

Can't wait to have something like #3708 gets merged.

@zetixar Planning on having it in the next release, maybe this weekend? 🤞

@J-Fields that's a wonderful news! It is awesome that #3708 can also re-open the file with global marks in it if the file is already closed. Very much looking forward to it!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gerardmrk picture gerardmrk  Â·  3Comments

triztian picture triztian  Â·  3Comments

st-schneider picture st-schneider  Â·  3Comments

stefanoio picture stefanoio  Â·  3Comments

lucastheisen picture lucastheisen  Â·  3Comments