parameters to editor (F4)

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
soreno
Junior Member
Junior Member
Posts: 87
Joined: 2003-02-13, 13:04 UTC
Location: Denmark

parameters to editor (F4)

Post by *soreno »

I specify my editor here:
configuration -> options -> edit/view -> editor for F4
~
Editor = C:\Program Files\total commander\vim61\gvim.exe

I was wondering if it was possible to give parameters to the editor.

I have tried:
Editor = C:\Program Files\total commander\vim61\gvim.exe -y
Editor = C:\Program Files\total commander\vim61\gvim.bat

Where gvim.bat contains:
gvim.exe -y %1

But it doesn't work.. :(

Does anyone know how to get it working / is it possible ?
User avatar
Aezay
Senior Member
Senior Member
Posts: 269
Joined: 2003-02-12, 07:27 UTC
Location: Denmark
Contact:

Post by *Aezay »

Not sure if it works, I haven't tested it, but what if u quote the path to the file?

"C:\Program Files\total commander\vim61\gvim.exe" -y
Of all the planets I've been to, this one is my favorite.
User avatar
soreno
Junior Member
Junior Member
Posts: 87
Joined: 2003-02-13, 13:04 UTC
Location: Denmark

Post by *soreno »

Nope - does not work, but thanks for trying :D
User avatar
Valentino
Power Member
Power Member
Posts: 706
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

2soreno
I tried this and found out that in case of your first variant (Editor = C:\Program Files\total commander\vim61\gvim.exe -y) TC passes short form (DOS) of file path, i.e. your editor receives the following command line parameters:
Total Commander through command line wrote:-y c:\progra~1\somedi~1\somefile.txt
Make sure your editor "understands" short paths.
TucknDar
Senior Member
Senior Member
Posts: 227
Joined: 2003-02-07, 09:44 UTC
Location: Oslo
Contact:

Post by *TucknDar »

you could always put it in the startmenu, and then bind a hotkey to it using cm_usermenuX
license #76904
User avatar
soreno
Junior Member
Junior Member
Posts: 87
Joined: 2003-02-13, 13:04 UTC
Location: Denmark

Post by *soreno »

Valentino >> The editor works fine when not specifying params.
User avatar
Black Dog
Power Member
Power Member
Posts: 1024
Joined: 2003-02-05, 22:17 UTC
Location: Odessa
Contact:

Post by *Black Dog »

[face=courier]On 25-02-2003 12:17:04 +0000 TucknDar wrote:

T> you could always put it in the startmenu, and
T> then bind a hotkey to it using cm_usermenuX


It wouldn't work inside archives.[/face]
TucknDar
Senior Member
Senior Member
Posts: 227
Joined: 2003-02-07, 09:44 UTC
Location: Oslo
Contact:

Post by *TucknDar »

It wouldn't work inside archives.
hmmm... consider it a feature-request, then ;)
license #76904
User avatar
Black Dog
Power Member
Power Member
Posts: 1024
Joined: 2003-02-05, 22:17 UTC
Location: Odessa
Contact:

Post by *Black Dog »

[face=courier]On 25-02-2003 18:11:04 +0000 TucknDar wrote:

T> hmmm... consider it a feature-request, then ;)

Well, I would but I'm not quite sure about Christian ;).[/face]
User avatar
fnheiden
Senior Member
Senior Member
Posts: 234
Joined: 2003-02-16, 12:06 UTC
Location: Dresden, Germany
Contact:

Post by *fnheiden »

2soreno
Did you move the gvim installation folder?

~ Florian
User avatar
fnheiden
Senior Member
Senior Member
Posts: 234
Joined: 2003-02-16, 12:06 UTC
Location: Dresden, Germany
Contact:

Post by *fnheiden »

Do you have a file called evim.vim in C:\Program Files\total commander\vim61\ ?
This file gets parsed, when the -y command line parameter is specified. If this file is not present, gvim skips back to normal mode.

Works fine for me ...

~ Florian
User avatar
soreno
Junior Member
Junior Member
Posts: 87
Joined: 2003-02-13, 13:04 UTC
Location: Denmark

Post by *soreno »

fnheiden >> Yes, I know about evim.vim.
I have solved my initial problem by adding "set insertmode " in my ".vimrc" (start in insert mode). But thanks for your reply anyway - it's always nice to hear from others who know vim :)
User avatar
soreno
Junior Member
Junior Member
Posts: 87
Joined: 2003-02-13, 13:04 UTC
Location: Denmark

Post by *soreno »

My problem is solved - but still, the question remains unanswered.

Is it possible to give parameters to the editor ?
Geoffrey
Junior Member
Junior Member
Posts: 73
Joined: 2003-02-11, 10:53 UTC
Location: France/Belgium
Contact:

Post by *Geoffrey »

soreno wrote:Is it possible to give parameters to the editor ?
AFAIK, yes, it is possible. Under Windows (2000), I use XEmacs as editor, associated to F4 on my TC config, and I can specify the location of my .emacs file via the -l option.

BTW, I'm a vim fan under Linux ;)

Regards,
Geoffrey
User avatar
soreno
Junior Member
Junior Member
Posts: 87
Joined: 2003-02-13, 13:04 UTC
Location: Denmark

Post by *soreno »

Geoffrey >> Could you paste your "wincmd.ini" -> "[Configuration]" -> "editor=" line ?

Like:
editor=C:\Program Files\total commander\vim61\gvim.exe


I think that xemacs is far to slow to start up (comparing to gvim - which is ready instantly after pressing F4) 8)
Post Reply