Latest post of the previous page:
Вот улучшенный вариант скрипта для установки макросов (не перебивает вьюер и для пустой строки в панелях не перебивает ресайз).Code: Select all
<#
.SYNOPSIS
Installs typical RightControl module macros.
#>
Import-Module FarMacro
function Get-RightControlMacro($key)
{
@'
$If (AutoCompletion)
Esc
$End
$If (Editor || Dialog || ((Shell || Info || QView || Tree) && !CmdLine.Empty))
F11
$If (Menu.Select("RightControl", 3) > 0)
Enter
'@ + " $key " + @'
$Else
Esc $AKey
$End
$Else
$AKey
$End
'@
}
$Far.Macro.Install($(
New-FarMacro Common CtrlLeft (Get-RightControlMacro 1) 'RightControl: step left'
New-FarMacro Common CtrlRight (Get-RightControlMacro 2) 'RightControl: step right'
New-FarMacro Common CtrlShiftLeft (Get-RightControlMacro 3) 'RightControl: select left'
New-FarMacro Common CtrlShiftRight (Get-RightControlMacro 4) 'RightControl: select right'
New-FarMacro Common CtrlBS (Get-RightControlMacro 5) 'RightControl: delete left'
New-FarMacro Common CtrlDel (Get-RightControlMacro 6) 'RightControl: delete right'
New-FarMacro Common CtrlAltLeft (Get-RightControlMacro 7) 'RightControl: vertical left'
New-FarMacro Common CtrlAltRight (Get-RightControlMacro 8) 'RightControl: vertical right'
))