Customizing hotkey!

22 views
Skip to first unread message

Ivan Bezerra Allaman

unread,
May 17, 2016, 3:52:13 PM5/17/16
to Vim-R-plugin
Hi Jakson!

I'm trying to customize a hotkey without success.

map <silent> <LocalLeader>hh :call g:SendCmdToR("render('input.Rmd','ioslides_presentation')") 

Where is the error?

Thank's!

Jakson Alves de Aquino

unread,
May 17, 2016, 4:19:08 PM5/17/16
to Vim-R-plugin
Hi Ivan,

The problems are:
  • In this case, it is better to restrict the command to Normal mode: nmap
  • The name of the file should be dynamically defined: expand("%")
  • The final carriage return is missing: <CR>
So, try this:

nmap <silent> <LocalLeader>hh :call g:SendCmdToR("render('".expand("%")."','ioslides_presentation')")<CR>

Best,

Jakson
Reply all
Reply to author
Forward
0 new messages