Open Madd0g opened 5 years ago
Yes, there are some changes in 0.9.44 for vim-like marks.
Since 0.9.44, there is no differentiation between local and global marks, all marks are global. You can also use small letter for global mark. And the interface for Normal.jumpVIMark
was changed, newTab
parameter was removed, as I thought there is no use case for that. You could use om
to open new tab for a vim-like mark.
@brookhong I love the ability to open marks in current tab too. Is there any way to add the feature in my customised js file? For example, how to get the URL of a mark?
It would be nice if this optional newTab
parameter was added again. Without it people need to duplicate the code from Normal.jumpVIMark
to get the same functionality.
I now have
mapkey('"', '#10Jump to vim-like mark in current tab', function(mark) {
RUNTIME('getSettings', {
key: "marks"
}, function(response) {
var markInfo = response.settings.marks[mark];
if(markInfo) {
document.location.href = markInfo.url;
} else {
Front.showBanner(`No mark of: ${mark}`);
}
});
});
but this does not select an already opened tab.
If marks can't be opened in same tab anymore, I think the '
and <Ctrl-'>
mappings that show up in the ?
keybind guide should be just shortened to show only '
, no?
I noticed global marks are able to select the opened tab instead of creating new ones! Amazing fix!
Sadly, I lost the ability to control whether to open the mark in the same tab. Because SK doesn't work on the "new tab" page, I often use an existing page as a "launch point", so I load one page, then use a mark to load something else in-place of the current page.
I was using this code to control whether I want a new tab or not (sort of the inverse of adding a mark, if shift is held, re-use current tab):
I'm wondering if it's too hard to bring this functionality back?
Thanks!