Gedit: Difference between revisions

Jump to navigation Jump to search
m (→‎syntax highlight: fix link syntax)
(using templates)
Line 7: Line 7:


== Code comment ==
== Code comment ==
One of the most useful plugins is '''code comment''' which allows to comment/uncomment several lines of code at the same. Simply select the lines and press '''Ctr+M''' to comment and '''Shift+Ctr+M''' to uncomment. There's one limitation though. While the syntax correctly recognizes both <code>%</code> and <code>#</code> as comment characters, the plugin must use only one. By default it uses <code>#</code>. If you want to change it to <code>%</code>, edit the file with the syntax highlight rule and in the metadata field change the value of ''line-comment-start'':
One of the most useful plugins is '''code comment''' which allows to comment/uncomment several lines of code at the same. Simply select the lines and press {{Key|Ctr+M}} to comment and {{Key|Shift+Ctr+M}} to uncomment. There's one limitation though. While the syntax correctly recognizes both {{Codeline|%}} and {{Codeline|#}} as comment characters, the plugin must use only one. By default it uses {{Codeline|#}}. If you want to change it to {{Codeline|%}}, edit the file with the syntax highlight rule and in the metadata field change the value of {{Codeline|line-comment-start}}:


  <property name="line-comment-start">#</property>
  <property name="line-comment-start">#</property>
Line 28: Line 28:
  >        bottom.remove_item(self._panel)
  >        bottom.remove_item(self._panel)


Basically replace '''window.get_bottom_panel()''' with '''window.get_side_panel()'''. You might want to replace the '''side''' varname to '''bottom''' but that is not actually necessary. The same hack can be used on other plugins to move them between the panels.
Basically replace {{Codeline|window.get_bottom_panel()}} with {{Codeline|window.get_side_panel()}}. You might want to replace the {{Codeline|side}} variable name to {{Codeline|bottom}} but that is not actually necessary, it's only so that the variables name reflect the truth about them. The same hack can be used on other plugins to move them between the panels.


== File Browser on side panel ==
== File Browser on side panel ==


Another useful plugin is the '''File browser pane''' that allows to easily access files from the side pane and navigate into directories to see the paths. Would be great to implement a new one, octave specific, with all the paths in the function search path.
Another useful plugin is the '''File browser pane''' that allows to easily access files from the side pane and navigate into directories to see the paths. Would be great to implement a new one, octave specific, with all the paths in the function search path.