Skip to content

Commit

Permalink
Change kitty config to use nvim key as pager for the scrollback
Browse files Browse the repository at this point in the history
    By pressing ctrl+shift+h, use the vim key to navigate and copy past
    the content.

    Source: kovidgoyal/kitty#719 (comment)
  • Loading branch information
th-herve committed May 29, 2023
1 parent b88681f commit 4833dbb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions private_dot_config/kitty/kitty.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@ map kitty_mod+right move_window right
map kitty_mod+up move_window up
map kitty_mod+down move_window down

# set nvim key as pager with ctrl+shift+h
scrollback_pager bash -c "exec nvim 63<&0 0</dev/null -u NONE -c 'map <silent> q :qa!<CR>' -c 'set shell=bash scrollback=100000 termguicolors laststatus=0 clipboard+=unnamedplus' -c 'autocmd TermEnter * stopinsert' -c 'autocmd TermClose * call cursor(max([0,INPUT_LINE_NUMBER-1])+CURSOR_LINE, CURSOR_COLUMN)' -c 'terminal sed </dev/fd/63 -e \"s/'$'\x1b'']8;;file:[^\]*[\]//g\" && sleep 0.01 && printf \"'$'\x1b'']2;\"'"

# map ctrl+shift+space send_text all dmenu_run \n
# map ctrl+shift+space focus_or_launch --title "dmenu" kitty @ send_text all dmenu_run \n

0 comments on commit 4833dbb

Please sign in to comment.