<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Adding the Extension of PRG in the Tab Settings list]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I have the need to add the File Extension type <strong>PRG</strong> to the <strong>Tab Settings</strong> so that I can tell NotePad++ what I want it to do for this file type.</p>
<p dir="auto">This file type <strong>PRG</strong> is used in <strong>Visual FoxPro/DBase</strong> as their program code files.</p>
<p dir="auto">I need to set the tab stops to the sire of three (3) and use spaces instead of the tab character but I see no place where I can add new extension types to the Tab Settings list.</p>
<p dir="auto">Would you guys/gals either be so kind and add this in the next version of NP++ or tell me how I can add it myself.</p>
<p dir="auto">Is this something that could be added to the “UDL” stuff?<br />
UDL = User Definded Language</p>
<p dir="auto">Have a nice day. :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/22857/adding-the-extension-of-prg-in-the-tab-settings-list</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Sep 2026 08:58:11 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/22857.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 16 Apr 2022 15:09:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Fri, 22 Apr 2022 20:04:26 GMT]]></title><description><![CDATA[<p dir="auto">Yes, I get it, it’s not an indentation bug, I must have done something wrong. :-)</p>
<p dir="auto">So I’ll have to mess with it to see what I did wrong. I will try creating a <strong>user</strong> <a href="http://startup.py" rel="nofollow ugc">startup.py</a> and put it where ever it goes (reading the instructions on file locations I have here somewhere), and remove it from the machine <a href="http://startup.py" rel="nofollow ugc">startup.py</a>.  This is kind of the thing, I know I’ve screwed it up somehow and I don’t understand the indentation rules for Python…I’m am only learning and dabbling at the moment, and indentation was never a critical part of any programming I’ve ever done, so it’s new to me.  I’ll get it. Thanks for the pointers and the tests.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76259</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76259</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Fri, 22 Apr 2022 20:04:26 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Thu, 21 Apr 2022 20:50:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a> said in <a href="/post/76238">Adding the Extension of PRG in the Tab Settings list</a>:</p>
<blockquote>
<p dir="auto">if I switch to a different tab, then back to example.prg, I see another setting up for files with extension prg in the console.</p>
</blockquote>
<p dir="auto">Oops, I guess I didn’t mean to leave the print statement in there…  But perhaps it was helpful here.</p>
<p dir="auto">So the reason it “sets it up” everytime you switch tabs is that upon the tab change, Notepad++ itself will reset the tab settings…so the script code has to override that and set it up the way <em>it</em> wants it.  (Just some background info).</p>
<p dir="auto">BTW, the script isn’t “perfect”.  If you rename a file that has a non .prg extension so that it has that extension, it will probably take a tab switch away and a return to get it to take effect.  Also, once tab characters are “in” a file, this script won’t remove them, even if the configuration is set to use-spaces.  These limitations <em>could</em> be worked around, with more code.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76239</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76239</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 21 Apr 2022 20:50:00 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Thu, 21 Apr 2022 20:26:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lycan-thrope" aria-label="Profile: Lycan-Thrope">@<bdi>Lycan-Thrope</bdi></a> ,</p>
<p dir="auto">There is no indentation problem with what <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> originall posted.  I just created a fresh Notepad++ with PythonScript, copy/pasted <em>exactly</em> what he had into <code>TabSettingsOverrideByExtension.py</code>, and ran that.  When I opened a <code>example.prg</code> file, it properly used 3 spaces when I typed a tab in the <code>example.prg</code> file.</p>
<p dir="auto">My PythonScript console looks like:</p>
<pre><code>Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:25:05) [MSC v.1500 64 bit (AMD64)]
Initialisation took 15ms
Ready.
setting up for files with extension prg
</code></pre>
<p dir="auto">if I switch to a different tab, then back to <code>example.prg</code>, I see another <code>setting up for files with extension prg</code> in the console.</p>
<p dir="auto">Similarly, if I exit out and come back in, then open up <code>example.prg</code> without running the script first, it properly uses the default TAB character with a width of 4 characters.</p>
<p dir="auto">If I create a user <code>startup.py</code> with the exact contents:</p>
<pre><code># -*- coding: utf-8 -*-
from Npp import *
import os

import TabSettingsOverrideByExtension
tsobe = TabSettingsOverrideByExtension.TSOBE()
</code></pre>
<p dir="auto">when I restart Notepad++, I get no errors in the PythonScript console, and if I open <code>example.prg</code>, it does 3-space when I hit the TAB key.</p>
<p dir="auto">So Alan’s example script works exactly as described.  You do not need to edit anything after you paste in the exact contents from the black box and save.  It just works right, with correct indentation.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76238</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76238</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 21 Apr 2022 20:26:40 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Thu, 21 Apr 2022 20:21:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lycan-thrope" aria-label="Profile: lycan-thrope">@<bdi>lycan-thrope</bdi></a> said in <a href="/post/76230">Adding the Extension of PRG in the Tab Settings list</a>:</p>
<blockquote>
<p dir="auto">I was bit again by that indentation bug, even in PythonScript, obviously it does it, too.</p>
</blockquote>
<p dir="auto">I’m a bit disturbed by this.<br />
There is no indentation bug, just indentation rules to follow.<br />
And PythonScript is just a plugin version of an embedded Python interpreter, so any files created for use with it must also follow Python’s indentation rules.<br />
I wish I could help further, but I really don’t know how to.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76237</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76237</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 21 Apr 2022 20:21:54 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Thu, 21 Apr 2022 19:59:00 GMT]]></title><description><![CDATA[<p dir="auto">So, one thing I said originally was:</p>
<blockquote>
<p dir="auto">ideally this script would be run from user <a href="http://startup.py" rel="nofollow ugc">startup.py</a></p>
</blockquote>
<p dir="auto">The operative word there being <em>user</em>.<br />
You edited the <em>machine</em> startup script – not advisable, not really proper – but in and of itself, this isn’t the source of your problems, I don’t think.</p>
<p dir="auto">But, forget all that “startup” stuff, for just taking it for a test drive…</p>
<p dir="auto">What I just tried:</p>
<ul>
<li>Started up a clean N++ sandbox with PythonScript plugin</li>
<li>Created a new script giving it the name <code>TabSettingsOverrideByExtension.py</code></li>
<li>Copied my “black box” code from above into the file</li>
<li>Saved the file</li>
<li>Ran the script from the menus</li>
</ul>
<p dir="auto">It runs (quietly) with no output (thus no indentation problems).</p>
<p dir="auto">If I open a .prg file, it enforces my 3-space tab rule that’s defined in the code.</p>
<p dir="auto">Thus, I’m not certain where you went wrong.  Maybe: It says something about line 43 but the file you show only has 42 lines; not sure what to think about that.</p>
<p dir="auto">Running the script not-from-startup is fine, it certainly will work that way.  But note from the last 5 lines of the file the logic there – you only get to run it one time.  Thus if you want to make changes to the script (such as modifying the configuration of additional file types), those won’t be picked up…until you restart Notepad++ and re-run.  We don’t want the script to run more than once per Notepad++ session, because it installs a notification handler, and if the script were run multiple times, it would install multiple handlers (not good).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76233</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76233</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 21 Apr 2022 19:59:00 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Thu, 21 Apr 2022 19:31:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> ,<br />
That first black box is <a href="http://startup.py" rel="nofollow ugc">startup.py</a> code, and the next one down was TSOBE code file.</p>
<p dir="auto">I did find out that when I changed them around I was bit again by that indentation bug, even in PythonScript, obviously it does it, too.  For that error, I just eliminated the spaces and the comment symbol from those two lines…but it still doesn’t work as you suggested…even after I didn’t get any errors…which my startup script no longer stops the console from appearing even though the script closes it.</p>
<p dir="auto">So until I can not make stupid errors due to possible indentation errors in PythonScript, I’ll just set the default. It’s easier to implement, apparently. Here’s the error I got from the indentation issue.</p>
<pre><code>Traceback (most recent call last):
  File "C:\Program Files\Notepad++\plugins\PythonScript\scripts\startup.py", line 43, in &lt;module&gt;
    import TabSettingsOverrideByExtension
  File "C:\Program Files\Notepad++\plugins\PythonScript\scripts\TabSettingsOverrideByExtension.py", line 43
    
                         ^
IndentationError: expected an indented block

Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:25:05) [MSC v.1500 64 bit (AMD64)]
Initialisation took 421ms
Ready.
</code></pre>
<p dir="auto">Thanks for the attempt, but I think I’ll wait until I’m more versed in the intricacies of Python before I venture into using it again, or commenting on it’s use. :-(</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76230</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76230</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Thu, 21 Apr 2022 19:31:26 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Wed, 20 Apr 2022 23:27:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lycan-thrope" aria-label="Profile: lycan-thrope">@<bdi>lycan-thrope</bdi></a></p>
<p dir="auto">Where it says:</p>
<p dir="auto"><code>to run via another file, e.g., startup.py:</code></p>
<p dir="auto">You need to put the two lines below that, in uncommented form, <em>into</em> <a href="http://startup.py" rel="nofollow ugc">startup.py</a>.  That’s what “via another file” means.  Perhaps this could’ve been made clearer somehow.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76212</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76212</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 20 Apr 2022 23:27:16 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Wed, 20 Apr 2022 22:41:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lycan-thrope" aria-label="Profile: lycan-thrope">@<bdi>lycan-thrope</bdi></a><br />
For clarification, here’s the files, in case I screwed something up (like that ever happens) :-)</p>
<pre><code># The lines up to and including sys.stderr should always come first
# Then any errors that occur later get reported to the console
# If you'd prefer to report errors to a file, you can do that instead here.
import sys
from Npp import *

console.write("START of machine startup.py\n\n")

# Set the stderr to the normal console as early as possible, in case of early errors
sys.stderr = console

# Define a class for writing to the console in red
class ConsoleError:
	def __init__(self):
		global console
		self._console = console;

	def write(self, text):
		self._console.writeError(text);

# Set the stderr to write errors in red
sys.stderr = ConsoleError()

# This imports the "normal" functions, including "help"
import site

sys.stdout = console

# In order to set the stdout to the current active document, uncomment the following line
# sys.stdout = editor
# So print "hello world", will insert "hello world" at the current cursor position

########## added:
# for e in (editor1,editor2):
    # e.callTipSetBack((204, 255, 102))
    # e.callTipSetFore((0,0,0))
    # e.callTipSetForeHlt((0, 102, 255))

# to run via another file, e.g., startup.py:
#  import TabSettingsOverrideByExtension
#  tsobe = TabSettingsOverrideByExtension.TSOBE()

import TabSettingsOverrideByExtension

tsobe = TabSettingsOverrideByExtension.TSOBE()

if __name__ == '__main__':
    try:
        tsobe
    except NameError:

console.write("END of machine startup.py\n\n")
console.hide()
</code></pre>
<p dir="auto">And your file I copied and created the file name that is referenced:</p>
<pre><code># -*- coding: utf-8 -*-
from __future__ import print_function

from Npp import *
import os

#-------------------------------------------------------------------------------

class TSOBE(object):

    def __init__(self):
        self.config_dict = {
            'prg' : { 'use_tab_chars' : False, 'spaces_per_tab' : 3 },
            'no_ext' : { 'use_tab_chars' : True, 'spaces_per_tab' : 8 },
        }
        notepad.callback(self.bufferactivated_callback, [NOTIFICATION.BUFFERACTIVATED])
        self.bufferactivated_callback(None)  # fake notification so that the current file gets set up when first run

    def bufferactivated_callback(self, args):
        complete_pathname = notepad.getCurrentFilename()
        filename_with_ext = complete_pathname.rsplit(os.sep, 1)[-1]
        if '.' in filename_with_ext:
            ext = filename_with_ext.rsplit('.', 1)[-1].lower()
            if ext in self.config_dict:
                print('setting up for files with extension', ext)
                editor.setUseTabs(self.config_dict[ext]['use_tab_chars'])
                editor.setTabWidth(self.config_dict[ext]['spaces_per_tab'])
        elif notepad.getCurrentLang() == LANGTYPE.TXT:
            print('setting up for extensionless files')
            editor.setUseTabs(self.config_dict['no_ext']['use_tab_chars'])
            editor.setTabWidth(self.config_dict['no_ext']['spaces_per_tab'])

#-------------------------------------------------------------------------------

# to run via another file, e.g., startup.py:
#  import TabSettingsOverrideByExtension
#  tsobe = TabSettingsOverrideByExtension.TSOBE()

# if __name__ == '__main__':
    # try:
        # tsobe
    # except NameError:
</code></pre>
<p dir="auto">This pic seems to be where the cursor stops in the TSOBE file:</p>
<p dir="auto"><img src="/assets/uploads/files/1650494465599-consolestopintsobefile.png" alt="Consolestopintsobefile.PNG" class=" img-fluid img-markdown" /></p>
<p dir="auto">And this is the .prg file showing that the changes didn’t take place:</p>
<p dir="auto"><img src="/assets/uploads/files/1650494502667-prgfilenotshowingsettings.png" alt="prgfilenotshowingsettings.PNG" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/76209</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76209</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Wed, 20 Apr 2022 22:41:44 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Wed, 20 Apr 2022 22:07:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> ,<br />
For what it’s worth, I couldn’t get this to work, copy pasting the stuff into a new file, stored in the same folder as <a href="http://startup.py" rel="nofollow ugc">startup.py</a> and copying and uncommenting the code you pointed had commented importing and the declaration, and the test code keeps erroring our right after the declaration. It doesn’t seem to get down to the <em>main</em> test.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76207</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76207</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Wed, 20 Apr 2022 22:07:25 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Wed, 20 Apr 2022 12:09:57 GMT]]></title><description><![CDATA[<p dir="auto">FWIW, here’s a more direct script that handles the desired situation.  It uses a dictionary for configuration; for more extension overrides, simply add a line into the dictionary.  I call this script <code>TabSettingsOverrideByExtension.py</code>:</p>
<pre><code># -*- coding: utf-8 -*-
from __future__ import print_function

from Npp import *
import os

#-------------------------------------------------------------------------------

class TSOBE(object):

    def __init__(self):
        self.config_dict = {
            'prg' : { 'use_tab_chars' : False, 'spaces_per_tab' : 3 },
            'no_ext' : { 'use_tab_chars' : True, 'spaces_per_tab' : 8 },
        }
        notepad.callback(self.bufferactivated_callback, [NOTIFICATION.BUFFERACTIVATED])
        self.bufferactivated_callback(None)  # fake notification so that the current file gets set up when first run

    def bufferactivated_callback(self, args):
        complete_pathname = notepad.getCurrentFilename()
        filename_with_ext = complete_pathname.rsplit(os.sep, 1)[-1]
        if '.' in filename_with_ext:
            ext = filename_with_ext.rsplit('.', 1)[-1].lower()
            if ext in self.config_dict:
                print('setting up for files with extension', ext)
                editor.setUseTabs(self.config_dict[ext]['use_tab_chars'])
                editor.setTabWidth(self.config_dict[ext]['spaces_per_tab'])
        elif notepad.getCurrentLang() == LANGTYPE.TXT:
            print('setting up for extensionless files')
            editor.setUseTabs(self.config_dict['no_ext']['use_tab_chars'])
            editor.setTabWidth(self.config_dict['no_ext']['spaces_per_tab'])

#-------------------------------------------------------------------------------

# to run via another file, e.g., startup.py:
#  import TabSettingsOverrideByExtension
#  tsobe = TabSettingsOverrideByExtension.TSOBE()

if __name__ == '__main__':
    try:
        tsobe
    except NameError:
        tsobe = TSOBE()
</code></pre>
<p dir="auto">As indicated in the comments in the code, ideally this script would be run from user <a href="http://startup.py" rel="nofollow ugc">startup.py</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76190</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76190</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 20 Apr 2022 12:09:57 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Tue, 19 Apr 2022 22:08:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a><br />
I think I said that already. :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76182</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76182</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Tue, 19 Apr 2022 22:08:43 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Tue, 19 Apr 2022 01:21:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lycan-thrope" aria-label="Profile: lycan-thrope">@<bdi>lycan-thrope</bdi></a></p>
<p dir="auto">I see.  It gives YOU grief if YOU can’t keep the indentation consistent.  :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76151</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76151</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 19 Apr 2022 01:21:33 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Mon, 18 Apr 2022 23:39:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> said in <a href="/post/76113">Adding the Extension of PRG in the Tab Settings list</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lycan-thrope" aria-label="Profile: lycan-thrope">@<bdi>lycan-thrope</bdi></a> said in <a href="/post/76106">Adding the Extension of PRG in the Tab Settings list</a>:</p>
<blockquote>
<p dir="auto">Python seems to be the only one that gives me grief about indentation, but…that’s the way IT works, so I don’t get a say in it</p>
</blockquote>
<p dir="auto">How exactly does Python present a problem in this area?</p>
</blockquote>
<p dir="auto">…<br />
In Python, all the code that you type is arranged via correct whitespaces and therefore if at any instance you have a bad indentation, the overall code will not run and the interpreter will simply return an error function.<br />
…<br />
via: <a href="https://www.edureka.co/blog/indentation-error-in-python/" rel="nofollow ugc">https://www.edureka.co/blog/indentation-error-in-python/</a></p>
<p dir="auto">Not sure if PythonScript suffers this same issue, but I’ve had at least one interpreter that was adamant since I’ve been trying to figure out Python in the different tutorials. :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76149</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76149</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Mon, 18 Apr 2022 23:39:19 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Mon, 18 Apr 2022 19:11:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/frankandrew57" aria-label="Profile: frankandrew57">@<bdi>frankandrew57</bdi></a> ,</p>
<p dir="auto">BTW: I was looking at something else, and found <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4458" rel="nofollow ugc">issue#4458</a> requested the ability to set tab settings for UDL back in 2018, but nothing has been done about it.</p>
<p dir="auto">Using the workarounds presented here are your best choice for the short-to-medium term.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76143</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76143</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 18 Apr 2022 19:11:26 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Mon, 18 Apr 2022 18:36:18 GMT]]></title><description><![CDATA[<p dir="auto">As Peter mentions that scripting can be used to achieve the desired behavior, I’ll cite this semi-related script that could be used as a basis:  <a href="https://community.notepad-plus-plus.org/post/54777">https://community.notepad-plus-plus.org/post/54777</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/76140</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76140</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Mon, 18 Apr 2022 18:36:18 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Mon, 18 Apr 2022 11:22:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lycan-thrope" aria-label="Profile: lycan-thrope">@<bdi>lycan-thrope</bdi></a> said in <a href="/post/76106">Adding the Extension of PRG in the Tab Settings list</a>:</p>
<blockquote>
<p dir="auto">Python seems to be the only one that gives me grief about indentation, but…that’s the way IT works, so I don’t get a say in it</p>
</blockquote>
<p dir="auto">How exactly does Python present a problem in this area?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76113</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76113</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Mon, 18 Apr 2022 11:22:25 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Mon, 18 Apr 2022 05:49:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a> said in <a href="/post/76082">Adding the Extension of PRG in the Tab Settings list</a>:</p>
<blockquote>
<p dir="auto">The UDL system doesn’t have a way to define the tab/space settings, though that would be really nice.</p>
</blockquote>
<p dir="auto">This is the part I thought you were hinting at it needing to be a lexer/plugin from, my mistake…and thanks for the Python reference, too. I’m still not as well versed in that as I’d like either so don’t often think of it. :( Thanks for the additional help. I still like setting the default though, since as I mentioned, that seems to be the way people do it, if they have a preference anyway.  Python seems to be the only one that gives me grief about indentation, but…that’s the way <strong>IT</strong> works, so I don’t get a say in it. :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76106</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76106</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Mon, 18 Apr 2022 05:49:23 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Sun, 17 Apr 2022 23:07:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/frankandrew57" aria-label="Profile: FrankAndrew57">@<bdi>FrankAndrew57</bdi></a> ,</p>
<p dir="auto">Instead of creating your own lexer/plugin (which I don’t think I actually suggested in this discussion, though I have suggested it at other times), the PythonScript plugin allows you to use <code>editor.setTabWidth(tabWidth)</code> to set the tab width… so you could do that in a callback which is activated every time the file is opened or gets focus (there are other examples in the forum, search for <code>BUFFERACTIVATED</code> , and you will probably find an example) – it would check the extension, and if found to be <code>.PRG</code> file, change the tab width.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76099</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76099</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Sun, 17 Apr 2022 23:07:26 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Sun, 17 Apr 2022 22:22:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> ,<br />
Yes, I know, but short of him doing as Peter says, creating his own lexer/plugin, this will accomplish the same thing for him. If he uses NPP to program in Visual Fox Pro, as it seems he’s suggesting by his request, that he wants to do, then this will accomplish for him.  Not many people program outside their normal development environment, where they have their defaults already set, but when they do, they tend to use the same kind of formatting through all the languages, with the exception of maybe Python, that <strong>requires</strong> specific formatting to function.</p>
<p dir="auto">I know in my C programs as well as my dBASE and other programming code files I use a 3 space indentation as I don’t like excessively spaced code when 1 less space per indentation will more likely keep the structure within an 80 character per line limit for printing  on letter size if need be and I don’t have to scroll all across the editor to see the code on long runs, so I try to keep everything within that 80 character space and the smaller indents help. I actually had it down to 2 spaces, but then it got harder to tell the structure so I went back up to 3. :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76098</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76098</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Sun, 17 Apr 2022 22:22:29 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Sat, 16 Apr 2022 23:13:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lycan-thrope" aria-label="Profile: lycan-thrope">@<bdi>lycan-thrope</bdi></a></p>
<p dir="auto">Your method for changing the tab settings isn’t exactly what the OP is looking for.  OP is looking for specifying a tab setting for a single type of file; your solution is changing the setting for all file types unknown to Notepad++'s tab settings box.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76090</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76090</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sat, 16 Apr 2022 23:13:18 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Sat, 16 Apr 2022 21:28:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lycan-thrope" aria-label="Profile: lycan-thrope">@<bdi>lycan-thrope</bdi></a><br />
Sorry, that link doesn’t work the way I had hoped it would, and the forums won’t let me edit it, so…just use your newsgroup software using the <a href="http://news.dbase.com" rel="nofollow ugc">news.dbase.com</a> link to check out the newsgroup. Clicking this link will take you to the Web News group, which is clumsier than using a newsgroup reader program.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76089</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76089</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Sat, 16 Apr 2022 21:28:09 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Sat, 16 Apr 2022 21:19:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/frankandrew57" aria-label="Profile: frankandrew57">@<bdi>frankandrew57</bdi></a> said in <a href="/post/76075">Adding the Extension of PRG in the Tab Settings list</a>:</p>
<blockquote>
<p dir="auto">This file type PRG is used in Visual FoxPro/DBase as their program code files.<br />
I need to set the tab stops to the sire of three (3) and use spaces instead of the tab character but I see no place where I can add new extension types to the Tab Settings list.</p>
</blockquote>
<p dir="auto">Aside from what Peter has said, there is a way you can change the default, so it affects every file you create from this point on, by changing the default and you do that by going to the <strong>Settings-&gt;Preferences-&gt;Languages</strong> where you’ll see this:</p>
<p dir="auto"><img src="/assets/uploads/files/1650142381048-tab1.png" alt="Tab1.PNG" class=" img-fluid img-markdown" /></p>
<p dir="auto">You’ll notice I’ve already changed mine. To change yours click the checkbox for <strong>Replace by space</strong>, then click on the number next to <strong>Tab size:</strong> and you’ll see this screen:</p>
<p dir="auto"><img src="/assets/uploads/files/1650142489682-tab2.png" alt="Tab2.PNG" class=" img-fluid img-markdown" /></p>
<p dir="auto">Change the tab size to the size you want and to apply it, you have to hit <strong>Enter</strong>. From then on all your tabs will be 3 spaces, but only for new documents. Any old ones will still have the old default of 4 and will be a tab character.  I use dBASE Plus, so I’m a little familiar with your issues. I don’t think our languages are as similar now as they use to be, because we have a lot of differences in OOP implementation/syntax, though we have seen a number of VFP users/developers looking to move over to dBASE because of VFP development ending.</p>
<p dir="auto">Should you also look to change, I have developed a dBASE Plus UDL that some of our users wanted to see implemented in Notepad++, of which Peter and many here were very much instrumental in helping me get it done. I have a completed FunctionList, Autocomplete file and UDL for the language should you want to become a user of dBASE Plus, and we have a fairly active and helpful newsgroup at <a href="news.dbase.com">news.dbase.com</a> should you want to join or pick up our UDL files.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76088</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76088</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Sat, 16 Apr 2022 21:19:15 GMT</pubDate></item><item><title><![CDATA[Reply to Adding the Extension of PRG in the Tab Settings list on Sat, 16 Apr 2022 17:26:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/frankandrew57" aria-label="Profile: frankandrew57">@<bdi>frankandrew57</bdi></a> said in <a href="/post/76075">Adding the Extension of PRG in the Tab Settings list</a>:</p>
<blockquote>
<p dir="auto">Would you guys/gals either be so kind and add this in the next version of NP++</p>
</blockquote>
<p dir="auto">As our <a href="https://community.notepad-plus-plus.org/topic/21964/please-read-this-before-posting">Please Read Before Posting</a> and <a href="https://community.notepad-plus-plus.org/topic/15741/faq-desk-feature-request-or-bug-report">Feature Request FAQ</a> posts both clearly indicate, we Community members are fellow users, <em>not</em> the development team.  No matter how many times someone mentions a cool feature in the Forum, it will never get implemented if no one puts in an official feature request.</p>
<p dir="auto">The UDL system doesn’t have a way to define the tab/space settings, though that would be really nice.  Unfortunately, the developement team has not dealt with many/any UDL-related feature requests for years, so even if you were to follow the FAQ instructions to submit a feature request (“Allow the setting of tab width and replace-with-space on a per-UDL basis”), it is doubtful that anything would come of it.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76082</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76082</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Sat, 16 Apr 2022 17:26:32 GMT</pubDate></item></channel></rss>