Skip to content

Delapouite/kakoune-select-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

kakoune-select-view

kakoune command to select the visible part of a buffer.

Install

Add select-view.kak to your autoload dir: ~/.config/kak/autoload/.

Or via plug.kak:

plug 'delapouite/kakoune-select-view' %{
  # Suggested mappings
  map global normal <a-%> ': select-view<ret>' -docstring 'select view'
  map global view s '<esc>: select-view<ret>' -docstring 'select view'
}

Usage

Sometimes you need to edit multiple occurrences of text that seat right under your nose but are distributed in such a way that they are impossible to quickly select using classic text objects.

Also, you can't rely on the % primitive (select whole buffer), because it would expand your focus of action too far away and include portions of the buffer you don't want to change.

As its name implies, the select-view command answers this problematic by only selecting the visible part of the buffer.

It takes care of the scrolloff value which means it may scroll the buffer slightly.

See also

Licence

MIT

Thanks a lot to alex for the original implementation on IRC

About

Select the visible part of a buffer

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published