sponsor Vim development Vim logo Vim Book Ad

workbook : Notebook-like interaction with R etc.

 script karma  Rating 0/0, Downloaded by 1722  Comments, bugs, improvements  Vim wiki

created by
Tom Link
 
script type
utility
 
description
The long-term goal of this plugin is to provide notebook-like interaction with
interpreted languages similar to the Mathematica or Jupyter (within the limits
of a text editor like vim).

Features~
- Run an interpreter as an inferior process.
- Send code to this process (asynchronously without blocking vim).
- Insert (or dynamically update) the results into the source code (as
  commented out block below the respective source code).
- Transcribe the interaction with the interpreter.
- Provide code completion (see 'omnifunc') for supported filetypes.

How to use this plugin~
- Open a file with a supported filetype (see below or
  |workbook#GetSupportedFiletypes()|).
- Type |:Workbook| or add the filetype to
  |g:workbook_autosetup_filetypes| to automatically enable the workbook
  mode for the specified filetypes.
- Press <c-cr> to evaluate the current paragraph.
- Press <localleader>w<F1> for help on other commands and maps.

The following filetypes are supported~
- R (supports code completion)
- vim
- sh (default: bash)

Currenty, the main use case is to interact with R. Other than other
well-known R-related vim plugins, the workbook plugin has no non-vim
dependencies and works at least on Linux and Windows with no problems.
The vim and the bash backend are mostly there to get the code right.
 
install details
Either use the zip archive:
    - Download the zip archive
    - Extract it to ~/.vim/pack/tml/start/workbook

or install from github:
    - Start a terminal
    - Change the working directory to ~/.vim/pack/tml/start/
    - Type: git clone https://github.com/tomtom/workbook_vim

NOTE: On Windows, ~/.vim might be ~/vimfiles. Please see 'runtimepath' for
details.


Requirements~

This script requires tlib (vimscript #1863) to be installed -- see
https://github.com/tomtom/tlib_vim.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
workbook.zip 0.02 2017-03-16 7.0 Tom Link - Script ID
- vim_raw, vim_nl: NEW wait_after_startup property
- Command-line completion for :Workbook
- Proper error for unsupported filetypes
- g:workbook#map_evalblock: Block expression is configurable
- Improve maps & movements
- Misc enhancements + exprimental filetypes
- FIX fsharp
- Experimental support for scala
- workbook#OmniComplete: Always include omnifunc results if available
- Slightly improved: f#, scala
- Eval: always wrap code
- r: use save & restore by default; support for codetools::checkUsage(), formatR::tidy_source()
- FIX maps; FIX rmd support; FIX R support for formatR
- Misc enhancements: Improved Rmarkdown (rmd) support etc.
- Support for ruby
MD5 checksum: 873d7f1fec86456cd267c9e29e8796cd
workbook.zip 0.01 2017-02-14 8.0 Tom Link Initial upload
ip used for rating: 3.141.24.134

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github