Merge branch 'pr-doc-editor-fix' of https://github.com/egnor/kitty

This commit is contained in:
Kovid Goyal 2021-07-29 12:24:17 +05:30
commit 66b93a9af8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 15 additions and 13 deletions

View File

@ -55,8 +55,8 @@ Variables that influence kitty behavior
.. envvar:: VISUAL .. envvar:: VISUAL
Controls what program kitty uses as an editor, when, for instance, opening The terminal editor (such as ``vi`` or ``nano``) kitty uses, when, for
kitty.conf in response to :sc:`edit_config_file` instance, opening :file:`kitty.conf` in response to :sc:`edit_config_file`.
.. envvar:: EDITOR .. envvar:: EDITOR

View File

@ -17,9 +17,10 @@ Then hold down :kbd:`ctrl+shift` and click the name of the file.
|kitty| will ask you what you want to do with the remote file. You can choose |kitty| will ask you what you want to do with the remote file. You can choose
to *Edit* it in which case kitty will download it and open it locally in your to *Edit* it in which case kitty will download it and open it locally in your
``EDITOR``. As you make changes to the file, they are automatically transferred :envvar:`EDITOR`. As you make changes to the file, they are automatically
to the remote computer. Note that this happens without needing to install *any* transferred to the remote computer. Note that this happens without needing
special software on the server, beyond ``ls`` that supports hyperlinks. to install *any* special software on the server, beyond ``ls`` that supports
hyperlinks.
.. versionadded:: 0.19.0 .. versionadded:: 0.19.0

View File

@ -2417,14 +2417,15 @@ starts in interactive mode and reads its startup rc files.
opt('editor', '.', opt('editor', '.',
long_text=''' long_text='''
The console editor to use when editing the kitty config file or similar tasks. The terminal editor (such as ``vim`` or ``nano``) to use when editing the kitty
The default value of ``.`` means to use the environment variables :envvar:`VISUAL` config file or similar tasks.
and :envvar:`EDITOR` in that order. Note that these environment variables have
to be set when kitty starts, so if they're only set in shell startup scripts, but The default value of . means to use the environment variables :envvar:`VISUAL`
kitty is launched directly from your desktop, kitty will not see them. kitty does try and :envvar:`EDITOR` in that order. If these variables aren't set, kitty will
to read the values from the shell as well, but this process is not entirely robust since run your shell (``$SHELL -l -c env``) to see if your shell config files set
there are a myriad different shells out there. In that case you're better off naming :envvar:`VISUAL` or :envvar:`EDITOR`. If that doesn't work, kitty will cycle
your favorite editor here. through various known editors (``vim``, ``emacs``, etc) and take the first one
that exists on your system.
''' '''
) )