himalaya/vim
Clément DOUIN b7d068c729
improve folder struct + msg management (#217)
* make imap list and search return msg instead of fetch

* move imap logouts to main fn

* improve list command

* improve search command

* improve flags command

* improve template reply

* improve tpl forward command

* refactor tpl and msg reply/forward

* refactor copy, move and write commands

* refactor attachment command

* fix attachment part of copy and move commands

* fix send, save, read and mbox

* put back notify and watch commands

* fix msg encoding

* refactor edit choices, clean dead code

* fix attachment for write, reply and forward commands

* refactor config mod struct

* refactor project folder struct

* fix vim plugin (#215)
2021-10-10 22:58:57 +02:00
..
autoload/himalaya improve folder struct + msg management (#217) 2021-10-10 22:58:57 +02:00
doc fix vim help doc (#117) 2021-05-09 17:15:29 +02:00
ftplugin improve folder struct + msg management (#217) 2021-10-10 22:58:57 +02:00
lua/himalaya add ability to change account vim plugin (#91) 2021-06-03 16:08:03 +02:00
plugin restore cpo vim plugin 2021-09-11 00:51:25 +02:00
syntax add ability to change account vim plugin (#91) 2021-06-03 16:08:03 +02:00
README.md update vim readme with new mappings and options 2021-05-08 22:27:12 +02:00

Vim plugin

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

It is highly recommanded to have this option on:

set hidden

Configuration

Mailbox picker provider

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

Defines the provider used for picking mailboxes:

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

telescope > native).

Telescope preview

let g:himalaya_telescope_preview_enabled = 0

Should enable telescope preview when picking a mailbox with the telescope provider.

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 attachments from focused message ga
Copy the focused message gC
Move the focused message gM
Delete the focused message(s) gD

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)
nmap gC   <plug>(himalaya-msg-copy)
nmap gM   <plug>(himalaya-msg-move)
nmap gD   <plug>(himalaya-msg-delete)

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
Copy the message gC
Move the message gM
Delete the message gD

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)
nmap gC <plug>(himalaya-msg-copy)
nmap gM <plug>(himalaya-msg-move)
nmap gD <plug>(himalaya-msg-delete)

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