How to save font settings in Notepad++

46

9

I like the vim Dark Blue style in Notepad++, but I want to use it with Lucida instead of Consolas. When I change the font to Lucida, it is never saved. Is there a way to save a custom style that combines a new font with a built-in style?

Zeynel

Posted 2010-11-25T02:15:36.260

Reputation: 1 195

Answers

49

As @mikez302 said in a comment above, run as administrator. Then make your style changes via Settings/Style Configurator. There is no need to edit these files manually.

As of v5.8.6, theme files are stored under %PROGRAMFILES(x86)%. Vista/Win7 will refuse to write to this directory when the application is not run as Administrator. Furthermore, it appears that "Global Override" settings get saved into the active theme file. Hopefully future versions of Notepad++ will store these user-specific theme settings under %APPDATA% as the Windows paradigm intends.

zourtney

Posted 2010-11-25T02:15:36.260

Reputation: 843

1Is there a workaround for those who do not have administrative privileges? – rink.attendant.6 – 2014-09-03T14:45:57.250

This is the correct answer. Solved the problem for me. – endolith – 2011-03-26T17:03:55.103

Spot on, solved my problem too. Great suggestion that these settings should go into user-writable territory. – poplitea – 2011-09-02T13:35:35.660

15

Head over to Settings / Style Configurator. Select the font name and enable checkbox against Enable global font. Click on Save & Close.

image

Also: Have a look at @zourtney's answer. You should run Notepad++ as Administrator to keep your changes

Sathyajith Bhat

Posted 2010-11-25T02:15:36.260

Reputation: 58 436

5Thanks for the answer. But when I change the font to Lucida as you explain; and check the Enable global font box; next time I open Notepad++ the font name is not in the Font name box and the file has Consolas as font. In fact, sometimes, it does not even open vim Dark Blue but a white background default style. So in short, every time I open Notepad++ I need to change the style to vim Dark Blue and font to Lucida. Changes I make to style are not saved. I may be doing something wrong, but I don't know what. – Zeynel – 2010-11-25T18:16:33.447

1@Zeynel Does this happen for different file extensions ? Can you try opening the same file multiple times and see if the font settings carry ? – Sathyajith Bhat – 2010-11-26T23:36:32.320

@jumbo Thanks for letting me know - I've reuploaded the image – Sathyajith Bhat – 2011-10-28T10:01:23.153

5

I'm having the same issue using the latest version (5.8.5).
I believe a bug report is in order. Here is a bug that seems to (at the very least) be related: http://sourceforge.net/tracker/index.php?func=detail&aid=2893679&group_id=95717&atid=612382

Another option (until the issue gets resolved) may be to manually add a theme to %PROGRAMFILES%\Notepad++\themes
(Note that you have to run your editor as Administrator to be able to save this file.)

Simply copy the theme you like, and edit the copy to your liking.
In your case, editing the fontName under <GlobalStyles> should do the trick.
Additionally you may want to edit name="stylerTheme" path="" in your %APPDATA%\Notepad++\config.xml file.

oKtosiTe

Posted 2010-11-25T02:15:36.260

Reputation: 7 949

@studiohack: Not a problem at all. :-) – oKtosiTe – 2010-11-26T19:20:24.130

I tried making a copy of the theme and saving it, and I got a dialog box saying "Please check whether if this file is opened in another program". Does anyone know what to do about this? I tried editing the file in a different editor and it wouldn't let me either. I am using Noetpad++ 5.8.6 on Windows 7. – Elias Zamaria – 2011-01-11T22:23:09.457

4I was able to save the file by running Notepad++ as administrator. – Elias Zamaria – 2011-01-11T22:52:46.213

@mikez302: Good point. I forgot to mention that. Edited it in. – oKtosiTe – 2011-01-14T17:19:38.540

3

Instead of running Notepad++ as administrator as in some of the other answers, you can add write/modify permissions to the themes directory in program files so you don't need to run as admin each time.

For windows 7:

  1. In Windows Explorer, go to %PROGRAMFILES%\Notepad++
  2. Right-click the 'themes' folder and click 'properties'
  3. Click the Security tab
  4. CLick the Edit button
  5. Select the 'Users' item in the upper list
  6. In the permissions list, add a checkmark to 'Modify' (which automatically adds it to 'write' as well)
  7. OK, OK

It should now save your changes without needing to run Notepad++ as admin.

michaelmoo

Posted 2010-11-25T02:15:36.260

Reputation: 226

Great hack! I didn't think of it. Saves having to run as admin each time and on corporate computers, you can get the admin to do it for you once, and you're set. – Sanoo – 2016-07-03T14:28:53.383

2

Open the notepad++ by right clicking and selecting 'Run as Administrator' - and then make the changes you want to make. Your changes will be preserved.

Caffeine

Posted 2010-11-25T02:15:36.260

Reputation: 21

0

If you do not have administrator rights, changing the entire theme to another theme (e.g. the Twilight theme) is saved permanently even without administrator rights.

Cross post from question here.

Thursday Next

Posted 2010-11-25T02:15:36.260

Reputation: 101