Cmdline far:new ?
Cmdline far:new ?
Command "far:new" could create new instance of FarManager (panels in same locations as original instance)...
-
- Posts: 129
- Joined: Sun 08 Jan, 2012 08:23
- Location: Czech Republic
- Has thanked: 2 times
- Been thanked: 1 time
Cmdline far:new ?
That would be great feature. I used macro for this reason, but it is not perfect. Cursor position and plugin panels (except of ArcLite) are ignored...
It uses ConEmu, but you can make small change to run Far.exe directly.
It uses ConEmu, but you can make small change to run Far.exe directly.
Code: Select all
Macro {
key ="CtrlAltO";
area ="Common";
description ="Clone Far";
action=function()
local FarName=win.GetEnv("FARHOME").."\\far.exe"
local ConemuName=win.GetEnv("FARHOME").."\\conemu.exe"
local FarLeft,FarRight
if APanel.Left then FarLeft=APanel.Path FarRight=PPanel.Path end
if PPanel.Left then FarLeft=PPanel.Path FarRight=APanel.Path end
if APanel.Left and APanel.Prefix=='arc' then FarLeft ='arc:'..APanel.HostFile end
if not APanel.Left and APanel.Prefix=='arc' then FarRight='arc:'..APanel.HostFile end
if PPanel.Left and PPanel.Prefix=='arc' then FarLeft ='arc:'..PPanel.HostFile end
if not PPanel.Left and PPanel.Prefix=='arc' then FarRight='arc:'..PPanel.HostFile end
if FarLeft =='' then FarLeft ='c:' end
if FarRight=='' then FarRight='c:' end
local Text='""'..FarName..'" "'..FarLeft..'" "'..FarRight..'""'
win.ShellExecute(nil,nil,ConemuName,'-run '..Text,nil,nil)
end;
}