Download Padre

Visual Editor Effects

Description

Under this title we have sever features.
  • Line Numbers
    • On the left margin you can see the line numbers
  • Code Folding
    • On the left margin, after the line number you can see squares with a - sign and vertical lines connecting some of the squares
    • Clicking on the square will fold (hide) the code beneath it and change the sign to be a + sign. Clicking on the + sign will expand the folded code.
    • When the Code Folding is enabled we see the folding marks on the left margin. If the mouse is over that margin and we right-click on the mouse we get two new menu options:
      • Fold All
      • Unfold All
    • They will fold and unfold everything respectively.
  • Current Line
    • This is the yellow highlighting on row number 24, currently at the top of the window. It's color can be configured.
  • Right Margin
    • This is a visual indicator to make it easier to keep the code limited to a certain width. This is the gray column on the right side of the editor.
  • Newlines
    • There are the black LF marks at the end of each row. As this screen-shot was taken of UNIX-ish file the newlines are actually LF (line feed) characters.
    • If the file had Windows style newlines we would see two marks: CR (carriage return) and the LF (line feed).
  • Whitespaces
    • TABs are show as arrow (e.g. before the word original_cwd)
    • Spaces are shown as little dots (e.g. after the work original_cwd)
  • Indentation Guide
    • This is the blue vertical line under the letter g of getters

Test

  1. Open a Perl file
  2. Turn on/off each one of the features and observe if the visual effects are as you are expecting then go on the configuration of these elements
    • View -> Show Line Numbers
    • View -> Show Code Folding
    • View -> Show Current Line
    • View -> Show Newlines
    • View -> Show Right Margin
    • View -> Show Whitespaces
    • View -> Show Indentation Guide

Right Margin

  1. Enable Right Margin View -> Show Right Margin.
  2. Go to the Advanced Preferences editor via 'Tools/Preferences/Advanced'.
  3. In the 'Filter' type "right_margin_column" and click on the item 'editor_right_margin_column'
  4. At the bottom of the screen you will see the details of this option
  5. The default is "80" change the value to "150" than press "Set" and than press "Save". you will see that the right margin mark has moved to the right.
  6. Now go back to the Advanced Preferences Editor select the editor_right_margin_column again and press "Reset" and than press "Save".
  7. Now it should go back to default (value = 80), middle of the screen.

Current Line

First Option

  1. Start padre.
  2. Write a script or open perl module.
  3. Enable Current Line View -> Show Current Line.
  4. Go to Tools -> Preferences.
  5. On the left side you'll have a list of options, go to "Appearance".
  6. There you'll have "Editor Current Line Background Colour" and on the right you can pick the new colour you want, pick a colour(yellow is the default) than Press the "Ok" button and than Press the "Save" button.

Second Option

  1. Start padre.
  2. Write a script or open perl module.
  3. Enable Right Margin View -> Show Current Line.
  4. Go to Tools -> Preferences.
  5. There are 3 buttons at the bottom "Save", "Advanced" and "Cancel". Press the "Advanced" button.
  6. Write down on the filter's search box "editor_currentline_colour" and press it.
  7. than you can change the value(= colour of the "Current Line) to "#FF0000" (Red).
  8. than Press the button "Set" and after that Press the Button "Save" on the bottom.

TODO

  • In order to make working with the keyboard faster we might want to enable the Fold All/Unfold All options on the right-click regardless of the mouse position.
  • For the same reason we could also add a fold/unfold current line to the right-click menu.
  • In addition IMHO all the folding related actions should have menu options.