parent
fd6790fe8c
commit
7146c18183
|
|
@ -178,6 +178,7 @@ Changed
|
|||
* `run-macro` -> `macro-run`
|
||||
* `record-macro` -> `macro-record`
|
||||
* `buffer` -> `tab-select`
|
||||
* `open-editor` -> `edit-text`
|
||||
- Various performance improvements, including for the startup time.
|
||||
|
||||
Fixed
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ possible to run or bind multiple commands by separating them with `;;`.
|
|||
|<<download-remove,download-remove>>|Remove the last/[count]th download from the list.
|
||||
|<<download-retry,download-retry>>|Retry the first failed/[count]th download.
|
||||
|<<edit-command,edit-command>>|Open an editor to modify the current command.
|
||||
|<<edit-text,edit-text>>|Open an external editor with the currently selected form field.
|
||||
|<<edit-url,edit-url>>|Navigate to a url formed in an external editor.
|
||||
|<<enter-mode,enter-mode>>|Enter a key mode.
|
||||
|<<fake-key,fake-key>>|Send a fake keypress or key string to the website or qutebrowser.
|
||||
|
|
@ -85,7 +86,6 @@ possible to run or bind multiple commands by separating them with `;;`.
|
|||
|<<navigate,navigate>>|Open typical prev/next links or navigate using the URL path.
|
||||
|<<nop,nop>>|Do nothing.
|
||||
|<<open,open>>|Open a URL in the current/[count]th tab.
|
||||
|<<open-editor,open-editor>>|Open an external editor with the currently selected form field.
|
||||
|<<print,print>>|Print the current/[count]th tab.
|
||||
|<<quickmark-add,quickmark-add>>|Add a new quickmark.
|
||||
|<<quickmark-del,quickmark-del>>|Delete a quickmark.
|
||||
|
|
@ -492,6 +492,12 @@ Open an editor to modify the current command.
|
|||
==== optional arguments
|
||||
* +*-r*+, +*--run*+: Run the command if the editor exits successfully.
|
||||
|
||||
[[edit-text]]
|
||||
=== edit-text
|
||||
Open an external editor with the currently selected form field.
|
||||
|
||||
The editor which should be launched can be configured via the `editor.command` config option.
|
||||
|
||||
[[edit-url]]
|
||||
=== edit-url
|
||||
Syntax: +:edit-url [*--bg*] [*--tab*] [*--window*] [*--private*] [*--related*] ['url']+
|
||||
|
|
@ -915,12 +921,6 @@ The tab index to open the URL in.
|
|||
==== note
|
||||
* This command does not split arguments after the last argument and handles quotes literally.
|
||||
|
||||
[[open-editor]]
|
||||
=== open-editor
|
||||
Open an external editor with the currently selected form field.
|
||||
|
||||
The editor which should be launched can be configured via the `editor.command` config option.
|
||||
|
||||
[[print]]
|
||||
=== print
|
||||
Syntax: +:print [*--preview*] [*--pdf* 'file']+
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@
|
|||
|<<downloads.open_dispatcher,downloads.open_dispatcher>>|Default program used to open downloads.
|
||||
|<<downloads.position,downloads.position>>|Where to show the downloaded files.
|
||||
|<<downloads.remove_finished,downloads.remove_finished>>|Duration (in milliseconds) to wait before removing finished downloads.
|
||||
|<<editor.command,editor.command>>|Editor (and arguments) to use for the `open-editor` command.
|
||||
|<<editor.command,editor.command>>|Editor (and arguments) to use for the `edit-*` commands.
|
||||
|<<editor.encoding,editor.encoding>>|Encoding to use for the editor.
|
||||
|<<fileselect.handler,fileselect.handler>>|Handler for selecting file(s) in forms. If `external`, then the commands specified by `fileselect.single_file.command` and `fileselect.multiple_files.command` are used to select one or multiple files respectively.
|
||||
|<<fileselect.multiple_files.command,fileselect.multiple_files.command>>|Command (and arguments) to use for selecting multiple files in forms. The command should write the selected file paths to the specified file, separated by newlines.
|
||||
|
|
@ -532,7 +532,7 @@ Default:
|
|||
* +pass:[<Return>]+: +pass:[follow-hint]+
|
||||
- +pass:[insert]+:
|
||||
|
||||
* +pass:[<Ctrl-E>]+: +pass:[open-editor]+
|
||||
* +pass:[<Ctrl-E>]+: +pass:[edit-text]+
|
||||
* +pass:[<Escape>]+: +pass:[leave-mode]+
|
||||
* +pass:[<Shift-Ins>]+: +pass:[insert-text -- {primary}]+
|
||||
- +pass:[normal]+:
|
||||
|
|
@ -2756,7 +2756,7 @@ Default: +pass:[-1]+
|
|||
|
||||
[[editor.command]]
|
||||
=== editor.command
|
||||
Editor (and arguments) to use for the `open-editor` command.
|
||||
Editor (and arguments) to use for the `edit-*` commands.
|
||||
The following placeholders are defined:
|
||||
|
||||
* `{file}`: Filename of the file to be edited.
|
||||
|
|
|
|||
|
|
@ -1447,8 +1447,8 @@ class CommandDispatcher:
|
|||
|
||||
self._open(url, tab, bg, window)
|
||||
|
||||
def _open_editor_cb(self, elem):
|
||||
"""Open editor after the focus elem was found in open_editor."""
|
||||
def _edit_text_cb(self, elem):
|
||||
"""Open editor after the focus elem was found in edit_text."""
|
||||
if elem is None:
|
||||
message.error("No element focused!")
|
||||
return
|
||||
|
|
@ -1472,14 +1472,14 @@ class CommandDispatcher:
|
|||
ed.edit(text, caret_position)
|
||||
|
||||
@cmdutils.register(instance='command-dispatcher', scope='window')
|
||||
def open_editor(self):
|
||||
def edit_text(self):
|
||||
"""Open an external editor with the currently selected form field.
|
||||
|
||||
The editor which should be launched can be configured via the
|
||||
`editor.command` config option.
|
||||
"""
|
||||
tab = self._current_widget()
|
||||
tab.elements.find_focused(self._open_editor_cb)
|
||||
tab.elements.find_focused(self._edit_text_cb)
|
||||
|
||||
def on_file_updated(self, ed, elem, text):
|
||||
"""Write the editor text into the form field and clean up tempfile.
|
||||
|
|
|
|||
|
|
@ -1200,7 +1200,7 @@ editor.command:
|
|||
placeholder: true
|
||||
default: ["gvim", "-f", "{file}", "-c", "normal {line}G{column0}l"]
|
||||
desc: |
|
||||
Editor (and arguments) to use for the `open-editor` command.
|
||||
Editor (and arguments) to use for the `edit-*` commands.
|
||||
The following placeholders are defined:
|
||||
|
||||
* `{file}`: Filename of the file to be edited.
|
||||
|
|
@ -3389,7 +3389,7 @@ bindings.default:
|
|||
tCu: config-cycle -p -u {url} content.cookies.accept
|
||||
all no-3rdparty never ;; reload
|
||||
insert:
|
||||
<Ctrl-E>: open-editor
|
||||
<Ctrl-E>: edit-text
|
||||
<Shift-Ins>: insert-text -- {primary}
|
||||
<Escape>: leave-mode
|
||||
hint:
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ Feature: Opening external editors
|
|||
And I open data/editor.html
|
||||
And I run :click-element id qute-textarea
|
||||
And I wait for "Entering mode KeyMode.insert (reason: clicking input)" in the log
|
||||
And I run :open-editor
|
||||
And I run :edit-text
|
||||
And I wait for "Read back: foobar" in the log
|
||||
Then the javascript message "text: foobar" should be logged
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ Feature: Opening external editors
|
|||
And I wait for "Entering mode KeyMode.insert (reason: clicking input)" in the log
|
||||
And I run :leave-mode
|
||||
And I wait for "Leaving mode KeyMode.insert (reason: leave current)" in the log
|
||||
And I run :open-editor
|
||||
And I run :edit-text
|
||||
And I wait for "Read back: foobar" in the log
|
||||
Then the javascript message "text: foobar" should be logged
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ Feature: Opening external editors
|
|||
And I open data/editor.html
|
||||
And I run :click-element id qute-textarea
|
||||
And I wait for "Entering mode KeyMode.insert (reason: clicking input)" in the log
|
||||
And I run :open-editor
|
||||
And I run :edit-text
|
||||
And I wait until the editor has started
|
||||
And I set tabs.last_close to blank
|
||||
And I run :tab-close
|
||||
|
|
@ -138,7 +138,7 @@ Feature: Opening external editors
|
|||
And I open data/editor.html
|
||||
And I run :click-element id qute-textarea
|
||||
And I wait for "Entering mode KeyMode.insert (reason: clicking input)" in the log
|
||||
And I run :open-editor
|
||||
And I run :edit-text
|
||||
And I wait until the editor has started
|
||||
And I save without exiting the editor
|
||||
And I wait for "Read back: foobar" in the log
|
||||
|
|
@ -153,7 +153,7 @@ Feature: Opening external editors
|
|||
And I wait for "Leaving mode KeyMode.insert (reason: leave current)" in the log
|
||||
And I run :enter-mode caret
|
||||
And I wait for "Entering mode KeyMode.caret (reason: command)" in the log
|
||||
And I run :open-editor
|
||||
And I run :edit-text
|
||||
And I wait for "Read back: foobar" in the log
|
||||
And I run :leave-mode
|
||||
Then the javascript message "text: foobar" should be logged
|
||||
|
|
@ -165,7 +165,7 @@ Feature: Opening external editors
|
|||
And I wait for "Entering mode KeyMode.insert (reason: clicking input)" in the log
|
||||
And I run :insert-text foo
|
||||
And I wait for "Inserting text into element *" in the log
|
||||
And I run :open-editor
|
||||
And I run :edit-text
|
||||
And I wait for "Read back: bar" in the log
|
||||
Then the javascript message "text: bar" should be logged
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue