Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Can i change de behavior of the Notepad++ editor when i press the Home key.
I need to press home twice to navigate to the beginning of the line? In other editors like Delphi this isn't the default behavior.
I couldn't see what you were talking about at first, but then I realized, you're talking about lines that are indented with tabs or spaces, right?
I almost got it with a Macro, but not quite. You can record a Macro that simulates hitting the HOME key twice. I tried saving it to the HOME key, but apparently the Macro engine is too smart to be fooled like that. I can select it from the menu and it works fine, but if I press the HOME key it just does its default behavior. This makes sense; if it didn't take this into account it might end up in some kind of infinite loop. If you don't mind using a different key than HOME, it might work. One of the function keys, possibly.
By the way, did you know that Alt+HOME puts you at the beginning of the line? Of course, this is just as much work as hitting the HOME key twice, so it's not really a workaround.
I wish I could be more helpful, but this is all I can come up with.
"By the way, did you know that Alt+HOME puts you at the beginning of the line? Of course, this is just as much work as hitting the HOME key twice, so it's not really a workaround. "
True, but at least you don't have to think about where it's going to end up. If you press Home twice when you're already at the start, it'll move to the end of the first whitespace. If you're already at the end of the whitespace, it'll take you to the start of the line.
Hey, you led me to a workaround for this problem.
I went to Settings->Shortcut Mapper->Line 66 (a blank name shortcut), which maps to HOME. I reassigned it to Alt+HOME. Then my Alt+Home Macro could be assigned to the HOME key. Halleluja! I'm glad they didn't negate each other, but I could have assigned it to Alt+Ctrl+Shift+HOME to get it completely out of the way. I just thought I might use Smart HOME someday. People seem to swear by it.
This should really be a named shortcut that can be assigned, or a preferences checkbox, since the issue has come up before. I don't have a problem with the more popular definition winning, but it's not really HOME now is it? Give me the option not to use a feature.
How did you find out that Line 66 maps to the Home key?
In version 5.8.6, line 66 is occupied by "Copy bookmarked lines".
The first blank entry is 171. But how do I know what it maps to? (It's blank, after all.)
I cut and move blocks of lines all the time. I need the Home key to go to the first column, so I can cursor down and cut.
Going to the first character on the line pretty much drives me up the wall-especially since it can go to the first column, if I'm already at the start of line.
I almost never need to go to the first character on the line. (If I do, I'll typically use the mouse.) So I very much want to exchange the definitions of Home and Alt+Home.
Notepad++ is primarily a programmer's editor. Most code has indentations on lines, and you'd usuallly leave the indent as it is and concentrate on the "payload" on the line. This is what the current mapping for Home does.
Now if you have different/amternate needs, then Scintilla did consider them and has a few variants for Home behaviour. The corresponding Scintilla commands are in the shortcut mapper, and you can map them. For information about what the various variants are, the best source I think is scintilla\includes\scintilla.iface in the sources.
I'm a programmer. I always like 'Home' to go to the actual start of the line.
Copying & pasting whole lines consistently, requires the start/end anchors to be placed in a controlled fashion to capture a genuinely complete line with trailing 'newline' but no further whitespace.
'Smart Home' or 'Smart cursor positioning' does nothing, but frustrate this. I'm definitely against this feature, from an informed opinion, and would like an option to turn it off.
I use 'Home' ALL THE TIME to cut/copy & paste lines. It's one of my most used keys in my main IDEs. Notepad++ is a great editor, and this is really it's only drawback.
PS: I don't have any trouble getting to the start of lines without Smart Home.
You can easily change that behavior. Remap the 'Home' key from SCI_VCHOMEWRAP to SCI_HOMEWRAP.