Skip to content

Commit

Permalink
New valid value for vimrplugin_assign (3)
Browse files Browse the repository at this point in the history
Close #194
  • Loading branch information
jalvesaq committed Dec 2, 2015
1 parent 289da96 commit 9a8efdf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion doc/r-plugin.txt
Expand Up @@ -1331,7 +1331,15 @@ To completely disable this feature, put in your |vimrc|:
<
If you need to type many object names with underscores, you may want to change
the value vimrplugin_assign to 2. Then, you will have to type two `_` to get
them converted into `<-`.
them converted into `<-`. Alternatively, if the value of vimrplugin_assign is
3, the plugin will run the following command in each buffer containing R code
(R, Rnoweb, Rhelp, Rrst, and Rmd):
>
iabb <buffer> _ <-
<
That is, the underscore will be replaced with the assign operator only if it
is preceded by a space and followed by a non-word character.


------------------------------------------------------------------------------
*vimrplugin_objbr_place*
Expand Down
3 changes: 3 additions & 0 deletions r-plugin/common_buffer.vim
Expand Up @@ -62,3 +62,6 @@ if exists("*RCheckLibList")
autocmd BufEnter <buffer> call RCheckLibList()
endif

if g:vimrplugin_assign == 3
iabb <buffer> _ <-
endif

0 comments on commit 9a8efdf

Please sign in to comment.