Skip to Content

Do you also keep your ABAP snippets in some kind of ASCII-files using notepad or other editors to look them up? If you want to lookup your ABAP code when you are offline everything is displayed in one color (mainly black).

ABAP in eclipse can not be used to display ABAP code offline, because you are not connected to an ABAP project. That is because the pretty printing is done using the ABAP back end. Only in that way ABAP in eclipse is able to keep track of different ABAP versions.

So I was very happy to find out, that with jEdit – a programmers editor written in java – I can do keyword high lightning as well as folding and indention regarding a statement block.

Everything is controlled by a so called mode. It is a xml file which tells the editor, which are the keywords and how the folding and indention is done. Nathan Jones started with some small configuration. I added the keywords regarding ABAP 7.31 as well as folding and indention.

In the first picture you see a typical jEdit coloring. If you want the ABAP coloring, you have to adjust that manually in the settings, because the color itself can not be controlled by the mode.

Finally you have to edit the catalog file, which connects the file extension with the mode. I have chosen .abap as well as the ABAP in eclipse extension .asinc. You add your own. The abap.xml file you put in the main directory c:/programs/jedit/modes. There you also find the catalog.xml, which you have to edit.

What do you think. Is this useful for you? What are your experience with that solution? Do you know other editors to display/edit ABAP?

To report this post you need to login first.

22 Comments

You must be Logged on to comment or reply to a post.

  1. Neal Wilhite

    I’ve done all my offline viewing in wordpad or the like.  I’d be very interested in what others may wish to say/ comment on this subject.

    Neal

    (0) 
    1. Nikhil Ghadge

      Hey Manish,

      from ur comment I think it is possible to maintain the ABAP code in pretty printing mode usin notepad++.

      But Can I do offline ABAP coding & maintain same in notepad++?

      (0) 
      1. Manish Kumar

        Hi Nikhil

        Pretty printing is different.

        Pretty print takes care of uppercase/lowercase and code indentation, whereas syntax highlighting is to apply color to keywords, operators, literals, comments.

        ABAP Editor applies syntax highlighting on presentation server, whereas pretty print needs help from application server.

        Text editors like jEdit and Notepad++ will apply syntax highlighting. They can also help in auto indentation, but not lowercase/uppercase conversion.

        When you see highlighted code in Notepad++, it is a text file, and you can add more code to it. New text will be highlighted automatically.

        (0) 
  2. Tomas Buryanek

    I can not compare to notepad++, but if somebody wants try alternative I use PSPad 🙂

    Even though it is lightweight and portable, it has many usefull functions. I really like its “code compare” function which shows side by side 2 codes with easy to spot differences highlight.

    (0) 
    1. Manish Kumar

      Everybody has a text editor of choice, and they tend to stick to it as long as desired features are present in it.

      Notepad++ has plugin based architecture, and using a bundled plugin, it is possible to compare and show results side by side.

      (0) 
      1. Ravi Shankar

        Hi Manish,

        I installed notepad++ I copied the code from ABAP but color difference not coming need to put any excel file for this please teach me how to use it…

        (0) 
  3. Manish Kumar

    Today I installed jEdit and tried to apply the edit mode.

    For some reason, system did not allow me to edit the Catalog file, not from Notepad++, jEdit or any other editor even when jEdit client/server was not running. I renamed it to catalog2, and editor was not able to save changes. There was something about the modes directory. I copied the catalog file to desktop, added the ABAP specific line, saved and then copied the modified file to modes folder, it worked.

    After applying the mode, i was able to get highlighting just like your screenshot.

    jEdit definitely has much more options than Notepad++.

    And the edit mode has much more options than Notepad++ UDL.

    Thanks to you, I’ll try using jEdit when Notepad++ is unable to do the job and VI is too scary to work on.

    In the process I noticed that multiple types of keywords can be defined in edit mode. (keyword1, keyword2, keyword3), each having different color according to color scheme.

    However, the New ABAP Editor has only one color for any keyword.

    Menu > Utilities > Global Options > Syntax Highlighting can be used to redefine the color mappings, so that the look-and-feel of code gets closer to New ABAP Editor.

    Since the syntax highlighting setting is global, the changes would mess up the look of other file types too.

    To counter this, I tried using Editor Scheme plugin. Theoretically, it should be able to create abap specific color scheme.

    Practically, opening the Scheme Editor results in BeanShell exception java.lang.NumberFormatException. In future I’ll try the steps on a newer version of jEdit/EditorScheme.

    EDIT: Could you please point me to profile of Nathan Jones?

    (0) 
      1. Manish Kumar

        Yes i did come across that line abap.xml v1 by Nathan Jones.

        I don’t mean to ask him anything. Just wanted to see what else he has published on SCN.

        (0) 
  4. Nathan Jones

    Hi

    I’m the Nathan Jones of the Jedit plugin fame. – Hello.

    I “borrowed” the initial set up from VI module that was lurking about.

    I no longer use JEdit and so I’ve not revisited this for a long while.

    Thanx for the mention though.

    Nath

    PS yes I am a coder and unfortunatly the song isn’t about me 😆

    (0) 

Leave a Reply