You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@pkulchenko Another plugin from me, please review and add to ZeroBranePackage if you like it. 🍺
It takes care about actions mentioned in the Use 'ide:GetEditor():SetViewEOL(1)' to show line endings and ide:GetEditor():ConvertEOLs(ide:GetEditor():GetEOLMode())' to convert them. message
🆘 Help is needed 🆘 The onUpdateUi is not functional (does not set checkmark) Do you have a suggestion?
endofline.lua :
localidShowLineEndings=ID("endofline.show")
localidConvertCrLf=ID("endofline.crlf")
localidConvertLf=ID("endofline.lf")
localidConvertCr=ID("endofline.cr")
return
{
name="endofline",
description="Adds Menus do show and convert end of lines",
author="J.Jørgen von Bargen",
version=0.01,
onRegister=function(self)
localviewMenu=ide:FindTopMenu("&View")
localeditMenu=ide:FindTopMenu("&Edit")
localsourceId=editMenu:FindItem("Source")
localsourceMenu=editMenu:FindItem(sourceId)
localsourceSubMenu=sourceMenu:GetSubMenu()
viewMenu:Append(idShowLineEndings,"End of line")
sourceSubMenu:Append(idConvertCrLf,"Convert to CrLf")
sourceSubMenu:Append(idConvertLf,"Convert to Lf")
sourceSubMenu:Append(idConvertCr,"Convert to Cr")
localfunctiononShowLineEndings(event)
ide:GetEditor():SetViewEOL(notide:GetEditor():GetViewEOL())
ide:GetUIManager():Update()
endlocalfunctiononConvertCrLf()
ide:GetEditor():ConvertEOLs(wxstc.wxSTC_EOL_CRLF)
endlocalfunctiononConvertLf()
ide:GetEditor():ConvertEOLs(wxstc.wxSTC_EOL_LF)
endlocalfunctiononConvertCr()
ide:GetEditor():ConvertEOLs(wxstc.wxSTC_EOL_CR)
endlocalfunctiononUpdateUi(event)
ide:GetMenuBar():Check(idShowLineEndings,ide:GetEditor():GetViewEOL())
endide:GetMainFrame():Connect(idShowLineEndings,wx.wxEVT_COMMAND_MENU_SELECTED,onShowLineEndings)
ide:GetMainFrame():Connect(idShowLineEndings,wx.wxEVT_UPDATE_UI,onUpdateUi)
ide:GetMainFrame():Connect(idConvertCrLf,wx.wxEVT_COMMAND_MENU_SELECTED,onConvertCrLf)
ide:GetMainFrame():Connect(idConvertLf,wx.wxEVT_COMMAND_MENU_SELECTED,onConvertLf)
ide:GetMainFrame():Connect(idConvertCr,wx.wxEVT_COMMAND_MENU_SELECTED,onConvertCr)
end,
onUnRegister=function(self)
ide:RemoveMenuItem(idShowLineEndings)
ide:RemoveMenuItem(idConvertCrLf)
ide:RemoveMenuItem(idConvertLf)
ide:RemoveMenuItem(idConvertCr)
end,
}
The text was updated successfully, but these errors were encountered:
@pkulchenko Another plugin from me, please review and add to ZeroBranePackage if you like it. 🍺
It takes care about actions mentioned in the
Use 'ide:GetEditor():SetViewEOL(1)' to show line endings and ide:GetEditor():ConvertEOLs(ide:GetEditor():GetEOLMode())' to convert them.
message🆘 Help is needed 🆘 The
onUpdateUi
is not functional (does not set checkmark) Do you have a suggestion?endofline.lua :
The text was updated successfully, but these errors were encountered: