Using Vim in Mail.app

classic Classic list List threaded Threaded
42 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Using Vim in Mail.app

Brian McKee

OK,  I'm using MacVim with Mail.app via the ODBeditor plugin.

It's working pretty well, except I thought I'd play with modelines a bit.
So -

1 - How do I get a specific set of settings when editing with Mail?
    Is there a filetype I can set somehow?
    I stuck a modeline in my 'Signatures' which seems to work fine,
but adds a line of  'gibberish' most people won't know what to make
of....

2 - (not MacVim specific)
    Does anybody have a great modeline/set of settings for doing email with Vim?

Comments appreciated,

Brian

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app

Robin-9

On Wed, Feb 27, 2008 at 7:46 PM, Brian McKee <[hidden email]> wrote:

>
>  OK,  I'm using MacVim with Mail.app via the ODBeditor plugin.
>
>  It's working pretty well, except I thought I'd play with modelines a bit.
>  So -
>
>  1 - How do I get a specific set of settings when editing with Mail?
>     Is there a filetype I can set somehow?
>     I stuck a modeline in my 'Signatures' which seems to work fine,
>  but adds a line of  'gibberish' most people won't know what to make
>  of....
>
>  2 - (not MacVim specific)
>     Does anybody have a great modeline/set of settings for doing email with Vim?

The ODB plugin seems to give the temporary file the extension of the
application name, so I use the following in my .vimrc:

"Mail file (for ODB editing)
autocmd BufRead,BufNewFile *.mail setfiletype mail

:he mail for details.

It is easy to set up mappings for quoting/unquoting etc (google for
vim mail I guess), but I haven't needed that since the reply is
already quoted in Mail.

HTH,

Robin

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app

Brian McKee

On Wed, Feb 27, 2008 at 2:51 PM, Robin <[hidden email]> wrote:

>
>
>  On Wed, Feb 27, 2008 at 7:46 PM, Brian McKee <[hidden email]> wrote:
>  >
>  >  OK,  I'm using MacVim with Mail.app via the ODBeditor plugin.
>  >  1 - How do I get a specific set of settings when editing with Mail?
>  >     Is there a filetype I can set somehow?
>  >     I stuck a modeline in my 'Signatures' which seems to work fine,
>  >  but adds a line of  'gibberish' most people won't know what to make
>  >  of....
>  The ODB plugin seems to give the temporary file the extension of the
>  application name, so I use the following in my .vimrc:
>  "Mail file (for ODB editing)
>  autocmd BufRead,BufNewFile *.mail setfiletype mail
>  :he mail for details.
>
>  It is easy to set up mappings for quoting/unquoting etc (google for
>  vim mail I guess), but I haven't needed that since the reply is
>  already quoted in Mail.
>
Awesome Robin - Thank you!

That gets me going without wrecking my .sig

Brian

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app

tachijuan
In reply to this post by Brian McKee

Forgive the rookie question, but exactly how do you do this? I would
love to use MacVim as my Mail.app editor.

Thanks!


On Feb 27, 2:46 pm, "Brian McKee" <[hidden email]> wrote:

> OK,  I'm using MacVim with Mail.app via the ODBeditor plugin.
>
> It's working pretty well, except I thought I'd play with modelines a bit.
> So -
>
> 1 - How do I get a specific set of settings when editing with Mail?
>     Is there a filetype I can set somehow?
>     I stuck a modeline in my 'Signatures' which seems to work fine,
> but adds a line of  'gibberish' most people won't know what to make
> of....
>
> 2 - (not MacVim specific)
>     Does anybody have a great modeline/set of settings for doing email with Vim?
>
> Comments appreciated,
>
> Brian
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app

travis jeffery

Install the ODBEditor: http://macvim.googlecode.com/files/ODBInputManager.tbz
and run the commands in the Read Me file, then restart or open
Mail.app and open the email with Control-Command-Shift-E.

On Feb 27, 4:24 pm, tachijuan <[hidden email]> wrote:

> Forgive the rookie question, but exactly how do you do this? I would
> love to use MacVim as my Mail.app editor.
> ,
> Thanks!
>
> On Feb 27, 2:46 pm, "Brian McKee" <[hidden email]> wrote:
>
> > OK,  I'm using MacVim with Mail.app via the ODBeditor plugin.
>
> > It's working pretty well, except I thought I'd play with modelines a bit.
> > So -
>
> > 1 - How do I get a specific set of settings when editing with Mail?
> >     Is there a filetype I can set somehow?
> >     I stuck a modeline in my 'Signatures' which seems to work fine,
> > but adds a line of  'gibberish' most people won't know what to make
> > of....
>
> > 2 - (not MacVim specific)
> >     Does anybody have a great modeline/set of settings for doing email with Vim?
>
> > Comments appreciated,
>
> > Brian
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app

Matrix Mole

On Wed, Feb 27, 2008 at 2:54 PM, travis <[hidden email]> wrote:
>
>  Install the ODBEditor: http://macvim.googlecode.com/files/ODBInputManager.tbz
>  and run the commands in the Read Me file, then restart or open
>  Mail.app and open the email with Control-Command-Shift-E.

I'm sure my answer could be answered if I download the plugin and
install it, but I figure it's easier to ask first. Does the ODBEditor
plugin only work with Mail.app, or could it be setup to work with any
application? Such as using thunderbird or editing the text messages in
adium, or possibly even editing form fields in safari or firefox. Or
was the plugin designed specifically for Mail.app?

Matrix Mole

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app

Robin-9

On Wed, Feb 27, 2008 at 11:33 PM, Matrix Mole <[hidden email]> wrote:

>
>  On Wed, Feb 27, 2008 at 2:54 PM, travis <[hidden email]> wrote:
>  >
>  >  Install the ODBEditor: http://macvim.googlecode.com/files/ODBInputManager.tbz
>  >  and run the commands in the Read Me file, then restart or open
>  >  Mail.app and open the email with Control-Command-Shift-E.
>
>  I'm sure my answer could be answered if I download the plugin and
>  install it, but I figure it's easier to ask first. Does the ODBEditor
>  plugin only work with Mail.app, or could it be setup to work with any
>  application? Such as using thunderbird or editing the text messages in
>  adium, or possibly even editing form fields in safari or firefox. Or
>  was the plugin designed specifically for Mail.app?

It's available (I believe) in any native Cocoa text widget. So Safari,
Mail etc. but not Firefox/Thunderbird. I just checked and it does work
in Adium too.

Robin

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app

Matrix Mole

On Wed, Feb 27, 2008 at 4:38 PM, Robin <[hidden email]> wrote:
>  It's available (I believe) in any native Cocoa text widget. So Safari,
>  Mail etc. but not Firefox/Thunderbird. I just checked and it does work
>  in Adium too.
>
>  Robin

That kinda sucks, although I know it's not the plugin editors fault,
but a fault of the developers of Firefox/Thunderbird :)

Guess it's time to bite the bullet and figure out how to use Mail.app
if I wish to have the power of vim as my text editor of choice.

On a related side note, I noticed that Safari also doesn't have the
Edit in MacVim menu option as well. in fact, each time I open safari
up, the edit menu option says "Edit in" then after that it has some
random string (first time it was (nextday), the second time it had
"2...", the third time it had a string of hex codes follow by ",60)"),
at no time does that menu option launch MacVim for me to edit any text
boxes on the page. So I'm thinking I either missed typed one of the
commands in the readme, or Safari doesn't like the Edit In ODBEditor
plugin all that much.

Matrix Mole

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app

Nico Weber-3
In reply to this post by travis jeffery

On 27.02.2008, at 22:54, travis wrote:

> On Feb 27, 4:24 pm, tachijuan <[hidden email]> wrote:
>> Forgive the rookie question, but exactly how do you do this? I would
>> love to use MacVim as my Mail.app editor.
>
> Install the ODBEditor: http://macvim.googlecode.com/files/ODBInputManager.tbz
> and run the commands in the Read Me file, then restart or open
> Mail.app and open the email with Control-Command-Shift-E.

Or wait for the next release, it'll probably include an installer for  
the input manager.

Nico


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app

Nico Weber-3
In reply to this post by Matrix Mole

> boxes on the page. So I'm thinking I either missed typed one of the
> commands in the readme, or Safari doesn't like the Edit In ODBEditor
> plugin all that much.

It works for me in Safari.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app

David Morel-4


Le 28 févr. 08 à 07:55, Nico Weber a écrit :

>
>> boxes on the page. So I'm thinking I either missed typed one of the
>> commands in the readme, or Safari doesn't like the Edit In ODBEditor
>> plugin all that much.
>
> It works for me in Safari.

Same here (works), Safari is Version 3.0.4 (5523.15) on OSX.5.2

DMorel


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app

Matrix Mole

On Thu, Feb 28, 2008 at 1:46 AM, Morel David <[hidden email]> wrote:

>
>
>  Le 28 févr. 08 à 07:55, Nico Weber a écrit :
>
>
>  >
>  >> boxes on the page. So I'm thinking I either missed typed one of the
>  >> commands in the readme, or Safari doesn't like the Edit In ODBEditor
>  >> plugin all that much.
>  >
>  > It works for me in Safari.
>
>  Same here (works), Safari is Version 3.0.4 (5523.15) on OSX.5.2

That's all I needed to hear. So it seems I made a minimal typo
somewhere that I'll have to track down. That's the only reason I can
come up with for it not working in my copy of safari (version 3.0.4
(523.12.2) on OSX 10.4.11). Since I don't use safari all that much,
I'm not too concerned about it (it works fine in other programs I've
tried it in).

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app and TeXShop

Axel Kielhorn
In reply to this post by Robin-9

Am 27.02.2008 um 20:51 schrieb Robin:

> The ODB plugin seems to give the temporary file the extension of the
> application name, so I use the following in my .vimrc:
>
> "Mail file (for ODB editing)
> autocmd BufRead,BufNewFile *.mail setfiletype mail
>
> :he mail for details.

After reading this I tried to define a similar command for TeXShop:

"TeX file from TeXShop
autocmd BufRead,BufNewFile *.texshop setfiletype tex

But TeXShop crashes the second time I open a file.

Clicking on a file starts TeXShop, shift-control-command-E starts Vim.
:wq goes back to TeXShop.
Command-W closes the window.
Clicking again on the file reopens the window, shift-control-command-E
crashes TeXShop.

Date/Time:      2008-02-28 18:33:30.262 +0100
OS Version:     10.4.11 (Build 8S2167)
Report Version: 4

Command: TeXShop
Path:    /Applications/TeX/TeXShop.app/Contents/MacOS/TeXShop
Parent:  WindowServer [59]

Version: 2.14-svn (2.14)

PID:    14930
Thread: 2

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_INVALID_ADDRESS (0x0001) at 0x24448900

(I can provide a full log.)

MacVim build this morning, ODBInputManager.tbz downloaded today.

System 10.4.11 on intel

Axel

PS: Edit in Mail works fine.



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app and TeXShop

Axel Kielhorn


Am 28.02.2008 um 18:36 schrieb Axel Kielhorn:

>
> Date/Time:      2008-02-28 18:33:30.262 +0100
> OS Version:     10.4.11 (Build 8S2167)
> Report Version: 4
>
> Command: TeXShop
> Path:    /Applications/TeX/TeXShop.app/Contents/MacOS/TeXShop
> Parent:  WindowServer [59]
>
> Version: 2.14-svn (2.14)
>
> PID:    14930
> Thread: 2
>
> Exception:  EXC_BAD_ACCESS (0x0001)
> Codes:      KERN_INVALID_ADDRESS (0x0001) at 0x24448900

I have to reply to myself:

When I start Camino it crashes with the same error.
When I start it a second time it shows "Edit in Status ..."
The third time this has changed to "Edit in (<NSAlert 0x19ba160>)

Maybe this helps.

Axel

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app and TeXShop

Robin-9
In reply to this post by Axel Kielhorn

On Thu, Feb 28, 2008 at 5:36 PM, Axel Kielhorn <[hidden email]> wrote:

>  After reading this I tried to define a similar command for TeXShop:
>
>  "TeX file from TeXShop
>  autocmd BufRead,BufNewFile *.texshop setfiletype tex
>
>  But TeXShop crashes the second time I open a file.
>
>  Clicking on a file starts TeXShop, shift-control-command-E starts Vim.
>  :wq goes back to TeXShop.
>  Command-W closes the window.
>  Clicking again on the file reopens the window, shift-control-command-E
>  crashes TeXShop.
>
>  Date/Time:      2008-02-28 18:33:30.262 +0100
>  OS Version:     10.4.11 (Build 8S2167)
>  Report Version: 4
>
>  Command: TeXShop
>  Path:    /Applications/TeX/TeXShop.app/Contents/MacOS/TeXShop
>  Parent:  WindowServer [59]
>
>  Version: 2.14-svn (2.14)
>
>  PID:    14930
>  Thread: 2
>
>  Exception:  EXC_BAD_ACCESS (0x0001)
>  Codes:      KERN_INVALID_ADDRESS (0x0001) at 0x24448900
>
>  (I can provide a full log.)
>
>  MacVim build this morning, ODBInputManager.tbz downloaded today.
>
>  System 10.4.11 on intel
>
>  Axel
>
>  PS: Edit in Mail works fine.

Sound like a bug in TeXShop (to do with input managers) rather than a Vim issue.

I wasn't sure what the significance of the autocommand was - does it
not happen if that autocommand isn't set? (I'd be surprised if that
was the case).

Robin

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app

Rainer Schmid
In reply to this post by Robin-9

Hi,

>  It's available (I believe) in any native Cocoa text widget. So Safari,
>  Mail etc. but not Firefox/Thunderbird. I just checked and it does work
>  in Adium too.

Yes, I noticed that too. I really like Camino (based on the Firefox
engine) and there it doesn't work either. Now I am thinking of
switching back to Safari. I also tried to figure out if it would be
possible to make it work for Camino (i.e. what control Camino is using
for text editing), but unfortunately I didn't get too far in
understanding the Firefox code.

But if you are using Firefox, the "It's All Text!" plugin
(http://addons.mozilla.org/en-US/firefox/addon/4125) seems to allow
you editing the text in vim -- but it probably doesn't work for
Camino.

Rainer

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app and TeXShop

Björn Winckler
In reply to this post by Axel Kielhorn

On 28/02/2008, Axel Kielhorn <[hidden email]> wrote:

>
>  Am 28.02.2008 um 18:36 schrieb Axel Kielhorn:
>
>
>  >
>  > Date/Time:      2008-02-28 18:33:30.262 +0100
>  > OS Version:     10.4.11 (Build 8S2167)
>  > Report Version: 4
>  >
>  > Command: TeXShop
>  > Path:    /Applications/TeX/TeXShop.app/Contents/MacOS/TeXShop
>  > Parent:  WindowServer [59]
>  >
>  > Version: 2.14-svn (2.14)
>  >
>  > PID:    14930
>  > Thread: 2
>  >
>  > Exception:  EXC_BAD_ACCESS (0x0001)
>  > Codes:      KERN_INVALID_ADDRESS (0x0001) at 0x24448900
>
>
> I have to reply to myself:
>
>  When I start Camino it crashes with the same error.
>  When I start it a second time it shows "Edit in Status ..."
>  The third time this has changed to "Edit in (<NSAlert 0x19ba160>)
>
>  Maybe this helps.

I haven't looked at the input manager code much so I can't really say
anything about this.  It would be great if you could try to debug this
problem somehow though.  The source code for the input manager is in
the Git repo now so it should be possible to add some NSLogs here and
there to see what is going on.  I've not experienced any crashes with
the input manager myself.

/Björn

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app and TeXShop

Nico Weber-3
In reply to this post by Axel Kielhorn

> When I start Camino it crashes with the same error.

In Camino, I can use the input manager only with the url bar. Forms in  
web pages are no NSTextFields in Camino, so the input manager  
shouldn't work there at all.

Nico

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app and TeXShop

Axel Kielhorn
In reply to this post by Björn Winckler


Am 01.03.2008 um 16:44 schrieb björn:

> I haven't looked at the input manager code much so I can't really say
> anything about this.  It would be great if you could try to debug this
> problem somehow though.  The source code for the input manager is in
> the Git repo now so it should be possible to add some NSLogs here and
> there to see what is going on.  I've not experienced any crashes with
> the input manager myself.
>
> /Björn

After experiencing crashes with Cyberduck and Safari I removed the  
Inputmanager completely.
I'll get the repo and have a look.

Axel
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Using Vim in Mail.app and TeXShop

Axel Kielhorn


Am 02.03.2008 um 09:06 schrieb Axel Kielhorn:

> After experiencing crashes with Cyberduck and Safari I removed the
> Inputmanager completely.
> I'll get the repo and have a look.
>

Back again with the new version from the repo and installed it via the
preference dialog.

Goog news:
It doesn't crash Safari and Cyberduck on startup.
TeXShop weems to work.
Bad News:
Safari shows: Edit in (1000)
Cyberduck shows Edit in nl_NL
Camino shows Edit in heute (and crashes)

This text is written in MacVim, at least that works fine.

Axel


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

123