On 2009-10-23, Trey Sizemore <[email protected]> wrote:
> I have my editor setup as vim in my .muttrc and set to insert the cursor
> on new mails and replies below the headers. But with this being vim 7
> and spell check built in, I wanted to use that as well. So below are my
> .muttrc entries for editor (the first commented out entry being the one
> that does the desired cursor placement and the second being the one that
> gets spell check working).
>
> What is the correct syntax to combine these in one entry so I can get
> both cursor placement *and* spell check?
Apparently you forgot to include your .muttrc entries.
You can use the -c option multiple times, so you can follow whatever
options you used to place the cursor with
-c 'set spell'
or
-c "set spell"
depending on how you're quoting the 'editor' value. For example
(untested):
set editor='vim +/^$ -c "set spell"'
Instead of setting vim options such as 'spell' in your .muttrc, you
might consider putting those options in a vim filetype plugin file.
To do that, make sure your .vimrc has a line like this:
filetype plugin on
Then create a file named ~/.vim/after/ftplugin/mail.vim and
containing this line:
setlocal spell
Doing all that for one vim setting might not be worth the trouble,
but it's a nicer way to manage multiple mail-only settings.
HTH,
Gary