No edit summary |
JohnBeckett (talk | contribs) m (Reverted edits by 185.23.124.59 (talk | block) to last version by 196.15.16.100) |
||
(15 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
{{review}} |
{{review}} |
||
+ | {{TipImported |
||
− | {{Tip |
||
|id=1259 |
|id=1259 |
||
+ | |previous=1251 |
||
− | |title=Edit java's jar, war, ear, sar, rar files |
||
+ | |next=1260 |
||
− | |created= |
+ | |created=2006 |
|complexity=basic |
|complexity=basic |
||
|author=emmby |
|author=emmby |
||
− | |version= |
+ | |version=7.0 |
|rating=32/16 |
|rating=32/16 |
||
+ | |category1= |
||
− | |text= |
||
+ | |category2= |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
+ | <pre> |
||
⚫ | |||
+ | au BufRead,BufNewFile *.jar,*.war,*.ear,*.sar,*.rar set filetype=zip |
||
− | |||
+ | </pre> |
||
− | |||
− | |||
⚫ | |||
− | |||
− | |||
− | |||
− | ######################## FILE START ##################### |
||
− | |||
− | au BufReadCmd *.jar,*.war,*.ear,*.sar,*.rar call zip#Browse(expand("<amatch>")) |
||
− | |||
− | ######################## FILE END ##################### |
||
− | |||
− | |||
− | |||
⚫ | |||
⚫ | |||
− | |||
⚫ | |||
− | This tip works for vim7+ |
||
− | |||
− | '''Anonymous''' |
||
− | , June 16, 2006 12:00 |
||
− | ---- |
||
− | Hi. How can I vim a jar entry such that my jad.vim will get executed and decompiled the class file? Thanks |
||
⚫ | |||
− | '''Anonymous''' |
||
− | , June 17, 2006 9:50 |
||
− | ---- |
||
− | Hi all, |
||
− | I got a problem using this tip on Win 2k with VIM 7.0 . When I use the described script in my ~\vimfiles\ftdetect directory and then want to vim a jar file, I get an error about "(zip#Browse) unzip is unavailable on your system". How to get rid of this? I start with the batch file deployed in the %windir% directory. And yes, Windows has no native ~ directory, but vim maintains one. |
||
− | Oh, before I forget, my unzipper is TugZIP (http://www.tugzip.com), because it knows almost any archive type. It even knows tar, which is pretty unlikely for a Windows program. |
||
− | tia and cu, |
||
− | nullplan |
||
⚫ | |||
− | nullplanwichmann--AT--web.de |
||
+ | This solution doesn't seem to work |
||
− | , July 20, 2006 13:13 |
||
− | ---- |
||
− | <!-- parsed by vimtips.py in 0.576248 seconds--> |
Revision as of 22:16, 14 August 2015
Tip 1259 Printable Monobook Previous Next
created 2006 · complexity basic · author emmby · version 7.0
Jar files are really just zip files, and you can browse them from within Vim simply by treating them the same as Vim treats zip files.
If you want to figure out how to do this yourself, simply read :help new-filetype and zipPlugin.vim in your runtime/plugins directory.
For impatient people, just place the following in a file named ~/.vim/ftdetect/jar.vim (if you're on Unix):
au BufRead,BufNewFile *.jar,*.war,*.ear,*.sar,*.rar set filetype=zip
If you Vim a jar file now, you'll be able to browse it.
Comments
This solution doesn't seem to work