Is this the right place to share them? I don't know. But here they are anyway, I hope this is useful for somebody.
Move these files into %FARPROFILE%\Macros\scripts\ then reload Far Manager or execute lm: load on the command line.
Move the cursor around the active panel with hjkl, like in vim, on the condition that the command line is empty.
Press i to insert something on the command line that begins with hjkl
If the panels are invisible these keys work like normal.
In Autocompletion Menus (e.g., the suggestions that come up when typing something on the command line), move the cursor down with CtrlN and up with CtrlP, like in vim.
Here's the code, if you want to have a look:
ShellAutoCompletion.CtrlN_and_CtrlP.lua
Code: Select all
--In Autocompletion Menus (e.g., the suggestions that come up when typing something on the command line), move the cursor down with CtrlN and up with CtrlP, like in vim.
Macro {
description="In AutoCompletion Menus move down with CtrlN";
area="ShellAutoCompletion DialogAutoCompletion"; key="CtrlN";
code="Keys('Down')";
}
Macro {
description="In AutoCompletion Menus move up with CtrlP";
area="ShellAutoCompletion DialogAutoCompletion"; key="CtrlP";
code="Keys('Up')";
}
Panel.move_with_hjkl.lua
Code: Select all
--Move the cursor around the active panel with hjkl, like in vim, on the condition that the Command Line is empty.
--Press i to insert something on the command line that begins with hjkl
--If the Panels are invisible these keys work like normal.
Macro {
description="Move Left";
area="Shell"; key="h";
condition=function() return CmdLine.Empty and APanel.Visible end;
action=function() Keys('Left') end;
}
Macro {
description="Move Down";
area="Shell"; key="j";
condition=function() return CmdLine.Empty and APanel.Visible end;
action=function() Keys('Down') end;
}
Macro {
description="Move Up";
area="Shell"; key="k";
condition=function() return CmdLine.Empty and APanel.Visible end;
action=function() Keys('Up') end;
}
Macro {
description="Move Right";
area="Shell"; key="l";
condition=function() return CmdLine.Empty and APanel.Visible end;
action=function() Keys('Right') end;
}
Macro {
description="Input on Command Line";
area="Shell"; key="i";
condition=function() return CmdLine.Empty and APanel.Visible end;
action=function() Keys("i ShiftLeft") end;
--Presses i, then selects it. The next text that is typed replaces the i.
}