Geany text editor commenting - comments

Is there a way to highlight a section of code to be commented out in one swoop using geany text editor?

Control-E to toggle commenting.

Yes there is, you just have to highlight the code you want to comment then right-click, mouse over format and and click on "Comment Line(s)" to comment the lines. To uncomment,instead of selecting "Comment Line(s)" select "Uncomment Line(s)".

Control + E
Edit default comment: Preferences > Editor > Features > Comment toggle marker

Related

Xcode: Color highlight code/text on cursor blinking

In Android/Eclipse, if I single click on a word, all of its occurrences are color highlighted throughout the file.
Is the same possible in Xcode?
Is there a plugin for achieving it?
Is there any Automator Script/Service to achieve this ?
In xcode click into the word and then hover over it and you should see a little dropdown arrow appear to the right of the word. Click this arrow and choose 'edit all in scope'. This will highlight all occurrences in the file... and let you edit them all at once.

How to disable seemingly random syntax higlight in Notepad++

Can anyone suggest:
Why does it higlight like this? I don't seem to do anything to activate it:
How to disable it?
This is old, but I ran into the same problem and just figured out an easy fix.
From the file menu: Language > N > Normal Text
I'm not sure if this is the same issue as mine, but I wanted to keep the language setting enabled but remove the highlighting.
I did this by going to Settings --> Preferences --> Highlghting
Removed the Enable check mark for Highlight Matching Tags.
1) Go to settings -> Style Configurator.
2) Select the language that Notepad++ has chosen, usually based on filename extension. You can also change this manually under the Language menu setting.
3) Go through the Styles until you find the style that applied the highlighting. You can tell because the Background colour will match the highlighted color.
4) Change Background colour to white.
I do not have an answer for your first question
For your second question do the following steps
Inside Notepad++ press ctrl A( select all)
Right click for context menu.
select Remove style and click on Clear all Styles
This will clear all the highlights.
FYI. You may also see this sort of behavior when using a vertical edge in background mode. Switching to line mode will eliminate the highlighting of lines that run over the set character count for the vertical edge.

textmates' c++ keywords in color

I was wondering how to enable multi-color function in textmate to display keywords (c-like syntax) in color?
So, for example in sublime, pressing CTRL+SHIFT+P will pop-up a menu from which a user can choose the coloring pattern for the code.
Just save the file with a file extension for the programming language you are using, such as .c for c and the syntax highlighting will appear.
At the bottom of the window there is a drop down menu that shows all of the different styles and contexts that you can use.

emacs like fill-paragraph option in textmate?

Is there an option to reformat lines/paragraphs/selected text to 80 cols in TextMate like in emacs (fill-paragraph bound to M-q)? If not, do you know of any option to add this to TextMate - a known plugin/macro? any help in writing such a macro is most welcome too. :)
It only changes how the text is displayed — not the text itself — but in the menu bar, "View" > "Wrap Column" > "78". Or choose "Other…", it displays a vertical ruler you can move to the desired column.
If the "Soft Wrap" option is checked, your text will look like it's reformated.
To reformat the text for real, simply hit ctrlq. It will use the number checked in the aforementioned menu.
If what you want is to hard-wrap paragraphs see here: http://lists.macromates.com/textmate/2006-November/015707.html

Commenting code in Notepad++

I'm using Notepad++ as an editor to write programs in Python. It might sound daft but I looked around in the editor and could not find any means (not the manual way but something like in Emacs) to do a block comment in my code.
Since so many language settings are supported in Notepad++, I'm curious to find a way to block comment code.
CTRL+Q Block comment/uncomment.
See Keyboard And Mouse Shortcuts - Notepad++ Wiki.
Try the following shortcut:
Ctrl+K.
This link was exactly what I was searching for .
Let me summarize the answers for others' benefit (for python and notepad++)
1) Ctrl+K on multiple lines (i.e. selected region) allows you to block comment.
Also note that pressing the combination multiple times allows you to add multiple "#"s (sometimes I use that while testing to differentiate from other comments)
2) Ctrl+Shift+K (on the commented region) allows you to perform block uncomment
3) Ctrl+Shift+K on an uncommented selected region does not comment it
4) Ctrl+Q allows you to block comment/uncomment in a toggled mode (meaning, you cannot add multiple '#'s like in 1) )
Hope this helps another wandering soul.
Question - how would you develop a hack of keyboard combinations to comment/uncomment if there were no shortcuts? Just curious. I've no clue hence asking.
Yes in Notepad++ you can do that!
Some hotkeys regarding comments:
Ctrl+Q Toggle block comment
Ctrl+K Block comment
Ctrl+Shift+K Block uncomment
Ctrl+Shift+Q Stream comment
Source: shortcutworld.com from the Comment / uncomment section.
On the link you will find many other useful shortcuts too.
for .sql files Ctrl+K or Ctrl+Q does not work.
to insert comments in .sql files in Notepad++ try Ctrl+Shift+Q
(there is no shortcut to uncomment the code block though. I have tried that on v5.8.2 )
Use shortcut: Ctrl+Q.
You can customize in Settings
In your n++ editor, you can go to
Setting > Shortcut mapper
and find all shortcut information as well as you can edit them :)
Two ways for block commenting:
Ctrl+Shift+Q
or
Select the block
Alt + Right click
Choose block comment.
Without having selected a language type for your file there are no styles defined. Comment and block comment are language specific style preferences. If that's a PITA...
To select for multi-line editing you can use
shift + alt + down arrow
To add a comment under any code on NOTEPAD++ first we have to save and define the programming or scripting file type. Like, save the file as xml, html etc. Once the file is saved in proper format you will be able to add a comment directly using the shortcut ctrl+Q
Just select the desired line and click on Ctrl + Q
Ps: I am using Notepad++

Resources