knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

tabs

EXPERIMENTAL

Very rough sketch, many things are likely to change or break.

{tabs} extends {rstudioapi} to be able to conveniently close or move tabs, show diffs between unsaved and saved, restore tabs from cache etc.

Installation

Install with:

remotes::install_github("moodymudskipper/tabs")

How to

tabs_ functions mostly take a tidy selection as their main arg, which is applied on tab names. e.g. tabs_keep(starts_with("a"))

The most important functions:

By default when closing a tab might cause losing unsaved changeds a diff is shown and a choice is proposed.

The usual tidy selection helpers can be used to select by tab name or file name, ignoring the extension.

Other helpers are available :

Note

This package makes assumption on the way RStudio stores information about tabs, it's undocumented so the day they change it the package will break.

Luckily this should not be critical since this package is made for interactive use so hopefully whenever it breaks we can adapt and move on without much damage done.



moodymudskipper/tabs documentation built on June 26, 2022, 10:12 a.m.