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 » Sat 06 Nov, 2010 02:55

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: 5904
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: Using VIM as the external editor

Post by NightRoman » Sat 06 Nov, 2010 07:34

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: 4899
Joined: Tue 15 Mar, 2005 16:17
Location: Tel-Aviv
Has thanked: 1 time
Contact:

Re: Using VIM as the external editor

Post by t-rex » Sat 06 Nov, 2010 11:05

vim "!.!"

User avatar
NightRoman
Posts: 5904
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: Using VIM as the external editor

Post by NightRoman » Sat 06 Nov, 2010 14:30

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: 5904
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: Using VIM as the external editor

Post by NightRoman » Sun 07 Nov, 2010 16:04

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 » Mon 08 Nov, 2010 05:10

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: 5904
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: Using VIM as the external editor

Post by NightRoman » Mon 08 Nov, 2010 08:05

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 » Thu 11 Nov, 2010 21:31

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: 669
Joined: Wed 16 Mar, 2005 16:01
Location: St. Petersburg
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Using VIM as the external editor

Post by Raistlin » Tue 18 Jan, 2011 19:38

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: 5904
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: Using VIM as the external editor

Post by NightRoman » Tue 18 Jan, 2011 19:49

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: 8469
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 74 times
Been thanked: 135 times

Re: Using VIM as the external editor

Post by HaRT » Tue 18 Jan, 2011 20:56

NightRoman
I believe Raistlin means something like called
Фар есть инструмент, а не нянька. © 2009 DrKnS

User avatar
Raistlin
Posts: 669
Joined: Wed 16 Mar, 2005 16:01
Location: St. Petersburg
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Using VIM as the external editor

Post by Raistlin » Tue 18 Jan, 2011 21:28

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: 8469
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 74 times
Been thanked: 135 times

Re: Using VIM as the external editor

Post by HaRT » Tue 18 Jan, 2011 21:44

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: 669
Joined: Wed 16 Mar, 2005 16:01
Location: St. Petersburg
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Using VIM as the external editor

Post by Raistlin » Tue 18 Jan, 2011 22:17

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: 5904
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 10 times
Been thanked: 11 times
Contact:

Re: Using VIM as the external editor

Post by NightRoman » Wed 19 Jan, 2011 06:34

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.

User avatar
HaRT
Moderator
Posts: 8469
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 74 times
Been thanked: 135 times

Re: Using VIM as the external editor

Post by HaRT » Wed 26 Jan, 2011 20:11

Raistlin wrote:To do this using just cmd.exe is the question of principle, definitely!
Фар есть инструмент, а не нянька. © 2009 DrKnS

Post Reply

Return to “Support and Troubleshooting”