Skip to content
stalker57241Public

About

Plugin, that stores background files as tmpfiles

Topics

Resources

Code of conduct

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

30 Commits

Folders and files

Repository files navigation

Tabview

Allows to edit multiple tabs independantly.

Caution: consumes new windows if it haven't assigned owner property

Installation & Usage

To download it:

git clone https://github.com/stalker57241/tabview ~/.config/vis/plugins/tabview

Usage

Add to visrc.lua

local tabview = require('plugins/tabview')
-- If installed throw vis-plug
local tabview = plug.plugins.tabview

vis.events.subscribe(vis.events.INIT, function()
  tabview.init()
end)

Frontend

Available at TabDisplay.

Available commands

  • :open <filename> creates new tab. Overriden
  • :nexttab / :prevtab: opens next/previous tab. Tabs is cycled
  • :tabcount shows tab count. Duplicate proof
  • :closetab closes current tab, cancelling changes
    • Don't forget to save them.

Recommendations

There is interesting variants to bind it:

-- View active tab count
vis:map(vis.modes.NORMAL, "<C-t>t", function() vis:command("tabcount") end)
-- List tabs
vis:map(vis.modes.NORMAL, "<C-t>h", function() vis:command("prevtab") end)
vis:map(vis.modes.NORMAL, "<C-t>l", function() vis:command("nexttab") end)
-- Closes tab, like :q!
vis:map(vis.modes.NORMAL, "<C-t>q!", function() vis:command("closetab") end)

Dependants

Marks:

  • Optional: Optionally depends of this plugin
  • Required: Depends of this plugin
  • Required

Changes: Adds ui for listing tabs, using API

  • Optional

Changes: Now file selection opens a new tab.

Future ideas

  • Add frontend for this plugin (TabDisplay)
  • Add :wt <filename|idx> to save changes fpr specified tab
  • Add :wtall to save all changes for tabs.
  • Add tabs for each window

For developers

API available here

About

Plugin, that stores background files as tmpfiles

Topics

Resources

Code of conduct

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages