Re: [Vimprobable-users] RFC: Added support for buffers
Vimprobable is a lean web browser optimised for full keyboard control
Brought to you by:
hanness
From: Matthew C. <m...@ah...> - 2015-02-18 07:42:46
|
Matthew Carter <m...@ah...> writes: > Matthew Carter <m...@ah...> writes: > >> Morgan Howe <mt...@gm...> writes: >> >>> This patch adds basic support for handling multiple buffers. New >>> commands are ":buf[fer], :badd, and :bdelete". Buffers are given a >>> unique constant buffer id starting at 1 in the same manner as vim. >>> >>> <snip> >>> >>> Regards, >>> Morgan >>> >>> ------------------------------------------------------------------------------ >>> Vimprobable-users mailing list >>> Vim...@li... >>> https://lists.sourceforge.net/lists/listinfo/vimprobable-users >> >> Very nice Morgan, built cleanly and works great so far. >> >> I love that I can toggle what used to be tab specific features to a set >> of buffers now. >> >> For instance, if I have a few sites that I want to run with javascript >> enabled, I can open them all in buffers in one tab, do a: >> >> :set javascript=on >> >> And as I refresh the pages (or do the set initially) they'll all retain >> the setting. Then my next tab of buffers will use my defaults. >> >> I don't like typing :buf 1, :buf 2 though, I'd like to use what I use in >> vim, a simple :b1, :b2 (and :ls for listing the buffers). >> >> Maybe I'll expand on your patch unless you plan to (or there was a >> larger reason for not using the shorter syntax). >> >> Just a wishlist item, but some type of command to open a "set" of >> buffers defined in the RC file would be pretty awesome (for instance, I >> could define news aggregates as something like: >> >> :set NA=reddit.com,slashdot.org,hackernews.com >> >> And then run something like: >> >> :bufaddset NA >> >> To automatically open up all 3 pages at once. >> >> For grouping, I can't imagine a better set up (where I could have news >> buffers in one tab, social media in another, programming resources in >> one and miscellaneous elsewhere). > > Usability issues I see so far: > > 'd' - I think this should close the current buffer, not the > whole window if we do use these buffers > > '^6' - This should switch between most recent buffer and > current buffer instead of tabs (at least when buffers exist). > > Maybe keep gt/gT bound for tab cycling still. > > Thats all I can think of for now. Attached is a patch for a buffer list function callable via 'ls' command that will display the results inline (similar to the stumpwm modeline, with * indicating the selected buffer and - indicating others). At the moment I'm also logging it to stderr so it is reusable outside of vimprobable2 by doing something like: ./vimprobable2 > /tmp/bufls tail -f /tmp/bufls | grep -C1 '---BUFLS---' Which would allow displaying the buffer list in a window manager area (or anywhere consistently). A better solution would probably be to (optionally) log to a file, if this was functionality that wasn't too much bloat and would be used by users. For whatever reason, printf output seems to be captured by the GTK main loop until it terminates (hence why I chose stderr and not stdout for this quickie approach to a buffer list available externally). |