Wikia

Vim Tips Wiki

Edit Java jar and other files

Talk0
1,610pages on
this wiki
Revision as of 09:27, September 12, 2013 by 27.251.30.69 (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

CommentsEdit

Advertisement | Your ad here

Around Wikia's network

Random Wiki