#Emacs repeat-mode also combines really well with #expreg (expand-region). expreg looks like a worthy successor to Magnars' `expand-region` package, which many of us have grown to love.

I have it set so `C-c y` marks the semantic 'thing' at point, and subsequent presses of `y` or `u` expand or contract to the next semantic unit.

Works well out of the box. Should work even better if/when I get my head around #treesitter.

This is my config:

(repeat-mode 1)
(defvar expreg-expand-keymap
(define-keymap
"y" #'expreg-expand
"u" #'expreg-contract))

(put #'expreg-expand 'repeat-map 'expreg-expand-keymap)
(put #'expreg-contract 'repeat-map 'expreg-expand-keymap)

(global-set-key (kbd "C-c y") #'expreg-expand)