vim: Edit a File With "VIM" if Possible

View source: R/vim.R

vimR Documentation

Edit a File With 'VIM' if Possible

Description

Just a wrapper to file.edit, trying to use [g]vim as editor, if installed.

Usage

vim(...)

Arguments

...

See file.edit.

Value

See file.edit.

See Also

Other operating system functions: clipboard_path(), file_copy(), file_save(), get_boolean_envvar(), get_run_r_tests(), is_installed(), is_r_package_installed(), is_success(), is_windows(), view(), wipe_tempdir(), with_dir()

Examples

if (interactive()) {
    path <- file.path(tempdir(), "foo.txt")
    writeLines(c("abc", "xyz"), con = path)
    vim(path)
}

fritools documentation built on Nov. 19, 2023, 1:06 a.m.