GitXplorerGitXplorer
u

shadow.vim

public
40 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
c0d196c873d789b2a7a983ed9049b32c8e81e922

adding an experimental command to cancel shadow events

uujihisa committed 13 years ago
Unverified
8da9f2c4563c1f4f0ed1e7e2f34d2917c9c413b0

http://www.vim.org/scripts/script.php?script_id=3384

uujihisa committed 14 years ago
Unverified
6c377e98f9868173898c60e13c5baa7d6a41ccd2

releasing version 1.0, the initial version, finally.

uujihisa committed 14 years ago
Unverified
51c91c0dac659ccc7a818045dc882ef6d2599959

fixing a bug related to &ff; readfile and writefile don't care about &ff

uujihisa committed 14 years ago
Unverified
484b03e3cb5ceee1c7c6a5a0ce0ebac062f4cf0b

FileChangedShell actually needs to fire modeline

uujihisa committed 14 years ago
Unverified
ec1b77478e6589609fe7fb1c5350182fbdad6e06

not only BufRead,BufNewFile but also FileChangedShell makes the Vim to check the shadow file

uujihisa committed 14 years ago

README

The README file for this repository.

shadow.vim

"Nobody knows the Java code you committed is originally written in Scheme."

Shadow.vim is a plugin to support you code with a wrapper transparently in a pluggable way.

Usage

Assuming the product is a.pl, create a.pl.shd first.

a.pl (in Vim):

## ruby -e 'puts $<.read.gsub(/$/, ";")'
$a = 1
print($a)

Open a.pl in Vim. The Vim actually shows the contents of a.pl.shd. When you save the file, the command in the first line without ## runs, then the actual a.pl will be the result.

a.pl (actually):

$a = 1;
print($a);

Install

Unarchive the zip file into a directory that is under &rtp of your Vim, including ~/.vim dir.

Commands

There's no commands or functions you have to use explicitly.

Use Case

Here there are three examples, but you can use more general purposes.

  • Commit JavaScript files which was written in CoffeeScript

    • before

            ## coffee -csb
            f = (x) -> x + 1
            print f 10
      
            # vim: set ft=coffee :
      
    • after

            var f;
            f = function(x) {
              return x + 1;
            };
            print(f(10));
      
  • Use cpp command before committing Java files.

  • Markdown, Haml or something else to HTML

Limitation

The pair of a shadow file and the actual file is always 1-to-1 pair. That makes everything simple.

Author

Tatsuhiro Ujihisa