Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. #Emacs repeat-mode also combines really well with #expreg (expand-region).

#Emacs repeat-mode also combines really well with #expreg (expand-region).

Scheduled Pinned Locked Moved Uncategorized
emacsexpregtreesitter
1 Posts 1 Posters 7 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • plantarum@ottawa.placeP This user is from outside of this forum
    plantarum@ottawa.placeP This user is from outside of this forum
    plantarum@ottawa.place
    wrote last edited by
    #1

    #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)

    1 Reply Last reply
    1
    0
    • R relay@relay.mycrowd.ca shared this topic
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups