Vim plugin for email management.
fix post write hook not executed when last window
afe37d38 — tower2149.aic a month ago
Fix the bug that prevent opening email
effb334b — Johannes Thyssen Tishman a month ago
Allow user to customize HimalayaUnseen hl-group



You can also use your local clone with git send-email.

#📫 Himalaya Vim

Vim front-end for the email client Himalaya CLI.


First you need to install and configure the Himalaya CLI. Then you can install this plugin with your favorite plugin manager:

#Using packer

use "https://git.sr.ht/~soywod/himalaya-vim"

#Using vim-plug

Plug 'https://git.sr.ht/~soywod/himalaya-vim'


It is highly recommanded to have those Vim options on:

syntax on
filetype plugin on
set hidden


Defines a custom path for the himalaya binary. Defaults to himalaya.


Override the default TOML configuration file.


Defines the provider used for selecting folders (default keybind: gm):

If no value given, the first loaded (and available) provider will be used (telescope > fzf > native).

let g:himalaya_folder_picker = 'native' | 'fzf' | 'telescope'


Enables folder preview when picking a folder with the telescope.nvim provider.

let g:himalaya_folder_picker_telescope_preview = 1


Defines the command to use for contact completion. When this is set, completefunc will be set when composing emails so that contacts can be completed with <C-x><C-u>.

The command must print each possible result on its own line. Each line must contain tab-separated fields; the first must be the email address, and the second, if present, must be the name. %s in the command will be replaced with the search query.

let g:himalaya_complete_contact_cmd = '<your completion command>'


#Folder listing

With the native picker (default):


With the telescope.nvim picker:


With the fzf.vim picker:


#Envelope listing, filtering and sorting

Function Keybind
Change the current folder gm
Show previous page gp
Show next page gn
Read email under cursor <Enter>
Write a new email gw
Reply to the email under cursor gr
Reply all to the email under cursor gR
Forward the email under cursor gf
Download all attachments of email under cursor ga
Copy the email under cursor gC
Move the email under cursor gM
Delete email(s) under cursor or visual selection gD
Filter and sort envelopes according to the given query g/

Keybinds can be customized:

nmap gm   <plug>(himalaya-folder-select)
nmap gp   <plug>(himalaya-folder-select-previous-page)
nmap gn   <plug>(himalaya-folder-select-next-page)
nmap <cr> <plug>(himalaya-email-read)
nmap gw   <plug>(himalaya-email-write)
nmap gr   <plug>(himalaya-email-reply)
nmap gR   <plug>(himalaya-email-reply-all)
nmap gf   <plug>(himalaya-email-forward)
nmap ga   <plug>(himalaya-email-download-attachments)
nmap gC   <plug>(himalaya-email-copy)
nmap gM   <plug>(himalaya-email-move)
nmap gD   <plug>(himalaya-email-delete)
nmap g/   <plug>(himalaya-set-list-envelopes-query)

Note: see the documentation for more detailed information about the query API.

#Message reading

Function Keybind
Write a new email gw
Reply to the email gr
Reply all to the email gR
Forward the email gf
Download all email attachments ga
Copy the email gC
Move the email gM
Delete the email gD

Keybinds can be customized:

nmap gw <plug>(himalaya-email-write)
nmap gr <plug>(himalaya-email-reply)
nmap gR <plug>(himalaya-email-reply-all)
nmap gf <plug>(himalaya-email-forward)
nmap ga <plug>(himalaya-email-download-attachments)
nmap gC <plug>(himalaya-email-copy)
nmap gM <plug>(himalaya-email-move)
nmap gD <plug>(himalaya-email-delete)

#Message writing

Function Keybind
Add attachment ga

Keybinds can be customized:

nmap ga <plug>(himalaya-email-add-attachment)

When you exit this special buffer, you will be prompted 4 choices:

  • send: sends the email
  • draft: saves the email locally
  • quit: quits the buffer without saving
  • cancel: goes back to the email edition


The development environment is managed by Nix. Running nix-shell will spawn a shell with everything you need to get started with this plugin:

# starts a nix shell
$ nix-shell

# starts Vim and the :Himalaya command
$ vim +Himalaya

# starts Neovim and the :Himalaya command
$ nvim +Himalaya


A bug tracker is available on SourceHut. [send an email]

A mailing list is available on SourceHut. [send an email] [subscribe] [unsubscribe]

If you want to report a bug, please send an email at ~soywod/pimalaya@todo.sr.ht.

If you want to propose a feature or fix a bug, please send a patch at ~soywod/pimalaya@lists.sr.ht. The simplest way to send a patch is to use git send-email, follow this guide to configure git properly.

If you just want to discuss about the project, feel free to join the Matrix workspace #pimalaya.himalaya or contact me directly @soywod. You can also use the mailing list.



Special thanks to the NLnet foundation and the European Commission that helped the project to receive financial support from:

If you appreciate the project, feel free to donate using one of the following providers:

GitHub PayPal Ko-fi Buy Me a Coffee Liberapay