Neither one nor Many

 
February 27 2011

If you need to protect yourself from yourself, like I needed to do. Then this simple notepad replacement executable may be for you img1. Click here to download. What it does is:

  • Always instantiates exactly one blank/new/untitled notepad instance at a time.
  • The untitled stuff is kept in a user configurable file. So you are not constantly bothered with a Save as dialog..
  • Easily 'dispatch' selections within your notepad to separate files.
  • When called to open a file, does open a new editor for that file. That editor is configurable.
  • Supports better CTRL+Z, CTRL+Y than default notepad.
  • Supports CTRL+F and search next with F3.
  • (For goto-line with CTRL+G you'll have to dispatch the text to another editor!)

When you own New text document (1).txt until New text document (19).txt, asdf.txt, jlksdjflkajsd.txt, etc., on your desktop. Then you have the same problem I had: using notepads for storing temporary buffers and things like that. With this replacement you are forced to keep just one buffer, which is automatically saved with CTRL+S. And when you do want to keep specific stuff, you select that text and CTRL+D (dispatch to file).

To install it you need to do the following:

  • Disable UAC (on Vista for example)
  • Reboot the system
  • Execute a batch file like the following. Got this copy from here.

Here's the copy (it is included in my .zip). This is not the same script I used, but my guess is it'll probably work:

@echo off

takeown /f c:\windows\syswow64\notepad.exe
cacls c:\windows\syswow64\notepad.exe /G Administrators:F

takeown /f c:\windows\system32\notepad.exe
cacls c:\windows\system32\notepad.exe /G Administrators:F

takeown /f c:\windows\notepad.exe
cacls c:\windows\notepad.exe /G Administrators:F

copy c:\windows\syswow64\notepad.exe c:\windows\syswow64\notepad.exe.backup
copy c:\windows\system32\notepad.exe c:\windows\system32\notepad.exe.backup
copy c:\windows\notepad.exe c:\windows\notepad.exe.backup

rem this has to be executed from within the installation dir.
copy notepad.exe c:\windows\syswow64\notepad.exe
copy notepad.exe c:\windows\system32\notepad.exe
copy notepad.exe c:\windows\notepad.exe

You can read the INSTALL file in the .zip bundle for details.

Example configuration

; configuration for notepad.exe replacement
editor=C:\Program Files\Vim\vim72\gvim.exe
file=C:\temp.txt
title=Untitled
maximized=0
C++ Comments (0)


Leave a Reply

Comment may not be visible immediately, because I process everything manually.**

**) I plan to automate this.., but it's on my ToDo since for ever..


Author:
Ray Burgemeestre
february 23th, 1984

Topics:
C++, Linux, Webdev

Other interests:
Music, Art, Zen