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:
- 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
- Open a Perl file
- 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
- Enable Right Margin View -> Show Right Margin.
- Go to the Advanced Preferences editor via 'Tools/Preferences/Advanced'.
- In the 'Filter' type "right_margin_column" and click on the item 'editor_right_margin_column'
- At the bottom of the screen you will see the details of this option
- 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.
- Now go back to the Advanced Preferences Editor select the editor_right_margin_column again and press "Reset" and than press "Save".
- Now it should go back to default (value = 80), middle of the screen.
Current Line
First Option
- Start padre.
- Write a script or open perl module.
- Enable Current Line View -> Show Current Line.
- Go to Tools -> Preferences.
- On the left side you'll have a list of options, go to "Appearance".
- 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
- Start padre.
- Write a script or open perl module.
- Enable Right Margin View -> Show Current Line.
- Go to Tools -> Preferences.
- There are 3 buttons at the bottom "Save", "Advanced" and "Cancel". Press the "Advanced" button.
- Write down on the filter's search box "editor_currentline_colour" and press it.
- than you can change the value(= colour of the "Current Line) to "#FF0000" (Red).
- 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.