Thursday, March 3, 2011

smali syntax highlighting for vim

i've been doing a lot in linux lately and was working on a smali syntax highlighting file for vim, but vierito5 posted a comment with a link to Jon Larimer, who beat me to it. here's the link:
http://codetastrophe.com/smali.vim
https://sites.google.com/site/lohanplus/files/smali.vim (mirror)

it's vim so there are 20 different ways to get it working. google around if this doesn't work, i will be no help. here is how i did it:
mkdir ~/.vim
echo au BufRead,BufNewFile *.smali set filetype=smali >> ~/.vim/filetype.vim
mkdir ~/.vim/syntax
cp smali.vim ~/.vim/syntax


10 comments :

  1. Thanks for posting! Smali code looks much better now!

    ReplyDelete
  2. Thanks for the work, but I found a bug.
    If you have a line similar to the following

    .field public static final CALENDAR:Ljava/lang/String; = ""

    the dalvikName matches "ENDAR:Ljava/lang/String" which is wrong.
    I fixed it including the 'L' and the ';' in the highlight and using this syntax rule:

    syn match dalvikName "\<[A-Za-z0-9_\/]\+\>;"

    Hope it helps. Bye

    ReplyDelete
  3. Ops... I forget an 'L':


    syn match dalvikName "\;"

    ReplyDelete
  4. It cuts out a part. The 'L' goes between the lower sign (<) and the open bracket ([)

    ReplyDelete
  5. thank you HoX, i shall e-mail the maintainer about this change. from what I understand, it should be, as you suggest:
    syn match dalvikName "\;"

    it also seems there are some valid characters not supported by this regex, as per the java specs here: http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.8

    namely, the currency symbols and other unicode characters.

    ReplyDelete
  6. Wonderful post. and you Nice used words in this article and beautifully post it.

    ReplyDelete
  7. Great Article..Thanks for the sharing..

    Bigo live is a GooD APK.Connect friends.
    Install the application here.....

    Bigo Live App

    ReplyDelete
  8. **SELLING SSN+DOB FULLZ**

    CONTACT
    Telegram > @leadsupplier
    ICQ > 752822040
    Email > leads.sellers1212@gmail.com

    >>1$ each without DL/ID number
    >>2$ each with DL
    >>5$ each for premium (also included relative info)

    *Will reduce price if buying in bulk
    *Hope for a long term business

    FORMAT OF LEADS/FULLZ/PROS

    ->FULL NAME
    ->SSN
    ->DATE OF BIRTH
    ->DRIVING LICENSE NUMBER WITH EXPIRY DATE
    ->COMPLETE ADDRESS
    ->PHONE NUMBER, EMAIL, I.P ADDRESS
    ->EMPLOYMENT DETAILS
    ->REALTIONSHIP DETAILS
    ->MORTGAGE INFO
    ->BANK ACCOUNT DETAILS

    >Fresh Leads for tax returns & w-2 form filling
    >Payment mode BTC, ETH, LTC, PayPal, USDT & PERFECT MONEY

    ''OTHER GADGETS PROVIDING''

    >SSN+DOB Fullz
    >CC with CVV
    >Photo ID's
    >Dead Fullz
    >Spamming Tutorials
    >Carding Tutorials
    >Hacking Tutorials
    >SMTP Linux Root
    >DUMPS with pins track 1 and 2
    >Sock Tools
    >Server I.P's
    >HQ Emails with passwords

    Email > leads.sellers1212@gmail.com
    Telegram > @leadsupplier
    ICQ > 752822040

    THANK YOU

    ReplyDelete

Do NOT post about or link to specific apps!