Using VIM as the external editor

You have encountered a problem using Far Manager? Here you can get help.
zippy1981
Posts: 38
Joined: Thu 17 Jun, 2010 22:14

Using VIM as the external editor

Post by zippy1981 »

I am having trouble setting it up right. I am looking for some assistance. I have asked on superuser.com and have gotten no responses.

http://superuser.com/questions/206991/w ... farmanager

Any help appreciated.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: Using VIM as the external editor

Post by NightRoman »

I would try to answer there (it's nice that you opened the farmanager tag) but your problem is not clear.

Just to be sure: what are you trying to do: open a single file or several selected files? `!@AFQ!` is about several selected files which names are written to a temp file X. Name X is sent to Vim in the command line. File X contains selected file names, quoted(!), I have just checked this. Everything looks right. So, what is wrong in your case?
User avatar
t-rex
Страшный и ужасный
Posts: 4910
Joined: Tue 15 Mar, 2005 16:17
Location: Tel-Aviv
Has thanked: 1 time
Been thanked: 8 times
Contact:

Re: Using VIM as the external editor

Post by t-rex »

vim "!.!"
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: Using VIM as the external editor

Post by NightRoman »

No, he wants a list of selected files with full paths. I think there is no such a feature of special symbols. At least I am not aware of it. Perhaps I miss something obvious in the help topic.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: Using VIM as the external editor

Post by NightRoman »

The solution found so far is to use the PowerShellFar command:

Code: Select all

>: & vim @(Get-FarPath -Selected) #
zippy1981
Posts: 38
Joined: Thu 17 Jun, 2010 22:14

Re: Using VIM as the external editor

Post by zippy1981 »

Thanks everyone for their help. I ended up selecting NightRoman's powershell answer on StackOverflow.

Should I make a feature request for a symbol that does what the powershell solution does?

Also I retagged my question with the existing far-manager tag. Someone with enough reputation should add a wiki to that tag:
http://superuser.com/questions/tagged/far-manager

Justin
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: Using VIM as the external editor

Post by NightRoman »

zippy1981 wrote:Should I make a feature request for a symbol that does what the powershell solution does?
Anybody can make any feature request, see Mantis the bug-tracker. I think this feature might be useful, at least for completeness of special symbols. But it's up to the team indeed to decide when and how to respond, there are many requests and important issues/bugs, too. Another option is to implement it and propose the changes to the team; it's open source after all.
zippy1981
Posts: 38
Joined: Thu 17 Jun, 2010 22:14

Re: Using VIM as the external editor

Post by zippy1981 »

NightRoman wrote:Anybody can make any feature request, see Mantis the bug-tracker. I think this feature might be useful, at least for completeness of special symbols.
I made ther request. http://bugs.farmanager.com/view.php?id=1585
User avatar
Raistlin
Posts: 750
Joined: Wed 16 Mar, 2005 16:01
Has thanked: 3 times
Been thanked: 1 time

Re: Using VIM as the external editor

Post by Raistlin »

zippy1981
Haven't you considered a possiblility to run vim not directly but from a batch file? You'd be able to get full paths of files you want to edit. And much more.
Last edited by Raistlin on Tue 18 Jan, 2011 21:30, edited 1 time in total.
Magically yours
Raistlin
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: Using VIM as the external editor

Post by NightRoman »

Raistlin wrote:zippy1981
Haven't you considered a possiblility to run vim not directly but from a batch file? You'd be able to get full pathes of files you want to edit. And much more.
If you know the solution then it would be better to just show it than to talk in riddles. For example I am interested, too. But I do not quite see what you mean.
User avatar
HaRT
Moderator
Posts: 10866
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times

Re: Using VIM as the external editor

Post by HaRT »

NightRoman
I believe Raistlin means something like called
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
Raistlin
Posts: 750
Joined: Wed 16 Mar, 2005 16:01
Has thanked: 3 times
Been thanked: 1 time

Re: Using VIM as the external editor

Post by Raistlin »

HaRT
Actually, I meant the less effective way, yours is better. But we must take into account that files could contain '!' in their names.
Last edited by Raistlin on Thu 01 Jan, 1970 01:00, edited 0 times in total.
Reason: Исправлено форматирование кода
Magically yours
Raistlin
User avatar
HaRT
Moderator
Posts: 10866
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times

Re: Using VIM as the external editor

Post by HaRT »

Raistlin wrote:files could contain '!' in their names
Yes, my script fails for files with ‘!’ in their names, whereas yours fails for those with ‘%’. :-o
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
Raistlin
Posts: 750
Joined: Wed 16 Mar, 2005 16:01
Has thanked: 3 times
Been thanked: 1 time

Re: Using VIM as the external editor

Post by Raistlin »

HaRT wrote:Yes, my script fails for files with ‘!’ in their names, whereas yours fails for those with ‘%’. :-o
To do this using just cmd.exe is the question of principle, definitely!

:crazy:
Magically yours
Raistlin
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Re: Using VIM as the external editor

Post by NightRoman »

Thanks, guys. It really looks good.

At the same time I have to admit that the request at Mantis still makes a lot of sense. What you both suggest is not practically possible to invent for the most of users on their own. That's where Far Manager should help with special symbols for command lines.
Post Reply

Return to “Support and Troubleshooting”