Skip to content

Improve support for \ff #94

@klmr

Description

@klmr

I particularly like the </kbd>rf command to load a function and jump to the next. However, there are two issues with Vim-R’s implementation which means that I cannot use the feature to its full strength:

  1. Functions need to have a function body enclosed by { … }. Functions consisting of a single statement – e.g. id <- function (x) x – are not supported. This is a shame, since {s in R is unlike braces in C-like languages: they are literally just another R function which groups multiple expressions, and using single expressions unbraced is well in line with R’s functional philosophy.
  2. Functions need to be assigned with <-, using = does not work (the error message “The function assign operator <- was not found.” is displayed).

Both of these things should be fixed, i.e.

  • Support single-expression function bodies
  • Support function assignment via =.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions