]> git.deb.at Git - pkg/abook.git/blob - contrib/abook+vim/README
Merge remote-tracking branch 'upstream/master' into upstream
[pkg/abook.git] / contrib / abook+vim / README
1 NOTE: There's no need to patch abook version 0.4.14 or later.
2 NOTE2: The command in abook is 'Q' not 'P'.
3
4 --- Original message from Brian Medley <brian.medley@verizon.net> ---
5 Hi,
6
7 I am trying to make abook work better (for me) within vim.  I am doing
8 this because I have 'autoedit' and 'edit_headers' set in mutt.  This
9 means I would like to have easy access to my abook addressbook (from
10 within the editor).
11
12 To accomplish this I have written a vim plugin (it will need vim 6.0)
13 and have patched abook.  Both are included.  The patch is against abook
14 0.4.13.
15
16 Amongst other things, they allow me to obtain an address listing from
17 abook and perform a mutt query using abook.  Below is an example.
18
19 Suppose I have the following line (the cursor is at the caret):
20     To: 
21         ^
22 I can now hit '\al' to lauch abook.  Once inside, I can highlight the
23 people I want to email.  Then I hit 'P'.  Their email addresses now
24 appear.  Next, suppose I have:
25     To: john
26             ^
27 My plugin allows the command '\aq' to perform an alias mutt query using
28 abook.  It uses the word under the cursor, so "john" will be looked up
29 inside of abook.  Next, his email address will appear.  
30
31 Summary:
32     \aq => alias query
33     \al => alias list
34
35 Note:
36     - \ is actually LocalLeader
37     - I am aware that abook can do these things from within *mutt*, but
38       I want to do them from within vim.
39     - This plugin does other stuff, as well (like deleting signatures,
40       and positioning the cursor when you start) because I stole code
41       from Cedric Duval's mail vimrc.
42     - Improvements / comments are welcome.
43
44 Todo:
45     - Documentation :)
46     - I tried to write this so that another alias query program could be
47       used (e.g. ldap), but I have not implemented this.  
48
49 Bugs:
50     - I had trouble getting this to work in gvim.  I used vim in a
51       console.
52
53 Basic Installation:
54     - patch and install abook
55     - place the mail.vim plugin in ~/.vim/after/ftplugin
56
57 --- ---