https://github.com/stevenmmortimer/sectioncomment
RStudio Addin to Create Section Comments
https://github.com/stevenmmortimer/sectioncomment
Last synced: about 1 year ago
JSON representation
RStudio Addin to Create Section Comments
- Host: GitHub
- URL: https://github.com/stevenmmortimer/sectioncomment
- Owner: StevenMMortimer
- License: other
- Created: 2016-12-09T05:43:22.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-09T19:08:56.000Z (over 9 years ago)
- Last Synced: 2025-01-29T18:22:14.720Z (over 1 year ago)
- Language: R
- Size: 9.67 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sectioncomment
Creates an 80 character width comment right-padded with hyphens, similar to how
comments are recommended in Hadley's style guide (http://adv-r.had.co.nz/Style.html) which
recommends: "Use commented lines of - and = to break up your file into easily readable chunks."
```r
# Load data ---------------------------
# Plot data ---------------------------
```
The additional benefit is that comments formatted in this manner appear in the selection box
at the bottom left of the Source Pane for easier navigation.

## System Requirements
* Run RStudio v0.99.878 or later
-
* Run `rstudioapi` package v0.5 or later
- `install.packages("rstudioapi", type = "source")`
* Populate your *Addins* dropdown menus with some examples
- `devtools::install_github("rstudio/addinexamples", type = "source")`
## Installation
```r
devtools::install_github("ReportMort/sectioncomment")
```
## Usage
#### Change Existing Commment to Section Comment
Useful to convert your existing comments into sections
in order to help with code readability

#### Select Text and Convert all Comments to Section Comments
If you select a multiple lines of text then all comments
within the selection will be converted to section comments
after clicking `Addins > Section Comment`

#### Create a New Comment as a Section Comment
Useful when you just want to add placeholder section
comments to come back and fill in later

#### Scan Entire Document for Comments to Convert
If you put the cursor at Line 1, Column 1 or hit `CTRL+A` before
clicking `Addins > Section Comment`, then all comments prefixed
with 2 or more hashes will be converted to Section Comments
