2022-01-23

Thunderlinks were durable Thunderbird client hyperlinks to specific email messages that stopped functioning with a new API in version 68. Recently, I have found a similar add-on that provides comparable features. In this blogpost, I am going to describe how I have customised it for my Windows pc and how I open cbthunderlink in Vim.

Cbthunderlink extension can be installed directly from Thunderbird Add-ons browser.

From the Add-ons Manager (click the spanner icon on the top-right corner), I have changed the Open Mode option to new tab.

Filter out NoReply

It seems that the add-on has some issues when the message sender contains noreply. I have created a new folder (NoReply) and then applied the following filter to remove them from my default InBox.

Vim

To open a cbthunderlink I use a separated executable that opens the Thunderbird client and mimics the default CTRL-ALT-0 keyboard shortcut. The following code block, included in my .vimrc, allows opening the link under the cursor when I press ALT-0.

     " open cb_thunrdelink
    nnoremap <silent> <M-0> <esc> :call Open_cb_thunderlink()<CR>
    fun! Open_cb_thunderlink()
        let w = expand('<cWORD>')
        " check if a proper formatted cb_thunrdelink
        if w =~ '^\(cbthunderlink\|thunderlink\)://.\{-}[[:punct:]]$'
            echo 'Open '.w
            call setreg('*',w)
            execute dispatch#start_command(0,g:homedirw32.'\bin\open_cbthunderlink.exe',0,0)  
        endif
    endfun