forked from vim-scripts/Vim-R-plugin
-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
Description
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:
- 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. - 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
=.