aceDiffEditor: Ace diff editor

Description Usage Arguments Note Examples

View source: R/aceDiffEditor.R

Description

Open the Ace diff editor.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
aceDiffEditor(
  file1,
  file2,
  mode = NULL,
  theme = NULL,
  fontSize = 14,
  tabSize = NULL,
  autoCompletion = TRUE,
  snippets = FALSE,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

file1, file2

paths to files

mode

the language of the files; if NULL, the mode is guessed from the extension of the first file; run getAceModes to get the list of available modes

theme

the theme of the editor; if NULL, the theme is set to the theme currently used in RStudio; run getAceThemes to get the list of available themes

fontSize

font size

tabSize

number of spaces for the indentation (usually 2 or 4); if NULL, it is set to the one used in RStudio

autoCompletion

logical, whether to enable the auto completion

snippets

logical, whether to enable the snippets (for example, there is a snippet for switch in JavaScript)

width, height

dimensions; the default values are nice for usage in the RStudio viewer pane

elementId

a HTML id for the container; this is useless for common usage

Note

The diff editor does not correctly reacts when one resizes the RStudio viewer pane. You have to resize it before opening the diff editor.

Examples

1
2
file <- system.file("htmlwidgets", "aceEditor.css", package = "aceEditor")
aceDiffEditor(file, file)

Example output



aceEditor documentation built on March 6, 2021, 5:06 p.m.