local function ChangeCommentChar() function IsINI(ext) local ini = {'ini', 'inf', 'reg'} for _, x in pairs(ini) do if x == ext then return true end end return false end if editor.LexerLanguage == 'props' then local ext = props['FileExt']:lower() if IsINI(ext) then props['comment.block.props']=';' else props['comment.block.props']='#' end end end -- Добавляем свой обработчик события OnSwitchFile local old_OnSwitchFile = OnSwitchFile function OnSwitchFile(file) local result if old_OnSwitchFile then result = old_OnSwitchFile(file) end ChangeCommentChar() return result end -- Добавляем свой обработчик события OnOpen local old_OnOpen = OnOpen function OnOpen(file) local result if old_OnOpen then result = old_OnOpen(file) end ChangeCommentChar() return result end |