(NewFile probably unnecessary? Anyways, setting filetype to zip seems to have much better results--sometimes with the previous command I couldn't open individual files in the jar.) |
m (Reverted edits by 202.62.16.98 (talk | block) to last version by 76.90.122.112) |
||
(7 intermediate revisions by 6 users not shown) | |||
Line 2: | Line 2: | ||
{{TipImported |
{{TipImported |
||
|id=1259 |
|id=1259 |
||
− | |previous= |
+ | |previous=1251 |
|next=1260 |
|next=1260 |
||
− | |created= |
+ | |created=2006 |
|complexity=basic |
|complexity=basic |
||
|author=emmby |
|author=emmby |
||
Line 16: | Line 16: | ||
If you want to figure out how to do this yourself, simply read {{help|new-filetype}} and zipPlugin.vim in your runtime/plugins directory. |
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 |
+ | For impatient people, just place the following in a file named ~/.vim/ftdetect/jar.vim (if you're on Unix): |
<pre> |
<pre> |
Revision as of 18:32, 17 April 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.