This forum has been archived. All content is frozen. Please use KDE Discuss instead.

kmail with gvim as external editor

Tags: None
(comma "," separated)
Sorlingues
Registered Member
Posts
5
Karma
0
OS

kmail with gvim as external editor

Mon Oct 01, 2012 4:18 pm
Hello,

I want to use gVim as an external editor in kmail.
To do that, I put
Code: Select all
gvim -f %f
in the appropriate field in the kmail configuration window.
(The -f option in gvim is needed to tell gvim not to open in the background.)

It works pretty well but... I would like to pass certain options to Vim (that would take precedence over my vimrc).
The following syntax in a terminal works well
Code: Select all
gvim "+set ft=mail tw=72" -f file.txt

but if I put
Code: Select all
gvim "+set ft=mail tw=72" -f %f
in the kmail configuration field, I cannot edit my message :
instead of opening a temp file, gvim opens a new file named « "+set » (it also opens a correct temp file in another buffer but that's useless since the options I passed are not recognised).

The equivalent command
Code: Select all
gvim -c "set ft=mail tw=72" -f %f
doesn't work either and opens a file named « ft=mail ».
This is not a gvim problem, as I said before, the command works as it should in konsole. The problem is the way that kmail interprets it.

Any idea as to what command I should use in the kmail configuration field instead ?

Thanks
Sorlingues
Registered Member
Posts
5
Karma
0
OS
Oh, never mind.
There is a way around this : I created a special vimrc file for kmail containing all the options I want
then used the command
Code: Select all
gvim -U that_special_vimrc_file_for_kmail -f %f

in the kmail configuration field.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]