Permalink
Browse files

Version 111014

* Fixed spell check bug in R documentation files (.Rd).
* Fixed beep bug when sending commands to R.
* New option: vimrplugin_notmuxconf.
* Fixed bug when starting tmux before vim: the environment variable VIMRPLUGIN_TMPDIR was not being set. Thanks to Michel Lang for reporting the bug and helping to track its source, and thanks to Eric Dewoestine for explaining how to fix the bug.
* Fixed bug in code indentation after unbalanced brackets and parenthesis when r_indent_align_args = 0 (thanks to Chris Neff and Peng Yu for reporting the bugs).
* Really make the use of AppleScript the default on OS X (thanks for Jason for reporting the bug).
  • Loading branch information...
1 parent adf53a4 commit 5660837420c7fbc964ea77f592c8de925fd51953 @jalvesaq jalvesaq committed with Oct 14, 2011
Showing with 818 additions and 509 deletions.
  1. +7 −4 README
  2. +229 −100 doc/r-plugin.txt
  3. +4 −4 ftplugin/rnoweb.vim
  4. +19 −2 indent/r.vim
  5. +207 −87 r-plugin/common_global.vim
  6. +262 −259 r-plugin/functions.vim
  7. +63 −40 r-plugin/omniList
  8. +1 −2 r-plugin/screenrc
  9. +9 −0 r-plugin/screenrc.xterm
  10. +3 −3 r-plugin/tmux.conf
  11. +4 −1 r-plugin/vimbrowser.R
  12. +6 −3 r-plugin/windows.py
  13. +4 −4 syntax/rhelp.vim
View
11 README
@@ -2,27 +2,29 @@ This is a mirror of http://www.vim.org/scripts/script.php?script_id=2628
This plugin improves Vim's support for editing R code and makes it possible to integrate Vim with R. The functionality is similar to what you can find in Tinn-R and ESS mode of Emacs. This filetype plugin uses either tmux or screen with the Screen plugin (Linux, OS X, or other Unix, vimscript #2711) or Python (Microsoft Windows) or Apple Script (Mac OS X) to communicate with R.
-Screenshots and Debian package: http://sites.google.com/site/jalvesaq/vimrplugin
+Screenshots and Debian package: http://www.lepem.ufc.br/jaa/vim-r-plugin.html
Development code: https://github.com/jcfaria/Vim-R-plugin
MAIN FEATURES:
- * Syntax highlighting for R syntax, including:
+ * Syntax highlighting for R code, including:
- Special characters in strings.
- Functions of all installed packages (must be updated manually).
- Special highlighting for R output (.Rout files).
- Spell check only strings and comments.
- Fold code when foldmethod=syntax.
* Syntax highlighting for RHelp syntax.
- * Smart indentation for R, RHelp and Rnoweb syntax.
+ * Smart indentation for R syntax.
+ * Smart indentation for RHelp syntax.
* Integrated communication with R:
- Start/Close R.
- Send lines, selection, paragraphs, functions, blocks, entire file.
- Send commands with the object under cursor as argument: help, args,
plot, print, str, summary, example, names.
- Send to R the Sweave and pdflatex commands.
+ - Run R inside a Vim's buffer.
* Omni completion (auto-completion) for R objects (.GlobalEnv and installed
- packages). The list of installed packages must be updated manually.
+ packages. The list of installed packages must be updated manually.
* Ability to see R's documentation in a Vim's buffer:
- Automatic calculation of the best layout of the R documentation buffer
(split the window either horizontally or vertically according to the
@@ -88,6 +90,7 @@ FILES:
r-plugin/vimSweave.R
r-plugin/r.snippets
r-plugin/screenrc
+ r-plugin/screenrc.xterm
r-plugin/specialfuns.R
r-plugin/tex_indent.vim
r-plugin/tmux.conf
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -17,7 +17,7 @@
" Authors: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Jose Claudio Faria
"
-" Last Change: Sat Jul 30, 2011 12:42PM
+" Last Change: Tue Aug 30, 2011 09:25AM
"==========================================================================
" Only do this when not yet done for this buffer
@@ -35,14 +35,14 @@ runtime ftplugin/tex_latexSuite.vim
" Shell)
let syn_rout_latex = 1
-" Source scripts common to R, Rnoweb, Rhelp and rdoc files:
+" Source scripts common to R, Rnoweb, Rhelp and Rdoc:
runtime r-plugin/common_global.vim
if exists("g:rplugin_failed")
finish
endif
-" Some buffer variables common to R, Rnoweb, Rhelp and rdoc file need be
-" defined after the global ones:
+" Some buffer variables common to R, Rnoweb, Rhelp and Rdoc need to be defined
+" after the global ones:
runtime r-plugin/common_buffer.vim
setlocal iskeyword=@,48-57,_,.
View
@@ -2,7 +2,7 @@
" Language: R
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" URL: http://www.vim.org/scripts/script.php?script_id=2628
-" Last Change: Tue Feb 08, 2011 10:03AM
+" Last Change: Sun Sep 11, 2011 10:55PM
" Only load this indent file when no other was loaded.
@@ -451,17 +451,34 @@ function GetRIndent()
let ind = indent(lnum)
let pind = indent(plnum)
+ if g:r_indent_align_args == 0 && pb != 0
+ let ind += pb * &sw
+ return ind
+ endif
+
+ if g:r_indent_align_args == 0 && bb != 0
+ let ind += bb * &sw
+ return ind
+ endif
+
if ind == pind || (ind == (pind + &sw) && pline =~ '{$' && ppost_else == 0)
return ind
endif
- while pind < ind && plnum > 0
+ let pline = getline(plnum)
+ let pbb = s:Get_paren_balance(pline, '[', ']')
+
+ while pind < ind && plnum > 0 && ppb == 0 && pbb == 0
let ind = pind
let plnum = s:Get_prev_line(plnum)
let pline = getline(plnum)
+ let ppb = s:Get_paren_balance(pline, '(', ')')
+ let pbb = s:Get_paren_balance(pline, '[', ']')
while pline =~ '^\s*else'
let plnum = s:Get_matching_if(plnum, 1)
let pline = getline(plnum)
+ let ppb = s:Get_paren_balance(pline, '(', ')')
+ let pbb = s:Get_paren_balance(pline, '[', ']')
endwhile
let pind = indent(plnum)
if ind == (pind + &sw) && pline =~ '{$'
Oops, something went wrong.

0 comments on commit 5660837

Please sign in to comment.