I just downloaded Notepad++ v 5.3.1 and I'm having two problems with the TextFX plugin:

  1. I recorded a macro with "TextFX Insert" > Date & Time (no matter whether short or long format) and, after I run the macro, only the first number of the time appears

    For example, I ask to insert time and it says its 8:59 AM 11/27/2009; but when I run the macro it only pastes 8:. How do I do to have the date inserted in the file without always needing to go to TextFX > Insert > Date & Time?

  2. When I try to use "TextFX Insert" to add the directory name or full path, only the first letter appears. For example, C:\data would show up as only C for full paths or only d for the file name.

How do I resolve these bugs?

migrated from stackoverflow.com Jun 20 '11 at 20:31

This question came from our site for professional and enthusiast programmers.


I just assigned this to a shortcut key by going to Settings → Shortcut Mapper → Plugin Commands → I:Date and Time → short format

I am running version 5.3.1.


You can do this quite easily with autohotkey, with the added benefit that it'll work in all apps, not just Notepad++

Install AutoHotKey, and then save the code below as a .ahk file and run it.

FormatTime, CurrentDateTime,, h:mm tt M/d/yyyy   
SendInput %CurrentDateTime%

Note the double commas after CurrentDateTime are not a typo. With this script, typing ]t will give you the date and time in the format

2:56 PM 10/11/2013

This second script will only work in Notepad++

ClipSaved := ClipboardAll   
SendInput {Alt}e{Down 8}{Right}{Enter} 
SendInput ^v
ClipBoard:= ClipSaved 

While in Notepad++, this script

  1. saves the clipboard to a variable
  2. opens the edit menu
  3. moves down 8 places to 'Copy to Clipboard'
  4. moves right 1 to 'Current Full File path to Clipboard'
  5. copies the file path to the clipboard
  6. pastes the clipboard to Notepad++
  7. copies the saved clipboard contents back into the clipboard

Both of these can be combined into one .ahk file, and you can set that to autoload on startup.


The latest NotePad++ version I have is 5.5.1.

I ran the TextFX plugin and it works. Perhaps that is what you need to do, download the latest, then everything should be ok.

  • By the way, funny that this version is latest, the date/time textfx plugin works but the insertion of current directory/full path and filename is still not working...sorry! – t0mm13b Nov 27 '09 at 14:26

The author of Notepad++ says, "Macro system cannot record plugin commands."

  • Almost 5 years later, still seems to be the case :( – RockPaperLizard Nov 2 '16 at 6:31
  1. Go to Plugins / Plugin Manager / Show Plugin Manager
  2. Find TextFX Characters and install it
  3. After restart go to TextFX / TextFX Insert and select date and time or current directoty
  • 1
    OP already stated that they were using TextFX Characters, they want to include the dynamic output in a macro. – Zhaph - Ben Duguid Mar 20 '14 at 10:34

Go to: Macro → Modify Shortcut/Macro → Plugin Commands. Set a Hotkey for: "I:Date && Time - short format"

It works for me in Version 5.9.3.

If there is no "Modify Macro"-entry in "Macro", then you have to record at least one macro. It's not perfect, I know.


Assuming you're using a current version, you can create a hotkey for inserting the DateTime into your Notepad++ document by:

  • Opening the Settings menu, then ShortCut Mapper...
  • Clicking on the "Plugin commands" tab
  • Locate item "I:Date & Time - short format" (item #188 on my version - or use long format if you prefer)
  • Click on the item to highlight it then click the Modify button on the bottom of the screen
  • Add your short cut - I used Ctrl-F5



You could use this for the path:

  • Edit / Copy to Clipboard / Current file path to clipboard

  • Edit / Copy to Clipboard / Current file name to clipboard

Found here: Lists of default mouse and keyboard shortcuts for Noteoad++ and some plugins

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy