Skip to content

gsuuon/tshjkl.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

tshjkl.nvim 🌳

Tree-sitter hjkl mode

tshjkl

Usage

Use the toggle key to switch to ts mode, then hjkl to scope in/out or move to the next/previous sibling. The toggle map is <M-v> (Alt-v) and nodes are selected by default. Toggle, movement keys, extmark highlights and select mode can be configured - check init.lua to see configuration and defaults.

Demo

tshjkl_intro.mp4

Example

Unwrapping a function

  • toggle on the inner body
  • d
  • toggle the node to replace
  • p
tshjkl_example_remove_wrap.mp4

Install

use 'gsuuon/tshjkl.nvim'

Keymaps

Check binds for more

v — visual select the current node (if config.select_current_node is false)
b — visual select backwards

h — parent
j — next sibling
k — previous sibling
l — child

H — top-most parent
J — last sibling
K — first sibling
L — inner-most child


TODO

  • Can switch between highlight and select mode
    • we can select from highlight mode but it would be nice to be able to toggle this

About

Tree-sitter hjkl movement for neovim

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published