@@ -0,0 +1,915 @@
+%22%22%22Reload file from disk when Ctrl+R is pressed.%22%22%22%0Aimport functools%0Aimport tkinter%0Aimport typing%0A%0Afrom porcupine import get_tab_manager, tabs, utils%0A%0A%0Adef reload(tab: tabs.FileTab, junk: typing.Any) -%3E utils.BreakOrNone:%0A    if tab.path is None:%0A        return None%0A%0A    cursor_pos = tab.textwidget.index('insert')%0A    scroll_fraction = tab.textwidget.yview()%5B0%5D%0A%0A    tab.textwidget.delete('1.0', 'end')%0A    with tab.path.open('r', encoding=tab.settings.get('encoding', str)) as file:%0A        tab.textwidget.insert('1.0', file.read())%0A    tab.mark_saved()%0A%0A    tab.textwidget.mark_set('insert', cursor_pos)%0A    tab.textwidget.yview_moveto(scroll_fraction)%0A    return 'break'%0A%0A%0Adef on_new_tab(tab: tabs.Tab) -%3E None:%0A    if isinstance(tab, tabs.FileTab):%0A        tab.textwidget.bind('%3CControl-r%3E', functools.partial(reload, tab), add=True)%0A%0A%0Adef setup() - %3E None:%0A    get_tab_manager().add_tab_callback(on_new_tab)%0A

add reload plugin (fixes #166)