Note : this are for FAR3 with LUA support (tested and working correctly on FAR 3.0.3300)
Script for ConEmu plugin
- -------------------------------------------------------------------------------
- -- Shortcuts for ConEmu plugin.
- -- plugin: © 2013 Maxim Rusov
- -- http:/ /code.google.com/p/conemu-maximus5
- -- macro : © v 0.02 CyberWolf
- -------------------------------------------------------------------------------
- -- Settings :
- -------------------------------------------------------------------------------
- -- OpenType = 1 - Open in editor
- -- OpenType = 2 - Open in viewer
- local OpenType = 1
- -- keyboard shortcuts
- local KEY_ShowConsoleOutput = "CtrlShiftO" -- Show console output in editor/viewer
- local KEY_ToggleThumbs = "CtrlShiftF1" -- Switch Thumbnail view on active panel
- local KEY_ToggleTiles = "CtrlShiftF2" -- Switch Tiles view on active panel
- -------------------------------------------------------------------------------
- -- Code : do not modify (unless you know what you're doing)
- -------------------------------------------------------------------------------
- local GUID_ConEmu = "4B675D80-1D4A-4EA9-8436-FDC23F2FC14B"
- local GUID_ConEmuThumb = "bd454d48-448e-46cc-909d-b6cf789c2d65"
- local PlgExist_ConEmu = function () return Plugin.Exist(GUID_ConEmu) end
- local PlgExist_ConEmuThumb = function () return Plugin.Exist(GUID_ConEmuThumb) end
- -- Show console output in editor
- Macro {
- area="Shell"; key=KEY_ShowConsoleOutput; condition = PlgExist_ConEmu;
- description="ConEmu: Show console output in Editor";
- action = function() Plugin.Call(GUID_ConEmu, OpenType) end;
- }
- -- Switch Thumbnail view on active panel
- Macro {
- area="Shell"; key=KEY_ToggleThumbs; condition = PlgExist_ConEmuThumb;
- description="ConEmuTh: Switch Thumbnail view on active panel";
- action = function() Plugin.Call(GUID_ConEmuThumb, 1) end;
- }
- -- Switch Tiles view on active panel
- Macro {
- area="Shell"; key=KEY_ToggleTiles; condition = PlgExist_ConEmuThumb;
- description="ConEmuTh: Switch Tiles view on active panel";
- condition = function() return Plugin.Exist(GUID_ConEmu) end;
- action = function() Plugin.Call(GUID_ConEmuThumb, 2) end;
- }
GeSHi © Codebox Plus Extension
Script for Edit Find plugin
- -------------------------------------------------------------------------------
- -- Shortcuts for Edit Find plugin.
- -- plugin: © 2013 Maxim Rusov
- -- http:/ /code.google.com/p/far-plugins/wiki/EdtFind
- -- macro : v 0.02 © CyberWolf
- -------------------------------------------------------------------------------
- -- Settings :
- -------------------------------------------------------------------------------
- -- keyboard shortcuts
- local KEY_Search = "F7 CtrlF" -- Search
- local KEY_Replace = "CtrlF7 CtrlH" -- Replace
- local KEY_FindNext = "ShiftF7 F3" -- Find next
- local KEY_FindPrev = "AltF7 ShiftF3" -- Find previous
- -------------------------------------------------------------------------------
- -- Code : do not modify (unless you know what you're doing)
- -------------------------------------------------------------------------------
- local GUID_EditFind = "E4ABD267-C2F9-4158-818F-B0E040A2AB9F"
- local CMD_find = 1
- local CMD_findword = 2
- local CMD_replace = 3
- local CMD_replaceword = 4
- local CMD_repeat = 5
- local CMD_repeatback = 6
- local CMD_pickword = 7
- local CMD_removehilight = 8
- local PlgExist_EditFind = function () return Plugin.Exist(GUID_EditFind) end
- -- Edit Find: Search
- Macro {
- area="Editor"; key=KEY_Search; condition=PlgExist_EditFind;
- description="EditFind: Search";
- action = function() Plugin.Call(GUID_EditFind, CMD_find) end;
- }
- -- Edit Find: Replace
- Macro {
- area="Editor"; key=KEY_Replace; condition=PlgExist_EditFind;
- description="EditFind: Replace";
- action = function() Plugin.Call(GUID_EditFind, CMD_replace) end;
- }
- -- Edit Find: Find next
- Macro {
- area="Editor"; key=KEY_FindNext; condition=PlgExist_EditFind;
- description="EditFind: Find next";
- action = function() Plugin.Call(GUID_EditFind, CMD_repeat) end;
- }
- -- Edit Find: Find previous
- Macro {
- area="Editor"; key=KEY_FindPrev; condition=PlgExist_EditFind;
- description="EditFind: Find previous";
- action = function() Plugin.Call(GUID_EditFind, CMD_repeatback) end;
- }
GeSHi © Codebox Plus Extension
Script for File Version plugin
- -------------------------------------------------------------------------------
- -- Shortcuts for File Version plugin.
- -- plugin: © 2013 Andrew Grechkin
- -- http:/ /code.google.com/p/andrew-grechkin
- -- macro : v 0.01 © CyberWolf
- -------------------------------------------------------------------------------
- -- Settings :
- -------------------------------------------------------------------------------
- -- keyboard shortcuts
- local KEY_ShowFileVer = "CtrlAltShiftEnter" -- Display file version information
- -------------------------------------------------------------------------------
- -- Code : do not modify (unless you know what you're doing)
- -------------------------------------------------------------------------------
- local GUID_FileVer = "F9AF80C3-54AC-4924-B607-FE05A3866A88"
- local PlgExist_FileVer = function () return Plugin.Exist(GUID_FileVer) end
- -------------------------------------------------------------------------------
- -- File Version: Display file version of current file
- -------------------------------------------------------------------------------
- Macro {
- area="Shell"; key=KEY_ShowFileVer; condition = PlgExist_FileVer;
- description="FileVer: Display file version of current file";
- action = function() Plugin.Call(GUID_FileVer) end;
- }
GeSHi © Codebox Plus Extension
Script for Plugins Menu plugin
- -------------------------------------------------------------------------------
- -- Shortcuts for Plugin Menu plugin.
- -- plugin: © 2013 Maxim Rusov
- -- http:/ /code.google.com/p/far-plugins/wiki/PlugMenu
- -- macro : v 0.02 © CyberWolf
- -------------------------------------------------------------------------------
- -- Settings :
- -------------------------------------------------------------------------------
- -- keyboard shortcuts
- local KEY_ShowPlugins = "F11" -- Show extended plugins menu
- local KEY_ShowFARPlugins= "ShiftF11" -- Show FAR's default plugins menu
- -------------------------------------------------------------------------------
- -- Code : do not modify (unless you know what you're doing)
- -------------------------------------------------------------------------------
- local GUID_PlugMenu = "AB9578B3-3107-4E28-BB00-3C13D47382AC"
- local PlgExist_PlugMenu = function () return Plugin.Exist(GUID_PlugMenu) end
- -- PluginMnu: Show plugins menu
- Macro {
- area="Shell Editor Viewer"; key=KEY_ShowPlugins; condition=PlgExist_PlugMenu;
- description="PluginMnu: Show plugins menu";
- action = function() Plugin.Call(GUID_PlugMenu, 0) end;
- }
- -- PluginMnu: Show FAR's default plugins menu
- Macro {
- area="Shell Editor Viewer"; key=KEY_ShowFARPlugins; condition=PlgExist_PlugMenu;
- description="PluginMnu: Show FAR's default plugins menu";
- action = function() Keys("F11") end;
- }
GeSHi © Codebox Plus Extension
Script for More History plugin
- -------------------------------------------------------------------------------
- -- Shortcuts for More History plugin.
- -- plugin: © 2013 Maxim Rusov
- -- http:/ /code.google.com/p/far-plugins/wiki/MoreHistory
- -- macro : v 0.02 © CyberWolf
- -------------------------------------------------------------------------------
- -- Settings :
- -------------------------------------------------------------------------------
- -- keyboard shortcuts
- local KEY_Folders = "AltF12" -- Folders
- local KEY_EdtView = "AltF11" -- Editor/viewer history
- local KEY_Cmds = "AltF8" -- Command history
- local KEY_NextCmd = "CtrlE" -- Show next command
- local KEY_PrevCmd = "CtrlShiftE" -- Show previous command
- local KEY_FAR_Folders = "AltShiftF12" -- Original FAR history : Folders
- local KEY_FAR_EdtView = "AltShiftF11" -- Original FAR history : Editor/viewer history
- local KEY_FAR_Cmd = "AltShiftF8" -- Original FAR history : Command history
- -------------------------------------------------------------------------------
- -- Code : do not modify (unless you know what you're doing)
- -------------------------------------------------------------------------------
- local GUID_MoreHistory = "0AB780BC-36CA-4FDA-B321-70520D875CDE"
- local GUID_DlgEdtView = "EF4E9F0A-56EA-4510-92D9-FC361FE1FA9A"
- local GUID_DlgCmds = "433B0FAD-56A5-46E1-BCFB-462DEAAE35C9"
- local GUID_DlgFolders = "DDA833F3-3EA1-4B96-B867-590CE29AE6E0"
- local CMD_FolderHist = 1
- local CMD_EditorHist = 2
- local CMD_ModifyHist = 3
- local CMD_CommandHist = 4
- local CMD_PrevCmd = 5
- local CMD_NextCmd = 6
- local CMD_Options = 7
- local AREA_History = "Shell Info QView Editor Viewer Search"
- local PlgExist_MoreHistory = function () return Plugin.Exist(GUID_MoreHistory) end
- local PlgExist_MoreHistory_DlgEdtView = function () return Plugin.Exist(GUID_MoreHistory) and Dlg.Id == GUID_DlgEdtView end
- local PlgExist_MoreHistory_DlgCmds = function () return Plugin.Exist(GUID_MoreHistory) and Dlg.Id == GUID_DlgCmds end
- local PlgExist_MoreHistory_DlgFolders = function () return Plugin.Exist(GUID_MoreHistory) and Dlg.Id == GUID_DlgFolders end
- -- MoreHist: Folders
- Macro {
- area=AREA_History; key=KEY_Folders; condition=PlgExist_MoreHistory;
- description="MoreHist: Folders";
- action = function() Plugin.Call(GUID_MoreHistory, CMD_FolderHist) end;
- }
- -- MoreHist: Folders - Filter for current folder
- Macro {
- area="Dialog"; key=KEY_Folders; condition=PlgExist_MoreHistory_DlgFolders;
- description="MoreHist: Folders - Filter for current folder";
- action = function()
- -- open the filter dialog
- Keys("CtrlF")
- -- if there's no text in the filter then add the current folder as a filter
- if Object.Empty then
- Keys("CtrlShift[ Enter Tab")
- -- if there's already a filter delete it
- else
- Keys("ShiftHome Del Enter Home Down")
- end
- end;
- }
- -- MoreHist: Edit/view history
- Macro {
- area=AREA_History; key=KEY_EdtView; condition=PlgExist_MoreHistory;
- description="MoreHist: Editor/viewer history";
- action = function() Plugin.Call(GUID_MoreHistory, CMD_EditorHist) end;
- }
- -- MoreHist: Edit/view history - Filter for current folder
- Macro {
- area="Dialog"; key=KEY_EdtView; condition=PlgExist_MoreHistory_DlgEdtView;
- description="MoreHist: Editor/viewer - Filter for current folder";
- action = function()
- -- open the filter dialog
- Keys("CtrlF")
- -- if there's no text in the filter then add the current folder as a filter
- if Object.Empty then
- Keys("CtrlShift[ Enter Tab")
- -- if there's already a filter delete it
- else
- Keys("ShiftHome Del Enter Home Down")
- end
- end;
- }
- -- MoreHist: Commands history
- Macro {
- area=AREA_History; key=KEY_Cmds; condition=PlgExist_MoreHistory;
- description="MoreHist: Commands history";
- action = function() Plugin.Call(GUID_MoreHistory, CMD_CommandHist) end;
- }
- -- MoreHist: Commands history - Filter for current folder
- Macro {
- area="Dialog"; key=KEY_Cmds; condition=PlgExist_MoreHistory_DlgCmds;
- description="MoreHist: Commands history - Filter for current folder";
- action = function()
- -- open the filter dialog
- Keys("CtrlF")
- -- if there's no text in the filter then add the current folder as a filter
- if Object.Empty then
- Keys("CtrlShift[ Enter Tab")
- -- if there's already a filter delete it
- else
- Keys("ShiftHome Del Enter Home Enter")
- end
- end;
- }
- -- MoreHist: Next command
- Macro {
- area="Shell"; key=KEY_NextCmd; condition=PlgExist_MoreHistory_DlgCmds;
- description="MoreHist: Next command";
- action = function() Plugin.Call(GUID_MoreHistory, CMD_NextCmd) end;
- }
- -- MoreHist: Prev command
- Macro {
- area="Shell"; key=KEY_PrevCmd; condition=PlgExist_MoreHistory_DlgCmds;
- description="MoreHist: Prev command";
- action = function() Plugin.Call(GUID_MoreHistory, CMD_PrevCmd) end;
- }
- -- Original FAR commands
- Macro {
- area=AREA_History; key=KEY_FAR_Folders; condition=PlgExist_MoreHistory;
- description="MoreHist: Standard History: Folders";
- action = function() Keys("AltF12") end;
- }
- Macro {
- area=AREA_History; key=KEY_FAR_EdtView; condition=PlgExist_MoreHistory;
- description="MoreHist: Standard History: Edit/View";
- action = function() Keys("AltF11") end;
- }
- Macro {
- area=AREA_History; key=KEY_FAR_Cmd; condition=PlgExist_MoreHistory;
- description="MoreHist: Standard History: Command";
- action = function() Keys("AltF8") end;
- }
GeSHi © Codebox Plus Extension
Script for Visual Compare plugin
- -------------------------------------------------------------------------------
- -- Shortcuts for Visual Compare plugin.
- -- plugin: © 2013 Maxim Rusov
- -- http:/ /code.google.com/p/far-plugins/wiki/VisualCompare
- -- macro : v 0.02 © CyberWolf
- -------------------------------------------------------------------------------
- -- Settings :
- -------------------------------------------------------------------------------
- -- keyboard shortcuts
- local KEY_CompSelItm = "Ctrl-" -- Visually compare the selected files or the current folders
- local KEY_CompCrntItm = "CtrlShift-" -- Visually compare the current files/folders
- -------------------------------------------------------------------------------
- -- Code : do not modify (unless you know what you're doing)
- -------------------------------------------------------------------------------
- local GUID_VisComp = "AF4DAB38-C00A-4653-900E-7A8230308010"
- local PlgExist_VisComp = function () return Plugin.Exist(GUID_VisComp) end
- -- Visual Compare: Visually compare the selected files or the current folders
- Macro {
- area="Shell"; key=KEY_CompSelItm; condition=PlgExist_VisComp;
- description="VisualCmp: Visually compare the selected files or the current folders";
- action = function()
- if APanel.SelCount == 1 then
- File1 = APanel.Path .."\\" .. panel.GetSelectedPanelItem(nil, 1, 1).FileName
- if PPanel.SelCount == 1 then
- File2 = PPanel.Path .."\\" .. panel.GetSelectedPanelItem(nil, 0, 1).FileName
- else
- File2 = PPanel.Path .."\\" .. panel.GetSelectedPanelItem(nil, 1, 1).FileName
- end
- if not APanel.Left then
- Tmp = File2
- File2 = File1
- File1 = Tmp
- end
- Plugin.Command(GUID_VisComp, '"'..File1..'" "'..File2..'"')
- else
- if APanel.SelCount == 2 then
- File1 = APanel.Path .."\\" .. panel.GetSelectedPanelItem(nil, 1, 1).FileName
- File2 = APanel.Path .."\\" .. panel.GetSelectedPanelItem(nil, 1, 2).FileName
- Plugin.Command(GUID_VisComp, '"'..File1..'" "'..File2..'"')
- else
- Plugin.Menu(GUID_VisComp)
- end
- end;
- end;
- }
- -- Visual Compare: Visually compare the current files/folders
- Macro {
- area="Shell"; key=KEY_CompCrntItm; condition=PlgExist_VisComp;
- description="VisualCmp: Visually compare the current files/folders";
- action = function()
- File1 = panel.GetPanelDirectory(nil, 0).Name .."\\" .. panel.GetCurrentPanelItem(nil, 0).FileName
- File2 = panel.GetPanelDirectory(nil, 1).Name .."\\" .. panel.GetCurrentPanelItem(nil, 1).FileName
- if not APanel.Left then
- Tmp = File2
- File2 = File1
- File1 = Tmp
- end
- Plugin.Command(GUID_VisComp, '"'..File1..'" "'..File2..'"')
- end;
- }
GeSHi © Codebox Plus Extension
P.S. i hope i didn't break any copyright or offended anyone by posting these, they are simple conversions from fml/fmlua to lua.
18.04.2013
- rearranged macro code to be easier to change the shortcut keys
- bugfix : VisualCompare's 2nd macro doesn't work if 2 different folders are displayed
- added macros for File Version and More History
17.04.2013
- removed "flags="DisableOutput";" (thanx @2useven10 for letting me know the flag is not needed anymore (it's set by default))
- rearranged macro code to be easier to change the shortcut keys
- bugfix : VisualCompare's 2nd macro doesn't work if 2 different folders are displayed
- added macros for File Version and More History
17.04.2013
- removed "flags="DisableOutput";" (thanx @2useven10 for letting me know the flag is not needed anymore (it's set by default))