First, Notepad++ is an outstanding code editor. The main area where I'd love to see some improvement is macros.
In my limited usage of N++ macros so far, nothing has worked as expected. A simple macro to paste clipboard contents into a new window (keyboard=Ctrl+N, Ctrl+V) ignored the Ctrl+N for some reason and pastest into the active document. I also wanted to create a keyboard macro to close a tab using the standard MDI Ctrl+F4 shortcut (why isn't this already in N++?) didn't do anything at all.
Why not integrate with AutoHotKey? It's open source, robust, and includes a recorder which displays the macro code when stopped, allowing the user to edit as necessary. You'd probably still have to extend it in places (e.g. Find/Replace), but it'd be a great addition to N++.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
FWIW, N++ uses the standard Ctrl+W key to close the current tab. I use this
exclusively in FireFox, N++ and where available. It's also easier to type
than Ctrl+F4, so I would always try this first. If I have to use the mouse,
I don't use the app, period.
I'm still puzzled why programmers/coders (which should think of themselves
as power users) still insist on reaching for the mouse and clicking the [X] to
close the tabs in N++...
I'd like to thank Don for thinking about keyboard freaks and having a
solid keyboard support in N++. This is quite unusual for the young
generations destroyed by the mouse mentality. Thanks!
I use macros quite often in N++, but it's still not perfect.
I also use AutoHotkey extensively to override some keys in N++ and
define some new ones that I use on OpenVMS editors and that don't exist
anywhere else.
Keyboard Freak
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As I mentioned in another reply to this thread, the macro recording honors some menu commands, and ignores others. Unfortunately, at present, it doesn't record commands from plugins. (I assume you're enterning the date using the TextFX plugin, no?).
I'm not sure just yet what all would be required for the macro recorder to record plugin commands. It might be sufficient for it to
(1) record the menu command, then
(2) suspend the recording temporarily while the plugin command does its thing, then
(3) resume the recording once the plugin command has finished.
That way, upon playback, the recorder is *only* playing back the menu command and letting the plugin handle the rest. If this all works, it *might* be desirable to allow plugins to specify to NP++ which commands should suspend the macro recording, and which should allow it to continue uninterrupted.
Regards.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ctrl+W? A standard? That's a new one for me. Alt+F4 has been a standard for closing Windows apps since the Windows 2.x days - possibly even before that. Alt+F4 to close an app, Ctrl+F4 to close a window within an app. I'm not saying Ctrl+W doesn't work in most MDI apps - I went and tried it in several, and it does; I had just never heard of it being a standard before. And I don't see how it's any easier to type one vs. the other... it's two keys either way. At any rate, I share your sentiments about keyboard and mouse usage.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'll check my dusty MS I18N book at home and see how
Ctrl+W compares to Ctrl+F4 -- ie, are they "official"
aliases. I think it originally comes from a Mac stroke, for
"Close Window".
In any case, I love to find an app where Ctrl+W is working,
since I don't need to LOOK at the keyboard to execute it,
unlike Ctrl+F4.
I use these 3 daily, heavily, and all support Ctrl+W:
N++
FireFox
ProntPage (but it's not documented!)
Thanks Don!!!
Keyboard Freak
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> I'll check my dusty MS I18N book at home and see how
> Ctrl+W compares to Ctrl+F4 -- ie, are they "official"
> aliases.
Personally I don't have a strong preference between the two, but I note that Ctrl+F4 also has a claim to "official" status: It's documented in the Windows XP help file under the topic "Windows keyboard shortcuts overview".
Regards.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ctrl+F4 is certainly a more adopted standard on windows than Ctrl+W is, but there's still a lot of apps that support Ctrl+W. It *is* a bit faster/easier than Ctrl+F4 anyway, considering the amount you need to move/stretch your fingers. I do find it weird that both aren't mapped to close-tab by default, but oh well :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The macro recording honors some menu commands, and ignores others. (For example, it ignores the File: Save As... command, since it wouldn't know what to do with the FileSave dialog). I'll look into adding Ctrl+N and other commands as ones should be honored.
Regards.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> Is there any other way to get the date printed out using a macro?
As far as I know, the way you used is the only automatic and self-contained way (within NP++). But as you've found, the macro feature frustrates the date feature. I was clarifying what the actual problem is, as I expect to look into it within the next few days.
Regards.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First, Notepad++ is an outstanding code editor. The main area where I'd love to see some improvement is macros.
In my limited usage of N++ macros so far, nothing has worked as expected. A simple macro to paste clipboard contents into a new window (keyboard=Ctrl+N, Ctrl+V) ignored the Ctrl+N for some reason and pastest into the active document. I also wanted to create a keyboard macro to close a tab using the standard MDI Ctrl+F4 shortcut (why isn't this already in N++?) didn't do anything at all.
Why not integrate with AutoHotKey? It's open source, robust, and includes a recorder which displays the macro code when stopped, allowing the user to edit as necessary. You'd probably still have to extend it in places (e.g. Find/Replace), but it'd be a great addition to N++.
FWIW, N++ uses the standard Ctrl+W key to close the current tab. I use this
exclusively in FireFox, N++ and where available. It's also easier to type
than Ctrl+F4, so I would always try this first. If I have to use the mouse,
I don't use the app, period.
I'm still puzzled why programmers/coders (which should think of themselves
as power users) still insist on reaching for the mouse and clicking the [X] to
close the tabs in N++...
I'd like to thank Don for thinking about keyboard freaks and having a
solid keyboard support in N++. This is quite unusual for the young
generations destroyed by the mouse mentality. Thanks!
I use macros quite often in N++, but it's still not perfect.
I also use AutoHotkey extensively to override some keys in N++ and
define some new ones that I use on OpenVMS editors and that don't exist
anywhere else.
Keyboard Freak
I'm just gonna borrow the thread for a macro-question. I would like to make a macro that types <!-- Edited the file 2007-12-19 MyName -->.
This works great except for the fact that I can't get the date inserted when doing this as a macro.
Any ideas how to do this?
As I mentioned in another reply to this thread, the macro recording honors some menu commands, and ignores others. Unfortunately, at present, it doesn't record commands from plugins. (I assume you're enterning the date using the TextFX plugin, no?).
I'm not sure just yet what all would be required for the macro recorder to record plugin commands. It might be sufficient for it to
(1) record the menu command, then
(2) suspend the recording temporarily while the plugin command does its thing, then
(3) resume the recording once the plugin command has finished.
That way, upon playback, the recorder is *only* playing back the menu command and letting the plugin handle the rest. If this all works, it *might* be desirable to allow plugins to specify to NP++ which commands should suspend the macro recording, and which should allow it to continue uninterrupted.
Regards.
Greg
Ctrl+W? A standard? That's a new one for me. Alt+F4 has been a standard for closing Windows apps since the Windows 2.x days - possibly even before that. Alt+F4 to close an app, Ctrl+F4 to close a window within an app. I'm not saying Ctrl+W doesn't work in most MDI apps - I went and tried it in several, and it does; I had just never heard of it being a standard before. And I don't see how it's any easier to type one vs. the other... it's two keys either way. At any rate, I share your sentiments about keyboard and mouse usage.
MS suggest you use Ctrl+W to close a Word document,
so it's been there for quite a while:
http://www.microsoft.com/athome/moredone/compshortcuts.mspx
I'll check my dusty MS I18N book at home and see how
Ctrl+W compares to Ctrl+F4 -- ie, are they "official"
aliases. I think it originally comes from a Mac stroke, for
"Close Window".
In any case, I love to find an app where Ctrl+W is working,
since I don't need to LOOK at the keyboard to execute it,
unlike Ctrl+F4.
I use these 3 daily, heavily, and all support Ctrl+W:
N++
FireFox
ProntPage (but it's not documented!)
Thanks Don!!!
Keyboard Freak
> I'll check my dusty MS I18N book at home and see how
> Ctrl+W compares to Ctrl+F4 -- ie, are they "official"
> aliases.
Personally I don't have a strong preference between the two, but I note that Ctrl+F4 also has a claim to "official" status: It's documented in the Windows XP help file under the topic "Windows keyboard shortcuts overview".
Regards.
Greg
Ctrl+F4 is certainly a more adopted standard on windows than Ctrl+W is, but there's still a lot of apps that support Ctrl+W. It *is* a bit faster/easier than Ctrl+F4 anyway, considering the amount you need to move/stretch your fingers. I do find it weird that both aren't mapped to close-tab by default, but oh well :)
The macro recording honors some menu commands, and ignores others. (For example, it ignores the File: Save As... command, since it wouldn't know what to do with the FileSave dialog). I'll look into adding Ctrl+N and other commands as ones should be honored.
Regards.
Greg
You're correct Greg, I'm using the the plugin you mentioned.
Is there any other way to get the date printed out using a macro?
> Is there any other way to get the date printed out using a macro?
As far as I know, the way you used is the only automatic and self-contained way (within NP++). But as you've found, the macro feature frustrates the date feature. I was clarifying what the actual problem is, as I expect to look into it within the next few days.
Regards.
Greg