Fix run_kitten shortcuts in readme

This commit is contained in:
Kovid Goyal 2018-04-15 20:04:32 +05:30
parent 52f4e81d59
commit c1667d9fc1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 5 deletions

View File

@ -33,9 +33,10 @@
:sc_previous_window: pass:quotes[`ctrl+shift+[`]
:sc_restore_font_size: pass:quotes[`ctrl+shift+backspace`]
:sc_run_kitten_text_hints: pass:quotes[`ctrl+shift+e`]
:sc_run_kitten_text_hints___type_line___program__: pass:quotes[`ctrl+shift+p → l`]
:sc_run_kitten_text_hints___type_path: pass:quotes[`ctrl+shift+p → shift+f`]
:sc_run_kitten_text_hints___type_path___program__: pass:quotes[`ctrl+shift+p → f`]
:sc_run_kitten_text_hints_type_line_program: pass:quotes[`ctrl+shift+p → l`]
:sc_run_kitten_text_hints_type_path: pass:quotes[`ctrl+shift+p → shift+f`]
:sc_run_kitten_text_hints_type_path_program: pass:quotes[`ctrl+shift+p → f`]
:sc_run_kitten_text_hints_type_word_program: pass:quotes[`ctrl+shift+p → w`]
:sc_scroll_end: pass:quotes[`ctrl+shift+end`]
:sc_scroll_home: pass:quotes[`ctrl+shift+home`]
:sc_scroll_line_down: pass:quotes[`ctrl+shift+down` or `ctrl+shift+j`]
@ -298,7 +299,7 @@ browser.
image::hints_mode.png?raw=true[URL hints mode]
Similarly, you can press {sc_run_kitten_text_hints___type_path___program__} to
Similarly, you can press {sc_run_kitten_text_hints_type_path_program} to
select anything that looks like a path or filename and then insert it into the
terminal, very useful for picking files from the output of a git or ls command and
adding them to the command line for the next command.

View File

@ -16,7 +16,7 @@
for line in open('kitty/kitty.conf'):
if line.startswith('map '):
_, sc, name = line.split(maxsplit=2)
name = name.rstrip().replace(' ', '_').replace('-', '_')
name = name.rstrip().replace(' ', '_').replace('-', '_').replace('___', '_').replace('__', '_').strip('_')
defns[name].append('`' + sc.replace('>', '') + '`')
defns = [