https://github.com/tmastny/browse
Navigate and generate links to remote files
https://github.com/tmastny/browse
Last synced: 5 months ago
JSON representation
Navigate and generate links to remote files
- Host: GitHub
- URL: https://github.com/tmastny/browse
- Owner: tmastny
- License: other
- Created: 2019-12-13T01:50:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-09-23T00:23:59.000Z (over 2 years ago)
- Last Synced: 2024-08-13T07:15:14.625Z (8 months ago)
- Language: R
- Homepage:
- Size: 27.1 MB
- Stars: 29
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - tmastny/browse - Navigate and generate links to remote files (R)
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# browse
browse makes it easy to open files in Github from RStudio.
Try the `Browse to remote file` addin while highlighting text in a file.
Alternatively, use `Link to remote file` to automatically copy the url to your clipboard.
This makes it easy to share links in Slack, Github, and Twitter!## Installation
You can install browse with:
```r
devtools::install_github("tmastny/browse")
````browse` now supports Bitbucket and Gitlab.
## Examples
You can also use
```r
browse::browse()
browse::link()
```in the RStudio console to browse to the file and line where your cursor is
in the editor.And inside and outside RStudio, it also works as a command-line tool:

You can use a relative path from your working directory, or an absolute path,
as long as the file is in a git repo.```r
# working directory is the top level of repo
browse("R/browse.R")
browse("R/browse.R#L6-L9")# working directory is the R/ folder of repo
browse("../README.md")# relative or absolute paths to other repos
browse("~/rpackages/dplyr/DESCRIPTION")
```