ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Changing Color of code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing Color of code

    Hi,

    I would like to know how we can change the color of code during coding. Putting the same question in another way, When i write a code in SEU usually all code i write is displayed in green, i would like to have my comments in white color and rest of the operational code in green.
    I using Netmanage 5250 terminal.

    I am not asking about changing the background or font color.

    Regards,
    Rechit
    A failure teaches you more than what a success does.

  • #2
    Re: Changing Color of code

    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: Changing Color of code

      Hurray thanks....
      A failure teaches you more than what a success does.

      Comment


      • #4
        Re: Changing Color of code

        Originally posted by rechit
        I would like to know how we can change the color of code during coding. Putting the same question in another way, When i write a code in SEU usually all code i write is displayed in green, i would like to have my comments in white color and rest of the operational code in green.
        Another option is to write an SEU exit program that extends your line commands.
        For example, I can enter the block command HH to highlight a group of lines. It is
        much easier to do this while I'm coding rather than trying to remember to run a
        utility against the source member ;-)

        Terry

        Comment


        • #5
          Re: Changing Color of code

          Even easier, forget about SEU and use a editor like LPEX. Automatically colors your code as you go along.

          Comment


          • #6
            Re: Changing Color of code

            Hi All,

            I remembered that it could also be possible by using the keyboard map.
            Can anybody have that keyboard mapping list ?

            skma

            Comment


            • #7
              Re: Changing Color of code



              Code:
              Client Access Colors
              Descriptions and Hex codes from JimmyOctane's chart
              
              White         = 22
              White_UL      = 26
              White_RI      = 23
              
              Green         = 20                     
              Green_RI      = 21                      
              Green_UL      = 24                     
              Green_UL_RI   = 25                      
              
              Red           = 28  
              Red_RI        = 29  
              Red_HI        = 2a  
              Red_HI_RI     = 2b  
              Red_UL        = 2c 
              Red_UL_RI     = 2d   
              Red_UL_BL     = 2e   
              
              Turq_CS       = 30               
              Turq_CS_RI    = 31                       
              Turq_UL_CS    = 34                    
              Turq_UL_RI_CS = 35                   
              
              Yellow_CS     = 32 
              Yellow_CS_RI  = 33 
              Yellow_CS_UL  = 36 
              
              Pink          = 38 
              Pink_RI       = 39 
              Pink_UL       = 3c  
              Pink_UL_RI    = 3d  
              
              Blue          = 3a 
              Blue_RI       = 3b 
              Blue_UL       = 3e  
              
              From your AS/400 Client Access session:
              Edit/Preferences/Keyboard
              
              Click on Customize button.
              
              From Customize Keyboard screen:
              File/Save As
              Remember the name and location the file is at.
              
              Exit program and click OK
              
              Close the CA session.
              
              Using notepad, open the keyboard map file (extension .kmp)
              
              Using the HEX codes above, assign the colors to the control or 
              
              shift-control keys using the 'apl' code. Here is an example.
              
              --- BEGIN EXAMPLE ---
              
              [Profile]
              id=KMP
              Description=
              
              [KEYBOARD]
              C-KEY2=apl 22
              C-KEY3=apl 32
              C-KEY4=apl 3a
              C-KEY5=apl 28
              C-KEY6=apl 38
              C-KEY7=apl 30
              C-KEY8=apl 26
              C-KEY9=apl 36
              C-KEY10=apl 3e
              C-KEY11=apl 2e
              CS-KEY2=apl 24
              CS-KEY3=apl 34
              CS-KEY4=apl 3c
              CS-KEY5=apl 21
              CS-KEY6=apl 23
              CS-KEY7=apl 33
              CS-KEY8=apl 3b
              CS-KEY9=apl 29
              CS-KEY10=apl 2a
              CS-KEY11=apl 25
              
              --- END EXAMPLE ---
              
              The above configuration assigns colors to CTL 1 to 0 and SHIFT-
              
              CTL 1 to 0
              
              CTL 1 = C-KEY2
              SHIFT-CTL 1 = CS-KEY2
              
              Save the file and open your CA session again. Check the keyboard 
              configuration. You may need to load it and save you CA session 
              so that it will always load when the session starts.
              
              Once assigned, you can use the control/shift-control keys to put 
              colors in your source while within SEU. On instruction lines 
              this can be between positions 1 and 4 or in the comment section 
              of the line. For comment lines, they can be used in any position 
              and in any combination.
              All my answers were extracted from the "Big Dummy's Guide to the As400"
              and I take no responsibility for any of them.

              www.code400.com

              Comment


              • #8
                Re: Changing Color of code

                i was able to save the extension.kmp file...
                after i open the CA i am having trouble loading that on my keyboard mapping and saving it...how exactly do i do it?

                thanks

                Comment


                • #9
                  Re: Changing Color of code

                  Ihave never done this but.....it seems all you have to do is locate the file.....
                  open in with lets say wordpad add the lines with the apl stuff then just re-save over the exisitng file.

                  jamie
                  All my answers were extracted from the "Big Dummy's Guide to the As400"
                  and I take no responsibility for any of them.

                  www.code400.com

                  Comment


                  • #10
                    Re: Changing Color of code

                    nevermind ...got it...this is nice

                    Comment


                    • #11
                      Re: Changing Color of code

                      Originally posted by rechit
                      Hi,

                      I would like to know how we can change the color of code during coding. Putting the same question in another way, When i write a code in SEU usually all code i write is displayed in green, i would like to have my comments in white color and rest of the operational code in green.
                      I using Netmanage 5250 terminal.

                      I am not asking about changing the background or font color.

                      Regards,
                      Rechit
                      One more option and it relates to using an exit program with SEU. You can try SEUExit, a software product available here:



                      This utility lets you color source code (among other things).

                      Jonas
                      Jonas Temple
                      Got FROG?
                      Got Tadpole? No, because it's not done yet! Stay tuned....

                      01010111 01100001 01110011 01110011 01110101 01110000 00100000 01100100 01101111 01100111 00111111

                      Comment

                      Working...
                      X