plasma-disassembler / plasma

Plasma is an interactive disassembler for x86/ARM/MIPS. It can generates indented pseudo-code with colored syntax.
GNU General Public License v3.0
3.05k stars 277 forks source link

"vim dowhile1.bin.rev -S dowhile1.bin.vim" without color #41

Closed seth1002 closed 8 years ago

seth1002 commented 8 years ago

hello,

"vim dowhile1.bin.rev -S dowhile1.bin.vim" output without color in vim. i there anything wrong i did?

dowhile1.bin.vim

syn keyword RevKeywords infiniteloop function goto if else loop and syn keyword RevTypes int8_t int16_t int32_t int64_t

    syn match RevAddr "0x[0-9a-f]\+:"
    syn match RevComment "#.\+$"
    syn match RevInternComment ";.\+$"
    syn match RevVar "var[a-z0-9A-Z_]\+"
    syn match RevRetCall "ret\|call"

    syn match RevString "<[a-zA-Z_@]\+>"
    syn match RevString "\".\+\""
    syn match RevString "'.\+'"

    hi RevKeywords  ctermfg=161  cterm=bold  gui=bold  guifg=#d7005f
    hi RevTypes  ctermfg=81  guifg=#5fd7ff
    hi RevAddr  ctermfg=242  guifg=#6c6c6c
    hi RevComment  ctermfg=242  guifg=#6c6c6c
    hi RevInternComment  ctermfg=38  guifg=#00afd7
    hi RevString  ctermfg=144  guifg=#afaf87
    hi RevVar  ctermfg=208 cterm=bold  gui=bold  guifg=#ff8700
    hi RevRetCall  ctermfg=161  guifg=#d7005f

    syn match RevAddr_1 "0x400533:\?" containedin=RevComment

hi RevAddr_1 ctermfg=114 guifg=#87d787

ghost commented 8 years ago

Hello, did you set "syntax on" in your vimrc ?

ghost commented 8 years ago

Or are you sure that your terminal and vim supports 256 colors ?

for your terminal check the result of the command tput colors in your vimrc, you can add set t_Co=256

If not, maybe you can use gvim.

seth1002 commented 8 years ago

yes, i checked.

if has("syntax") syntax on endif

i can get color code with "i"

python3 ./reverse.py -i ... >>x EP

ghost commented 8 years ago

And do you have colors if you open the file "reverse.py" with vim ? Maybe you need another package on your distrib.

seth1002 commented 8 years ago

hi, yes. i have colors when i open any python script file. gvim works fine. somehow, it just doesn't work with vim. thank you. i will keep trying