Code Monkey home page Code Monkey logo

fanglingsu / vimb Goto Github PK

View Code? Open in Web Editor NEW
1.3K 46.0 99.0 3.64 MB

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.

Home Page: https://fanglingsu.github.io/vimb/

License: GNU General Public License v3.0

Makefile 1.03% Shell 0.25% C 92.42% JavaScript 5.18% HTML 1.01% CSS 0.11%
browser vim webkit2gtk webkit2

vimb's Introduction

Vimb - the Vim-like browser

Build Status License: GPL v3 Latest Release

Vimb is a Vim-like web browser that is inspired by Pentadactyl and Vimprobable. The goal of Vimb is to build a completely keyboard-driven, efficient and pleasurable browsing-experience with low memory and CPU usage that is intuitive to use for Vim users.

More information and some screenshots of Vimb browser in action can be found on the project page of Vimb.

Features

  • it's modal like Vim
  • Vim like keybindings - assignable for each browser mode
  • nearly every configuration can be changed at runtime with Vim like set syntax
  • history for ex commands, search queries, URLs
  • completions for: commands, URLs, bookmarked URLs, variable names of settings, search-queries
  • hinting - marks links, form fields and other clickable elements to be clicked, opened or inspected
  • SSL validation against ca-certificate file
  • user defined URL-shortcuts with placeholders
  • read it later queue to collect URIs for later use
  • multiple yank/paste registers
  • Vim like autocmd - execute commands automatically after an event on specific URIs

Packages

dependencies

  • gtk+-3.0
  • webkit2gtk-4.1
  • gst-libav, gst-plugins-good (optional, for media decoding among other things)

Install

Edit config.mk to match your local setup. You might need to do this if you use another compiler, like tcc. Most people, however, will almost never need to do this on systems like Ubuntu or Debian.

Edit src/config.h to match your personal preferences, like changing the characters used in the loading bar, or the font.

The default Makefile will not overwrite your customised config.h with the contents of config.def.h, even if it was updated in the latest git pull. Therefore, you should always compare your customised config.h with config.def.h and make sure you include any changes to the latter in your config.h.

Run the following commands to compile and install Vimb (if necessary, the last one as root). If you want to change the PREFIX, note that it's required to give it on both stages, build and install.

make PREFIX=/usr
make PREFIX=/usr install

To run vimb without installation for testing it out use the 'runsandbox' make target.

make runsandbox

Mailing list

Similar projects

license

Information about the license are found in the file LICENSE.

about

vimb's People

Contributors

bkmgit avatar cdlscpmv avatar croyzor avatar czarkoff avatar desearcher avatar falsifian avatar fanglingsu avatar gkfx avatar iamleot avatar illfygli avatar infmagic2047 avatar j1r1k avatar jasonwryan avatar jjakob avatar jubalh avatar lormuc avatar mathias-sm avatar mati75 avatar mawww avatar michaelmackus avatar mike402 avatar parnmatt avatar pks-t avatar plredmond avatar rti avatar sadoon-albader avatar semarie avatar shioyama avatar yblein avatar zengwei2000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vimb's Issues

Some bug report

  1. Just tried out the new Prev/Next feature; but it doesn't seem to work properly.

    On google it matches the link 'More >>' instead despite the fact that '\bnext\b' pattern is before '\bmore\b' and the 'next' link is below the 'more' link on the page.

  2. The new keybinding mechanisam is illuminating, but it doesn't work in some cases. I tried this

    nmap J :e VimbFunction()

    Instead of executing the command it puts "e VimbFunction" to the input box and then appends 'J' to the end of that (so that becomes 'e VimbFunction()J')

Running scripts from vimb

It would be nice to have the ability to execute scripts from vimb with
current URL as a parameter. What I actually want to achieve is
to have ability to store the current URL in a file other than the
bookmark file.

Hinting

Implement hinting for links, images and other sources.

GTK3 build issues.

  1. Assertion failure: (vimb:1336): Gdk-CRITICAL **: gdk_frame_clock_request_phase: assertion `GDK_IS_FRAME_CLOCK (frame_clock)' failed
  2. Input autocomplete is slow. It takes few sec to show ~1.5K entries from history.
  3. There's a scrollbar on the right side of the window.
  4. src/main.c:667:5: warning: 'gtk_entry_set_inner_border' is deprecated (declared
    at /usr/include/gtk-3.0/gtk/gtkentry.h:155) [-Wdeprecated-declarations]
    gtk_entry_set_inner_border(GTK_ENTRY(gui->inputbox), NULL);

Search History

Save all search strings from within the inputbox/commandline in a list to allow to step through the history via 'tab' or 'shoft-tab' like the command completion.

Maybe we can reuse the completions mechanism to also show the last search requests.

Allow to configure webkit setting 'enable-display-of-insecure-content'

The enable-display-of-insecure-content sebkit setting variable has big security impact and should be configurable by the user. I don't know why, but the default value for this is true that should be replaces by false in vimb.
The varaible enable-running-of-insecure-content should also be configurable and set to false per default.

Hinting not opens link

On some pages the hinting of links to be opened does not work if JavaScript is enabled.

This behaviour was seen on
http://www.heise.de/security/meldung/Niederlande-Gesetzentwurf-ueber-Entschluesselungsbefehl-1854652.html
where the 'nemo tetenur' link does not work. Maybe there is a event-observer
added to this element that breaks the hinting of vimb in this case.

It seems that also the normal mouse clicks do not open these links.

Followinng JavaScript could be the reason for the bug.

if (window.externalLinks === undefined) {
    var externalLinks = (function() {
        function external_blank() {
            if (typeof jQuery != "undefined") {
                jQuery( function($) {
                    $(document).on('click', "a[rel~=external]", function(e) {
                        e.preventDefault();
                        var url = $(this).attr("href");
                        window.open(url, "_blank");
                    });
                });
            }
        }
        var my = {};
        my.openBlank = function() {
            external_blank();
        };
        return my;
    })();
    externalLinks.openBlank();
}

Better Keybindings

Adapt the key-mapping to the style that also vim uses. That means don't
distinguish between modkeys and the last key, instead take the whole key
sequence.

  1. Every typed key, that is a prefix of one ore more key-bindings should be
    shown in the statusbar.
  2. Show also special keys in statusbar for example <C-R> as ^R or <Tab> as ^I
    and so on.
  3. Change key notation into the way vim does, for example <CS-R>, <S-Tab>,
    <Up>, <Down>, <F3> and <S-F5>. The format is <MODIFIERS-Key>.
  4. If a full key sequence is a prefix of another key sequence, way some time
    if the other required keystrokes are typed, if not run the already matches
    binding.

Search

Allow to search within the open webpage via keybind '?' and '/' like it is done in vim.

Reduce direct GUI and Hint styling

The GUI should be styleable and themable by the standanrd GTK Style mechanism, to not brake the themes, the direct assigning of fonts or colors should be reduced to a minimum.

  • Use only those style overwrites, that are really required to make the browser usable
  • Feed the browser with some usable default styling
  • Document how the diffrent gui and gint parts can be stlyed in GTK2 and GTK3 (project homepage and manual page)
  • Also the hints should be designable by the users stylesheet, and only a default minimum style should be applied to have usable hints without any additional styling

Autocomplete list sort order

When vimb shows the autocomplete list, the URLs are displayed
in order of access - from oldest to latest. I think it should
be better to do otherwise - show the latest URLs first.

Pass-Through mode also in Input mode

There should be a default keybinding to switch into pass-through mode from input mode too. And the pass-through mode should be a submode so that we can switch vimb to insert mode but don't process the keybindings, otherwise it's not possible to write into forms if vimb is in pass-through mode.

Page title in history and bookmark files

Add the page titles to the bookmark and history file, so tha use can grep these files easily.

  • show the title in completion list on the right side
  • allow to used also the title for completion where only the url is used at the moment

Evaluate environment var 'no_proxy'

It would be a nice feature to allow to make proxy exceptions by environment variable 'no_proxy' that is also used by wget. This variable can hold some ',' seperated url pattern that are excluded from proxy and are therefor requested direct.

export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"

Command History

Save all commands runned from within the inputbox/commandline in a list to allow to step through the history via 'tab' or 'shoft-tab' like the command completion.

Maybe we can reuse the completions mechanism to also show commands from the history.

Custom config file

Allow to set a custom configuration file via command line option -c --config that is used intead of the default config file in XDG_CONFIG_HOME/vimb/config.

Can't build

I'm a vimprobable2 user at the moment, but this project sounds intriguing. Unfortunately, I haven't as of yet been able to try it.

I've got the dependencies satisfied as far as I can tell, but the project won't build. I can build vimprobable2, which has the same dependencies.

Here's a paste of the build errors.

Soup Warnig

Warning libsoup-WARNING **: No feature manager for feature of type 'SoupCookie' is printed to console if vimp is started. Check what's wrong or if this is a Problem in the soup library. This issue seems also to exist in surf (another lighweight webkit browser) too.

Open Editor Command

Implement a command that allows to write the content of an editable form field (input type text and textarea) into a temporary file and spawns an editor with that. If the editor is quit successfully read the files content and put it back into the form field.

Hints are case sensitive

In hints mode, you can open URL by typing a part of its title. However, this feature is case sensitive; for example, typing "i" on this page won't select "Issues" link - you have to type "I".

Bookmarks

Allo to save current page as tagable bookmark in a bookmark file.

  • add command to save the bookmark
  • add command to open all bookmarks with a given tag
  • add completion for existing bookmarks

Last Closed Page

Save the last closed page into a file and implement a command to reopen the last closed page into current or new window.

This feature allow to get a page back that was closed by mistake.

Hints do not work correctly on some pages

Steps to reproduce:

  1. Go to en.wikipedia.org;
  2. Type f15. Note that the wikipedia logo link has number 150.
  3. Type 0.
    Instead of opening the logo link, vimb opens link to the printable version of the page. If you expand the "Print/Export" section on the left side of the page
    and type f15, you can see that now a link to the printable version has number

Cannot open 'about' links

When I open any of the 'about' links, e.g. about:blank, vimb redirects
me to the duckduckgo instead of showing the expected page (blank page in
case of about:blank).

Slash is not mapped to search

There's Shift-/ mapped to "input /" and Shift-? (not sure how it
is supposed to be entered) mapped to "input ?". Probably it
should be "/" and "Shift-/".

Setting proxy.

There is no command for setting proxy address. You can use http_proxy variable, but this does not allow to change proxy without restarting vimb.

Allow to use a proxy

Allow to use a proxy.

The usage of the proxy should be toggleable on runtime by :set proxy={on,off}. The proxysettings should be read out of the environment varibale 'http_proxy'.

Garbage file is created upon exit

When I close vimb using :quit command, a file with a random name is created in the current directory. This file contains "quit" string.

Warnings on exit

The following warnings are printed on exit:

(vimb:408): Gtk-CRITICAL **: IA__gtk_adjustment_get_upper: assertion `GTK_IS_ADJUSTMENT (adjustment)' failed

(vimb:408): Gtk-CRITICAL **: IA__gtk_adjustment_get_page_size: assertion `GTK_IS_ADJUSTMENT (adjustment)' failed

(vimb:408): Gtk-CRITICAL **: IA__gtk_adjustment_get_value: assertion `GTK_IS_ADJUSTMENT (adjustment)' failed

(vimb:408): GLib-GObject-WARNING **: invalid uninstantiatable type (null)' in cast toGtkLabel'

(vimb:408): Gtk-CRITICAL **: IA__gtk_label_set_text: assertion `GTK_IS_LABEL (label)' failed

Quickmarks

Add a file to defined quickmarks in, that can be easily opened by a new command or keybind.

  • open quickmark 12 by :12qm or somethings similar

vimb ignores SIGTSTP

If vimb is started in foreground, there is no way to move it to background - Ctrl-Z is ignored.

Searchengines

Allow to define searchengines with shortcuts that can be used to open the search result via :open or :tabopen like ':open dd vimp browser' to open the search results for 'vimp browser' via duckduckgo.

Allow to set searchengine shortcut to search-url relation via config file. Something similar to the :nmap and :nunmap can be used (:searchengine dd=https://duckduckgo.com/lite/?q=%s and to remove :unserachengine dd).

Focus-input focuses also hidden fields

If there are hidden fileds on the page, the focus-input command set the
focus to the hidden field.

The focus-input should only focus input fields and textareas that are
visible to the user.

  • type is not "hidden"
  • visibility is not "none"
  • element is editable

Assertion fail in GLib

In function bookmark_get_by_tags, the parameter of g_strv_length is not checked,
causing GLib to spit errors in case the parameter is NULL.
There's a similar issue at src/command.c:385 - running :imap without arguments causes
a segfault.

Compilation problems

Hi. I've got two problems during compilation:

  1. js2h.sh generates invalid header file - in the last line of the script the terminating quote
    is misplaced.
  2. libm is not linked.

Use TreeView for completions

The current used box backing for the completions is very slow under gtk3. This sould be replaced by the TreeView that should be faster in this context.

Emacs keybinding for input editing

It would be nice to have some advanced capabilities for
editing text in the input bar, e.g. Ctrl-H to remove
character, Ctrl-U to remove the whole line (probably
except the command, only the argument), Ctrl-B/F and
Alt-B/F to move to the next/previous word/character, etc.

Using hints to download files

There's no way to download some types of files, for example, plain
text or video, without using a mouse. When you open a link to,
for example, .mp4 file, vimb shows a player instead of downloading
the file. Adding a separate hotkey for downloading files via
hints, may solve this problem.

Bookmark autocompletion does not work with bookmarks without tags

If you have a bookmark without a tag, it is not displayed in
autocomplete list. Also, the bookmark is displayed only when
the tag is entered completely, i.e. if you have a bookmark
with a tag "wiki", typing ":open w" won't show this
bookmark. It would be better to have bookmarks matched in the
same way as history entries. In order to avoid having too many
links in the autocomplete list, separate keybindings for history
autocomplete and bookmark autocomplete could be added.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.