views:

40

answers:

1

My open source project uses spaces, not tabs, in its code.

A contributor to the project has his own website which uses tabs, not spaces.

He uses Notepad++ in Windows to edit files for both projects, and is frustrated when he forgets to manually set the Preferences correctly and thus inserts tabs into my project's files.

Is there a way to edit this Preference via a script? That way he could click one icon to start Notepad++ in mode 1 (running a batch script to modify the Preferences file and then start the program) or click another to start in mode 2.

Or if there's any other way to make him not have to remember this chore, that would work too. Maybe having a Preferences setting that depends on what folder the edited file is inside of?

Any help would be appreciated. Thanks!

+1  A: 

The notepad++ setting for rplacing tabs with spaces is stored in following xml file

%USERPROFILE%\Application Data\Notepad++\config.xml

The following is the line that needs to be changed

Now I don't know how we can edit a file by batch script in windows, but if it is not possible, then he can keep two config files config-tabs.xml and config-spaces.xml. And in the script you can copy appropriate file depending on what he needs to work on.

Himanshu