himalaya/vim
Axel Dahlberg 8a617c314e
add flag to enable telescope preview and to choose picker (#97)
* Flags to enable telescope preview and to choose picker

* 4 spaces -> 2 space lua

* changes to align with repo code-style
2021-04-13 17:10:42 +02:00
..
autoload/himalaya add flag to enable telescope preview and to choose picker (#97) 2021-04-13 17:10:42 +02:00
doc import vim plugin 2021-04-03 12:12:26 +02:00
ftplugin add telescope support 2021-04-05 23:57:01 +02:00
lua/himalaya add flag to enable telescope preview and to choose picker (#97) 2021-04-13 17:10:42 +02:00
plugin import vim plugin 2021-04-03 12:12:26 +02:00
syntax release v0.2.5 2021-04-12 00:21:08 +02:00
README.md add telescope support 2021-04-05 23:57:01 +02:00

📫 Himalaya.vim

Vim plugin for Himalaya CLI email client.

image

Table of contents

Motivation

Bringing emails to the terminal is a pain. The mainstream TUI, (neo)mutt, takes time to configure. The default mapping is not intuitive when coming from the Vim environment. It is even scary to use at the beginning, since you are dealing with sensitive data!

The aim of Himalaya is to extract the email logic into a simple (yet solid) CLI API that can be used either directly from the terminal or UIs. It gives users more flexibility.

This Vim plugin is a TUI implementation for Himalaya CLI.

Installation

First you need to install and configure the himalaya CLI. Then you can install this plugin with your favorite plugin manager. For example with vim-plug, add to your .vimrc:

Plug 'soywod/himalaya', {'rtp': 'vim'}

Then:

:PlugInstall

Usage

List messages view

:Himalaya

gif

Function Default binding
Change the current mbox gm
Show previous page gp
Show next page gn
Read focused msg <Enter>
Write a new msg gw
Reply to the focused msg gr
Reply all to the focused msg gR
Forward the focused message gf
Download all focused msg attachments ga

They can be customized:

nmap gm   <plug>(himalaya-mbox-input)
nmap gp   <plug>(himalaya-mbox-prev-page)
nmap gn   <plug>(himalaya-mbox-next-page)
nmap <cr> <plug>(himalaya-msg-read)
nmap gw   <plug>(himalaya-msg-write)
nmap gr   <plug>(himalaya-msg-reply)
nmap gR   <plug>(himalaya-msg-reply-all)
nmap gf   <plug>(himalaya-msg-forward)
nmap ga   <plug>(himalaya-msg-attachments)

List mailboxes

Default behaviour (basic prompt):

screenshot

With telescope support:

screenshot

With fzf support:

screenshot

Read message view

gif

Function Default binding
Write a new msg gw
Reply to the msg gr
Reply all to the msg gR
Forward the message gf
Download all msg attachments ga

They can be customized:

nmap gw <plug>(himalaya-msg-write)
nmap gr <plug>(himalaya-msg-reply)
nmap gR <plug>(himalaya-msg-reply-all)
nmap gf <plug>(himalaya-msg-forward)
nmap ga <plug>(himalaya-msg-attachments)

Write message view

gif

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

  • Send: sends the message
  • Draft: saves the message into the Drafts mailbox
  • Quit: quits the buffer without saving
  • Cancel: goes back to the message edition

Credits