Now we can open our Snippet Manager by going to Tools->Manage Snippets. A large window opens. Our languages are listed down the left hand side, click to expand PHP. Now click the button to add a new Snippet. I named mine "/ comment /". On the right column you will have a large text area to type your snippet code. Enter the following:
/* $GEDIT_SELECTED_TEXT$0 */
And click into the Shortcut Key Field and press the key combination "Ctrl+Shift+M". It should resemble the following:
Thats it! Now in your code you can highlight a selection and press the Ctrl+Shift+M keys and comment out that section of code. I'll briefly explain the syntax of the snippet. $GEDIT_SELECTED_TEXT is a variable gEdit supplies to you. If you have nothing selected it will be an empty string. $0 is the end place holder. When the snippet is finished executing you cursor will wind up here. You can also use Python , but the easiest way to learn the snippets is to dig right into the ones provided by default, or to read up on them at GNOME Live. Enjoy!