-
Notifications
You must be signed in to change notification settings - Fork 19
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
0 parents
commit 07ae732
Showing
13 changed files
with
15,526 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.swp |
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,9 @@ | ||
SHELL=/bin/bash | ||
|
||
all: dist | ||
|
||
dist: | ||
cd supertab; make | ||
cd findAndroidManifest; make | ||
cd javacomplete; make | ||
cp Snipmate.makefile snipmate/Makefile; cd snipmate; make |
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,11 @@ | ||
SHELL=/bin/bash | ||
|
||
all:dist | ||
|
||
dist: | ||
@rm snipmate.vmb 2> /dev/null || true | ||
@vim -c 'r! find after autoload doc ftplugin plugin snippets syntax -type f' \ | ||
-c '$$,$$d _' -c '%MkVimball snipmate . ' -c 'q!' | ||
|
||
clean: | ||
@rm -R build 2> /dev/null || true |
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,35 @@ | ||
#/usr/bin/env sh | ||
|
||
echo "[INFO] Checking for ctags." | ||
which ctags || { echo "[ERR] ctags not found. Please install ctags.\nhttp://ctags.sourceforge.net/"; exit 1; } | ||
|
||
echo "[INFO] Checking for ANDROID_SDK env variable." | ||
echo ${ANDROID_SDK:?"[ERR] ANDROID_SDK not set."} | ||
|
||
echo "[BUILDING] Creating tags file for android." | ||
if ! ctags --recurse --langmap=Java:.java --languages=Java --verbose -f ~/.vim/tags $ANDROID_SDK/sources | ||
then | ||
echo "[ERR] ctags failed. Exiting..." | ||
exit 1 | ||
fi | ||
|
||
echo "[VIM] Adding things to ~/.vimrc" | ||
echo "\"Added by android-vim:" >> ~/.vimrc | ||
echo "set tags=`echo ~`/.vim/tags" >> ~/.vimrc | ||
echo "autocmd Filetype java setlocal omnifunc=javacomplete#Complete" >> ~/.vimrc | ||
echo "let g:SuperTabDefaultCompletionType = 'context'" >> ~/.vimrc | ||
|
||
echo "[INFO] Cloning Supertab" | ||
git clone git://github.com/ervandew/supertab.git supertab | ||
echo "[INFO] Cloning Snipmate" | ||
git clone git://github.com/msanders/snipmate.vim.git snipmate | ||
|
||
echo "[BUILDING] Creating vimballs" | ||
make | ||
|
||
echo "[INSTALLING] Installing supertab, javacomplete, and findAndroidManifest" | ||
vim findAndroidManifest/findmanifest.vmb -c 'so %' -c 'q!' | ||
vim supertab/supertab.vmb -c 'so %' -c 'q!' | ||
vim javacomplete/javacomplete.vmb -c 'so %' -c 'q!' | ||
vim snipmate/snipmate.vmb -c 'so %' -c 'q!' | ||
|
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,11 @@ | ||
SHELL=/bin/bash | ||
|
||
all:dist | ||
|
||
dist: | ||
@rm findmanifest.vmb 2> /dev/null || true | ||
@vim -c 'r! find doc after -type f' \ | ||
-c '$$,$$d _' -c '%MkVimball findmanifest . ' -c 'q!' | ||
|
||
clean: | ||
@rm -R build 2> /dev/null || true |
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,46 @@ | ||
function! FindManifestFile() | ||
python << endpython | ||
|
||
import vim | ||
import os | ||
|
||
def find_manifest(path): | ||
found = False | ||
|
||
dirs = os.listdir(path) | ||
for d in dirs: | ||
if d=='AndroidManifest.xml': | ||
found = True | ||
|
||
return found | ||
|
||
found = False | ||
pwd = os.getcwd() | ||
|
||
found = find_manifest(pwd) | ||
|
||
while not found: | ||
if pwd=='/': | ||
break | ||
os.chdir(pwd+'/..') | ||
pwd = os.getcwd() | ||
found = find_manifest(pwd) | ||
|
||
if found: | ||
ANDROID_SDK = os.environ['ANDROID_SDK'] | ||
if ANDROID_SDK=='': | ||
exit(1) | ||
|
||
cmd = "let s:androidSdkPath = '" + ANDROID_SDK + "'" | ||
vim.command(cmd) | ||
cmd = "vimgrep /target=/j " + pwd + "/project.properties" | ||
vim.command(cmd) | ||
vim.command("let s:androidTargetPlatform = split(getqflist()[0].text, '=')[1]") | ||
vim.command("let s:targetAndroidJar = s:androidSdkPath . '/platforms/' . s:androidTargetPlatform . '/android.jar'") | ||
target = vim.eval("s:targetAndroidJar") | ||
cmd = "let $CLASSPATH = '" + target + "'" | ||
vim.command(cmd) | ||
endpython | ||
endfunction | ||
|
||
call FindManifestFile() |
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,51 @@ | ||
" Vimball Archiver by Charles E. Campbell, Jr., Ph.D. | ||
UseVimball | ||
finish | ||
after/ftplugin/java.vim [[[1 | ||
46 | ||
function! FindManifestFile() | ||
python << endpython | ||
|
||
import vim | ||
import os | ||
|
||
def find_manifest(path): | ||
found = False | ||
|
||
dirs = os.listdir(path) | ||
for d in dirs: | ||
if d=='AndroidManifest.xml': | ||
found = True | ||
|
||
return found | ||
|
||
found = False | ||
pwd = os.getcwd() | ||
|
||
found = find_manifest(pwd) | ||
|
||
while not found: | ||
if pwd=='/': | ||
break | ||
os.chdir(pwd+'/..') | ||
pwd = os.getcwd() | ||
found = find_manifest(pwd) | ||
|
||
if found: | ||
ANDROID_SDK = os.environ['ANDROID_SDK'] | ||
if ANDROID_SDK=='': | ||
exit(1) | ||
|
||
cmd = "let s:androidSdkPath = '" + ANDROID_SDK + "'" | ||
vim.command(cmd) | ||
cmd = "vimgrep /target=/j " + pwd + "/project.properties" | ||
vim.command(cmd) | ||
vim.command("let s:androidTargetPlatform = split(getqflist()[0].text, '=')[1]") | ||
vim.command("let s:targetAndroidJar = s:androidSdkPath . '/platforms/' . s:androidTargetPlatform . '/android.jar'") | ||
target = vim.eval("s:targetAndroidJar") | ||
cmd = "let $CLASSPATH = '" + target + "'" | ||
vim.command(cmd) | ||
endpython | ||
endfunction | ||
|
||
call FindManifestFile() |
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,11 @@ | ||
SHELL=/bin/bash | ||
|
||
all:dist | ||
|
||
dist: | ||
@rm javacomplete.vmb 2> /dev/null || true | ||
@vim -c 'r! find doc autoload -type f' \ | ||
-c '$$,$$d _' -c '%MkVimball javacomplete . ' -c 'q!' | ||
|
||
clean: | ||
@rm -R build 2> /dev/null || true |
Oops, something went wrong.