-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
try: | ||
import pydiploy | ||
import vim | ||
import string | ||
|
||
fabile = string.join(vim.current.buffer, "\n") | ||
fabfile = pydiploy.prepare.generate_fabfile_simple() | ||
|
||
filename = vim.current.buffer.name | ||
|
||
f = open(filename, 'w') | ||
f.write(fabfile) | ||
f.close() | ||
|
||
print "Fabfile for simple app written to "+filename | ||
|
||
except ImportError, e: | ||
print "Pydiploy package not installed, please run: pip install pydiploy" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
if !has('python') | ||
finish | ||
endif | ||
|
||
function! InsertFabfileSimple() | ||
|
||
if filereadable($HOME."/.vim/bundle/pydiploy-vim/plugin/insertfabfilesimple.py") | ||
pyfile $HOME/.vim/bundle/pydiploy-vim/plugin/insertfabfilesimple.py | ||
elseif filereadable($HOME."/.vim/plugin/insertfabfilesimple.py") | ||
pyfile $HOME/.vim/plugin/insertfabfilesimple.py | ||
else | ||
call confirm("Error: insertfabfilesimple.py cannot be found! Please reinstall the plugin", 'OK') | ||
finish | ||
endif | ||
:e | ||
endfunc | ||
|
||
command! PYDIPLOYFABSIMPLE call InsertFabfileSimple() |