Vim: an underscore (_) is automatically converted to the (<-)

R I write scripts in Vim for quite some time. Since an hour ago, I started to deal with the problem that every time I type the underscore character ( _ ), it is automatically converted to <- .

I changed this to happen which setting? Thanks!

+1
source share
4 answers

:verbose imap _ I should tell you what kind of (possibly, filetype plugin) installed it.

This is less likely to be an acronym, but :verbose ia _ tell you.

+4
source

VIM: r-plugin really changes the display, but in section 4.1 documentation states that "it is possible to insert the actual underscore in your file, make a second underscore."

Thus, although you can disable convert _ to <- easy to temporarily override.

+3
source

It may also be useful to add that the easy setup may include the re-appointment of the operator, such as setting .vimrc :

 " Nvim-R extra settings "" Change assignment operator let R_assign_map = "|" 

R Assign assignment operator <- up Shift + | . This function is described this documentation . In the R_assign .

0
source

To add additional options for what you can do, Nvim-R is not only how R_assign_map @konrad , but R_assign , which controls how the function works, in response to the previous duplicate reply mentioned that the old version of R_assign (older name ) as a response is set to 0.

I have found that the actual way to use this variable, at least on the date of publication (until the variable is still called R_assign ), that there are 2 possible values, thus, 3 functions. I just tried to values ​​between -1 and 3, but I found 1 and 2 to create something, so here they are:

  • Invalid values ( let R_assign=-1 (anything other than 1 and 2)) did so to _ made <- and any subsequent key by a <-
  • let R_assign=1 is created by default behavior registered 1 _ makes <- and next_ does (thus two _) _ single
  • let R_assign=2 reverses it so that one does _ _ _ and the other does <- (so that the two _ for a <-)
0
source

All Articles