nanozuki / tabby.nvim

A declarative, highly configurable, and neovim style tabline plugin. Use your nvim tabs as a workspace multiplexer!
MIT License
599 stars 21 forks source link

feat(mappings): Add `focus_visual_tab` mapping #12

Closed EdenEast closed 3 years ago

EdenEast commented 3 years ago

focus_visual_tab is a useful keymapping helper function that selects a tab based on the its location visually in the tabline. This is useful when tabs are moved around. The tab id's or count's might not be in the correct order. This function helps to create a mapping that will select the tab based on its place on the tabline.

Example mappings:

nnoremap 1 :lua require("tabby.mappings.").focus_visual_tab(1) nnoremap 2 :lua require("tabby.mappings.").focus_visual_tab(2) nnoremap 3 :lua require("tabby.mappings.").focus_visual_tab(3) nnoremap 4 :lua require("tabby.mappings.").focus_visual_tab(4) ...

Reference: #9

EdenEast commented 3 years ago

This is an example pr from the initial issue. Not sure on the naming because that is always hard but it gives an idea of the usecase. If you are interested in this pr I would also update the readme.

nanozuki commented 3 years ago

closed by https://github.com/nanozuki/tabby.nvim/issues/9#issuecomment-938398228