Add command home

This commit is contained in:
Florian Bruhin 2014-05-09 13:09:37 +02:00
parent ee72d682ad
commit 05f38e15a6
3 changed files with 6 additions and 3 deletions

3
TODO
View File

@ -368,9 +368,6 @@ Other
[n]gc
Clear tab n or of current tab, clears the history of the tab and loads about:blank. (command clear_tab, aliases: clear).
C-h
Open the default startpage (command start_page, aliases: home).
th
Go back in a new tab (command tab_hist_back, aliases: tabback, tba).

View File

@ -421,6 +421,11 @@ class CurCommandDispatcher(QObject):
logging.debug("Executing: {}".format(cmd))
subprocess.Popen(cmd, shell=True)
@cmdutils.register(instance='mainwindow.tabs.cur')
def home(self):
"""Open main startpage in current tab."""
self.openurl(config.get('general', 'startpage')[0])
@cmdutils.register(instance='mainwindow.tabs.cur', modes=['insert'],
name='open_editor', hide=True, needs_js=True)
def editor(self):

View File

@ -623,6 +623,7 @@ DATA = OrderedDict([
('<Space>', '${<Ctrl-F>}'),
('<PgUp>', '${<Ctrl-B>}'),
('<PgDown>', '${<Ctrl-F>}'),
('<Ctrl-h>', 'home'),
)),
('keybind.insert', sect.ValueList(