firefox - How can I inspect an element with vimperator/pentadactyl?

07
2014-07
  • Jon

    I'd like to be able to inspect an element (i.e. a link) with the built-in Firefox inspection tool, similar to right-clicking on an element and selecting "Inspect Element," only I'd like to be able to do it with Vimperator/Pentadactyl, with the keyboard. Is there a way to do that?

  • Answers
  • L. Daniel Nordstrom

    I was actually looking for this feature in Pentadactyl a few days ago, but like Ehvince, I couldn't find it in the documentation. I'm sure a plugin can be written for it, but I tried to find a workaround for now.

    The closest I could get was to use extended hint mode to open the context (right click) menu somewhere on the page, and choose "Inspect element" from there. By default, it's at ;c and shows the default hints (for links, text areas, and so on).

    You can set the extended hint tags to your desired CSS selectors with the eht (or extendedhinttags) option, just like with hinttags. To add hint tag selectors specifically for the context menu mode, you would do:

    :set eht+=[c]:a,div,p,span

    That will look kind of messy as it hints at every div on the page—you may want to be more specific with your selectors to suit your needs—but it works.

    It would be awesome to write a developer plugin for Pentadactyl with features such as this one. One day, some day.

    More information

    Pentadactyl Help - ‘extendedhinttags’ option
    Pentadactyl Help - Hints (and extended hints)


  • Related Question

    firefox - What's the difference between Vimperator and Pentadactyl?
  • John McDonnell

    I've been using vimperator for a few months and loving it (although it makes it hard for me to go back to primitive mousery on others' computers). I've seen that there's a fork called Pentadactyl, but I can't tell what the difference is. Is there any particular reason to use one over the other? Why was it forked?


  • Related Answers
  • Diago

    I am the project founder and still main developer of Vimperator. I have summarized my own perceived differences between the two projects here:

    http://code.google.com/p/vimperator-labs/wiki/VimperatorVsPentadactyl

    Please read the whole page, but if you really need a short summary, because you just wasted time fighting Pentadactyl's complexity ;), here it is:

    • Vimperator: The main focus is on usability, simplicity, stability and design while still preserving a powerful, modal browsing experience influenced by Vim.
    • Pentadactyl: The aim is to create a complex beast, where hackers with too much free time can do any (un-)imaginable thing. Also focuses more on 1:1 Vim compatibility.

    Hope this helps a little. I am sure both projects have their target audiences.

  • Sathya

    Maybe the FAQ section on the page you linked to could be helpful, in particular http://dactyl.sourceforge.net/pentadactyl/faq#faq-differences and http://dactyl.sourceforge.net/pentadactyl/faq#faq-fork .

    The main difference is that Vimperator's most active developers have moved on to Pentadactyl. More qualitative changes may be found in the change log, but essentially add up to what we consider more active and thoughtful development.

    Among the most visible differences, as of Pentadactyl 1.0, are more extensive Firefox 4 support, significantly better startup time and completion performance, considerably better :sanitize and private mode support, a greatly improved incremental find implementation, major improvements in Ex command parsing (including the ability to separate commands with | and split long commands across lines), conditionals (:if/:else) in configuration files, greatly updated documentation, and a number of bug fixes.

  • amar

    I can not say anything about the politics behind both projects, but here is what I think/have found out about both the projects:

    1. Development Activity: Both projects have pretty much same amount of commits in last couple of months. As for quality and impact of each commit, I can't say much without checking the code, but from commit messages it seems to be quite similar too. [pentadactyl is always one or few version behind the Firefox releases]

    2. Usability: For average user, Vimperator seems much easier to use, while Pentadactyl has a steeper learning curve but would feel very similar to vim users[1].

      2.1. Keymapping: The options and keymapping in Vimperator are much easier to remember for average users, for instance, to show menu bar, in vimperator you can simply :set gui=menu (substitute 'navigation' for navigation bar, 'tabs' for tab bar etc.) whereas in pentadactyl it is :set go+=M or :set guioptions+=M(a single character for each item which is also case sensitive)

      2.2. Customization: On the other hand, you can customize a lot more options in Pentadactyl then you can do in Vimperator. Taking our previous example, in Pentadactyl you can turn on and off bookmark bar, status bar, side scrollbar, bottom scrollbar and lot more using the same method as mentioned above, whereas Vimperator supports much less customization.

    3. Design: Vimperator has a much more modern look than Pentadactyl.

    Depending on what is important to you, both projects are good, if you don't care about aesthetics too much and are willing to spend some time learning the exact commands (or look them up in help, which is pretty simple to navigate) but want lots of customization options, or if you are looking for more vim-like experience, Pentadactyl is for you.

    On the other hand, if you are an average vim user who wants to turn their browser experience to keyboard use only but don't want to spend too much time learning Vimeperator is for you.

    [1]: Basic functionality is similar in both, like open pages, going back in history, closing tabs etc. it's the other features that I am talking about.

    [2]: Vimperator may have options hidden deep down to enable/disable other gui options, but even if they exist, they are not as visible as Pentadactyl.

  • amar

    It's not a technical comparison but as a user I can see one difference:

    • With Pentadactyl you are always on the previous version of Firefox (or maybe previous--).
  • Ooker

    I just have found the every good the very Vim-like add on for Firefox. Just want to share with you. Maybe it is the best add on ever.

    In my first try, the only words I could say was: "Ohhh shit" :))

    VimFx