sponsor Vim development Vim logo Vim Book Ad

Integrake : Abuse Rake to do project chores around Vim

 script karma  Rating 1/1, Downloaded by 2625  Comments, bugs, improvements  Vim wiki

created by
Idan Arye
 
script type
utility
 
description
GitHub repository: https://github.com/idanarye/vim-integrake

Build systems were originally created to script the build process, but they can do much more - they are actually a great way to organize and run all the project-specific, development-related scripts. You can keep all the scripts for running the project, running unit-tests, cleaning, deploying etc. as different tasks(or targets) in a single build file, and easily run specific tasks from the command-line.

Integrake takes this one step farther - it uses Vim's ruby interface and the Rake API to load Rakefiles and run Rake tasks inside the Vim environment. Integrake tasks, are written in Ruby - which means power, elegance and access to any gem you want - and executed in the environment of the current Vim instance - which means you can interact with the buffers, change settings, modify global Vim variables and execute the commands of your Vim plugins.

Integrake also assists in creation and editing those Integrake tasks, and allows you to easily copy project-type-general Integrake file that you made in advance.

For example - you might always want a :run task that runs your project with specific input(that you often change) and see if it behaves like you want.

    If the project is a command line application - you will simply want execute it in a shell. Nothing fancy here.
    If it's a web service, you want to send an HTTP request to it and display the result. Since Integrake is written with Ruby, you can use Ruby's default HTTP library - install an alternative, easier-to-use library using RubyGems - to easily send that request.
    Some languages and frameworks are painful to run from the command line, but have a Vim plugin that helps running their projects. Since Integrake runs in the environment of the current Vim instance, you can use those plugins from inside the :run task.

Since you always use the same task name - :run - you can have a global key mapping that runs your project in the appropriate way, no matter which type of project it is. And since the task is defined in a file in the project's directory, you can easily change the run arguments to test different things in your project, without having to remap the key.
 
install details
Requirements:

* Ruby installed on your computer(Tested with Ruby 1.9 and 2.0)
* Vim compiled with ruby support(check with ":echo has('ruby')" from Vim)
* Rake gem installed(install with "gem install rake" from the command line)


See ":help integrake-configuration" for configuration details.
 

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
integrake_v1.3.0.zip 1.3.0 2015-09-18 7.0 Idan Arye - Automatically add a task for querying the chosen option of Integrake.option
- Allow passing the option to Integrake.option as an argument
- Add a new prepared autocompletion - :list
- Add input_list - an improved version of Vim's inputlist()
- Fix a bug that prevented invoking IR from regular & block visual mode
integrake_v1.2.0.zip 1.2.0 2014-11-09 7.0 Idan Arye - Add a mechanism for passing data from prerequisites to caller tasks.
- Add option-choosing tasks.
- Add window preparation tasks.
- Add autocompletion with the complete method for `Rake::Task`.
- Isolate the integrake file from the rest of the Vim ruby environment.
- Add `to_vim` for Hash.
integrake_v1.1.1.zip 1.1.1 2014-08-11 7.0 Idan Arye Fix a bug where do_in_window crash when there are no results
integrake_v1.1.0.zip 1.1.0 2014-08-07 7.0 Idan Arye Add functions for operating in Vim windows:
- `find_window_numbers` and `find_window_number` for finding window
   numbers.
- `do_in_windows` and `do_in_windows` for running code in certain
   windows.

Also fix a bug where you can't run commands with `!`
integrake.zip 1.0.1 2013-11-08 7.0 Idan Arye Removed a duplicate `IR` tag from the doc. Just because it causes an error on pathogen's `:Helptags`...
integrake.zip 1.0.0 2013-09-27 7.3 Idan Arye Initial upload
ip used for rating: 142.132.191.50

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