fanglingsu / vimb

Vimb - the vim like browser is a webkit based web browser that behaves like the vimperator plugin for the firefox and usage paradigms from the great editor vim. The goal of vimb is to build a completely keyboard-driven, efficient and pleasurable browsing-experience.
https://fanglingsu.github.io/vimb/
GNU General Public License v3.0
1.34k stars 99 forks source link

Any chance of using VOom for the Bookmarks file ? #691

Closed philiprhoades closed 2 years ago

philiprhoades commented 2 years ago

People,

Because of the pain of using the primitive built-in bookmarks facility in browsers, sometime ago I switched over to using a Vim text file with VOom plugin which is MUCH nicer and much more efficient for me - now I wonder if VimB could use a file like this directly as its Bookmarks file ?

Here is a part of my Vim / VOom file as an eg:

http://pricom.com.au/2021-11-03_13-41-37_Vim-VOom_Bookmarks.txt.png

fanglingsu commented 2 years ago

@philiprhoades I don't think vimb could do any useful things on such human structured files. And I also assume that every body has other files to store bookmarks in. Someone might use directories with multiple files to apply some tagging to the bookmark, someone could use a single file with tagged lines, someone could ... The built in bookmarking system is simple and lightweight and a useable starting point. As you already use a VOom file with vim - it would be the best to run it with vim and open the urls with you browser from within vim.

philiprhoades commented 2 years ago

I did think about working from the Bookmarks file with Vim actually, and I will do that for some situations . . however, if I continue to make use of the built-in, simple VimB bookmarks file, is there a way I could open my custom bookmark file with Vim - from VimB?

Actually, now that I have thought about it a bit more - how hard would it be to create a VimB plugin that could read and write a custom bookmarks file? - maybe I could do that?

fanglingsu commented 2 years ago

@philiprhoades You could open the bookmarkfile in vim from within vimb by something like :sh! your-terminal-application -e "vim $HOME/bookmarks.txt. So you could bind it to some new keys like :nnoremap <C-O> :sh! xfce4-terminal -e "vim $HOME/bookmarks.txt"<CR>. But there is no communication back from vim to vimb. So you have to call vimb from within vim.

A plugin mechanism is not available. But you could patch the https://github.com/fanglingsu/vimb/blob/master/src/bookmark.c file to run your logic to add and remove bookmarks or to fill completion - but this might be not as easy. I think it would be easier to do it from outside of vimb via some shell tools and dmenu or something to filter the bookmarks.

philiprhoades commented 2 years ago

I think it would be easier to do it from outside of vimb via some shell tools and dmenu or something to filter the bookmarks.

OK, I will have a look at that . . thanks!