| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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 |
|
#2
| |||
| |||
| 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 |
|
#3
| |||
| |||
| * 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 |
|
#4
| |||
| |||
| 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 |
|
#5
| |||
| |||
| * 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 |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.