Wikia

Vim Tips Wiki

Edit Java jar and other files

Talk0
1,612pages on
this wiki
Revision as of 02:30, March 30, 2010 by JohnBot (Talk | contribs)

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 the impatient, 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

Around Wikia's network

Random Wiki