forked from r-lib/usethis
/
edit.Rd
65 lines (56 loc) 路 2.05 KB
/
edit.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/edit.R
\name{edit}
\alias{edit}
\alias{edit_r_profile}
\alias{edit_r_environ}
\alias{edit_r_buildignore}
\alias{edit_r_makevars}
\alias{edit_rstudio_snippets}
\alias{edit_rstudio_prefs}
\alias{edit_git_config}
\alias{edit_git_ignore}
\title{Open configuration files}
\usage{
edit_r_profile(scope = c("user", "project"))
edit_r_environ(scope = c("user", "project"))
edit_r_buildignore(scope = c("user", "project"))
edit_r_makevars(scope = c("user", "project"))
edit_rstudio_snippets(
type = c("r", "markdown", "c_cpp", "css", "html", "java", "javascript", "python",
"sql", "stan", "tex")
)
edit_rstudio_prefs()
edit_git_config(scope = c("user", "project"))
edit_git_ignore(scope = c("user", "project"))
}
\arguments{
\item{scope}{Edit globally for the current \strong{user}, or locally for the
current \strong{project}}
\item{type}{Snippet type (case insensitive text).}
}
\value{
Path to the file, invisibly.
}
\description{
\itemize{
\item \code{edit_r_profile()} opens \code{.Rprofile}
\item \code{edit_r_environ()} opens \code{.Renviron}
\item \code{edit_r_makevars()} opens \code{.R/Makevars}
\item \code{edit_git_config()} opens \code{.gitconfig} or \code{.git/config}
\item \code{edit_git_ignore()} opens \code{.gitignore}
\item \code{edit_rstudio_snippets()} opens RStudio's snippet config for the given type.
\item \code{edit_rstudio_prefs()} opens RStudio's preference file.
}
}
\details{
The \verb{edit_r_*()} functions consult R's notion of user's home directory.
The \verb{edit_git_*()} functions (and \pkg{usethis} in general) inherit home
directory behaviour from the \pkg{fs} package, which differs from R itself
on Windows. The \pkg{fs} default is more conventional in terms of the
location of user-level Git config files. See \code{\link[fs:path_expand]{fs::path_home()}} for more
details.
Files created by \code{edit_rstudio_snippets()} will \emph{mask}, not supplement,
the built-in default snippets. If you like the built-in snippets, copy them
and include with your custom snippets.
}