Quotes

This is a discussion on Quotes within the Mutt forums in Other Technologies category; Hi there, I would like to set my editor to open -a "/opt/Vim.app/ -c 'set tabstop=2 expandtab lines=36 columns=80' -c ':silent! /^> -- $/,\$-1d' -c ':normal GO'" but I don't get the quotes right. Does anyone see thru this mess? -Andre...

Go Back   Application Development Forum > Other Technologies > Mutt

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 04-22-2004, 08:01 AM
Andre Berger
Guest
 
Default Quotes

Hi there,

I would like to set my editor to

open -a "/opt/Vim.app/ -c 'set tabstop=2 expandtab lines=36 columns=80' -c ':silent! /^> -- $/,\$-1d' -c ':normal GO'"

but I don't get the quotes right. Does anyone see thru this mess?

-Andre
Reply With Quote
  #2  
Old 04-22-2004, 05:12 PM
Luc Hermitte
Guest
 
Default Re: Quotes

Hello,

Andre Berger <andre.berger@web.de> wrote in
news:20040422120151.GB4137@hvk.local:

> I would like to set my editor to
>
> open -a "/opt/Vim.app/ -c 'set tabstop=2 expandtab lines=36
> columns=80' -c ':silent! /^> -- $/,\$-1d' -c ':normal GO'"
>
> but I don't get the quotes right. Does anyone see thru this mess?


Why don't you define a mail-ftplugin for vim ?

--
Luc Hermitte
http://hermitte.free.fr/vim/mail.php
Reply With Quote
  #3  
Old 04-23-2004, 01:55 PM
Andre Berger
Guest
 
Default Re: Quotes

* Luc Hermitte <hermitte@free.fr.invalid>, 2004-04-23 09:28 +0200:
> Hello,
>
> Andre Berger <andre.berger@web.de> wrote in
> news:20040422120151.GB4137@hvk.local:
>
> > I would like to set my editor to
> >
> > open -a "/opt/Vim.app/ -c 'set tabstop=2 expandtab lines=36
> > columns=80' -c ':silent! /^> -- $/,\$-1d' -c ':normal GO'"
> >
> > but I don't get the quotes right. Does anyone see thru this mess?

>
> Why don't you define a mail-ftplugin for vim ?


Because I don't know how. I mean I could simply add the "set.."
options to the original mail.vim ftplugin, but I wouldn't know what
to do with the editing commands.

-Andre
Reply With Quote
  #4  
Old 04-23-2004, 09:07 PM
Gary Johnson
Guest
 
Default Re: Quotes

Andre Berger <andre.berger@web.de> wrote:
> * Luc Hermitte <hermitte@free.fr.invalid>, 2004-04-23 09:28 +0200:
>> Hello,
>>
>> Andre Berger <andre.berger@web.de> wrote in
>> news:20040422120151.GB4137@hvk.local:
>>
>> > I would like to set my editor to
>> >
>> > open -a "/opt/Vim.app/ -c 'set tabstop=2 expandtab lines=36
>> > columns=80' -c ':silent! /^> -- $/,\$-1d' -c ':normal GO'"
>> >
>> > but I don't get the quotes right. Does anyone see thru this mess?

>>
>> Why don't you define a mail-ftplugin for vim ?

>
> Because I don't know how. I mean I could simply add the "set.."
> options to the original mail.vim ftplugin, but I wouldn't know what
> to do with the editing commands.


Some of this is explained in the vim manual under

:help ftplugin-overrule

In this case, you would create a file named

~/.vim/after/ftplugin/mail.vim

and put your commands in it like this:

setlocal tabstop=2 expandtab lines=36 columns=80
silent! /^> -- $/,$-1d
normal GO

If you want to be in insert mode when the file is opened, you can
add this line to the end of the file as well.

startinsert!

HTH,
Gary
Reply With Quote
  #5  
Old 04-24-2004, 10:37 AM
Andre Berger
Guest
 
Default Re: Quotes

* Gary Johnson <garyjohn@spk.agilent.com>, 2004-04-24 15:42 +0200:
> Andre Berger <andre.berger@web.de> wrote:
> > * Luc Hermitte <hermitte@free.fr.invalid>, 2004-04-23 09:28 +0200:
> >> Hello,
> >>
> >> Andre Berger <andre.berger@web.de> wrote in
> >> news:20040422120151.GB4137@hvk.local:
> >>
> >> > I would like to set my editor to
> >> >
> >> > open -a "/opt/Vim.app/ -c 'set tabstop=2 expandtab lines=36
> >> > columns=80' -c ':silent! /^> -- $/,\$-1d' -c ':normal GO'"
> >> >
> >> > but I don't get the quotes right. Does anyone see thru this mess?
> >>
> >> Why don't you define a mail-ftplugin for vim ?

> >
> > Because I don't know how. I mean I could simply add the "set.."
> > options to the original mail.vim ftplugin, but I wouldn't know what
> > to do with the editing commands.

>
> Some of this is explained in the vim manual under
>
> :help ftplugin-overrule
>
> In this case, you would create a file named
>
> ~/.vim/after/ftplugin/mail.vim
>
> and put your commands in it like this:
>
> setlocal tabstop=2 expandtab lines=36 columns=80
> silent! /^> -- $/,$-1d
> normal GO
>
> If you want to be in insert mode when the file is opened, you can
> add this line to the end of the file as well.
>
> startinsert!
>
> HTH,
> Gary


It does help, Gary, I aprreciate it! The ftplugin-docs are quite hard
(for me) to understand, so I'm very happy to have this example that
even does exactly what I want!

-Andre
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 04:29 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.