Created
April 4, 2018 18:20
-
-
Save pyropeter/de604032f1f55d845600d82575b9b0fd to your computer and use it in GitHub Desktop.
vim diff support for jadx jobf files
This file contains hidden or 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
autocmd BufNewFile,BufRead *.jobf set diffexpr=DiffJobf() | |
function DiffJobf() | |
let expr = "s_[Cfmp]o?[0-9]{4}[a-zA-Z0-9]_FNORD_g" | |
let opt = "" | |
if &diffopt =~ "icase" | |
let opt = opt . "-i " | |
endif | |
if &diffopt =~ "iwhite" | |
let opt = opt . "-b " | |
endif | |
silent execute "!diff -a --binary " . opt . | |
\ "<(sed -E '" . expr . "' " . v:fname_in . ") " . | |
\ "<(sed -E '" . expr . "' " . v:fname_new . ") > " . v:fname_out | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment