Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ujihisa/shadow.vim
That's not the file. That's shadow.
https://github.com/ujihisa/shadow.vim
Last synced: 30 days ago
JSON representation
That's not the file. That's shadow.
- Host: GitHub
- URL: https://github.com/ujihisa/shadow.vim
- Owner: ujihisa
- Created: 2010-09-27T09:09:32.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2011-08-17T22:42:23.000Z (about 13 years ago)
- Last Synced: 2024-08-05T09:14:30.682Z (3 months ago)
- Language: VimL
- Homepage:
- Size: 1.04 MB
- Stars: 40
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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