Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes every weekday Monday through Friday.
This page was generated by The HPR Robot at


hpr3848 :: Editing Thunderbird email filters using vim.

Sgoti uses vim sessions to quickly edit his email filters.

<< First, < Previous, , Latest >>

Thumbnail of Some Guy On The Internet
Hosted by Some Guy On The Internet on 2023-05-03 is flagged as Clean and is released under a CC-BY-SA license.
Thunderbird, Vim, Email Filters. 1.
The show is available on the Internet Archive at: https://archive.org/details/hpr3848

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:30:45

general.

Prerequisites:

  • Backups of ALL your data (especially your Thunderbird directory).
  • Confirm your backups are working as expected.
  • Vim text editor installed with at least a basic/novice level knowledge of vim.
  • Thunderbird email client installed with at least a basic/novice level knowledge of the Thunderbird email client.
  • Web browser (preferably Firefox).

Thunderbird Directories.

I’m on a GNU/Linux system (Pop_OS!) and I have Thunderbird installed via the apt system package manager (.deb).

  • System package manager install.
    • $HOME/.thunderbird/
  • Snap package manager install.
    • $HOME/snap/.thunderbird/
  • Flatpak package manager install.
    • $HOME/.var/.thunderbird/
  • Windows 10 install.
    • C:\Users\your-account\AppData\Roaming\Thunderbird\
  • Your Thunderbird email filters are located in this subdirectory (msgFilterRules.dat).
    • $HOME/.thunderbird/*.default-release/ImapMail/imap.email-accounts.com/msgFilterRules.dat

Vim Directories.

I’ve created subdirectories within $HOME/.config/ as a place to store my vim sessions. You may not have these directories on your system, but you can create them using the mkdir command.

  • $HOME/.config/vim/sessions/session-files-here.vim

Vim session file.

I’ve created session files for purposes of editing my Thunderbird email filters. This session only stores the shortcuts needed to make flawless edits to my email filters. I will share them with you.

nnoremap <leader>1 2dw$x0:s/ OR /\rOR /g<CR>
nnoremap <leader>2 Icondition="<Esc>A"<Esc>0:s/ "$/"/<CR>
nnoremap <leader>n1 gg0VG:s/$/ /<CR>gg0VG:s/  *$/ /<CR>gg0
nnoremap <leader>s1 gg02f,<C-v>G$ugg02f,<C-v>G$:sort u<CR>gg0

Web sources.

Creative work License.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.


Comments

Subscribe to the comments RSS feed.

Comment #1 posted on 2023-05-01 17:37:13 by Some Guy On the Internet

Live streamed the process.

I've also streamed a Thunderbird client config and the vim filter editing on youtube (CC-BY-SA). The vim editing start around 1:11:35 in the video.

https://www.youtube.com/live/AvgNtZ7Bfcc?feature=share

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Title:
Comment:
Anti Spam Question: What does the letter P in HPR stand for?
Are you a spammer?
What is the HOST_ID for the host of this show?
What does HPR mean to you?