@PeterJones said in 3 Newbie questions: cursor and folder margin disappeared and selective line editing in a file:
@George-Jereza ,
It would have been nice if you’d also copy/pasted the text and clicked the </> button, like I asked. But when I retyped that whole thing, I didn’t see what you were seeing.
Then I realized: you don’t actually have the Lua syntax highlighter selected for that .bp file, because there isn’t even the column for the folding indicator, and your numbers have no color to them. That is, it looks like this screenshot:
6559a482-813b-40f0-92cf-43dec5f4faee-image.png
Notice that the lower left corner, and the Language menu, both indicate Normal Text rather than Lua. If you set Language > L > Lua,
9762beb5-9ddb-4bd7-a360-f145eed15a03-image.png
Then you can see “Lua source file” in the lower-left and Language > L > Lua is indicated as selected in the menu system; further, if you look now
3e694cdc-24cd-42af-a906-64fb1114bacc-image.png
… you can see that true is blue, as a known constant; the number values are orange; and there are fold markers in the left column.
The reason why the .bp file doesn’t default to Lua is because that’s not a standard Lua extension. If .bp files should always be “Lua” for you, then you need to tell Notepad++ this: go to the Settings menu, click Style Configurator; in the “Language” box on the left, select “Lua”; in the “User ext. :” box at the bottom, type bp (no dot); then click save-and-close.
7492592b-d7e3-41d7-bcc3-52962611a9b5-image.png
From now on, when you open a .bp file, it will recognize it as Lua and highlight appropriately; further, if you create a new file and Save As something.bp, it will also start hightlighting as Lua after the save is complete.
Plugins : LuaScript.dll mimeTools.dll NppConverter.dll NppExport.dll
Given that your Debug Info showed Lua Script plugin is installed, I think you do know how to install a plugin … or at least, someone explained it to you at one point, because you have an extra plugin installed.
like they have it in Microsoft Word’s Navigation Map
Like @Ekopalypse said , the Notepad++'s Document Map isn’t quite the same feature as MSWord’s Navigation Map. MSWord’s Navigation Map uses word-processor HEADER# format indicators to create a navigatable Table of Contents. Notepad++'s Document Map just takes the whole document and shrinks to the tiniest font it can render, and shows a highlighted section to let you know what’s on screen by giving you an unreadable “overview”, so you can see approximately where in your document you are. If you don’t find that useful, don’t use it.
4c6fa616-0caf-4250-a225-984d8e9497e1-image.png
Notepad++ does have a feature called “Function List” (View > Function List will toggle it) which shows you the functions (and classes) in your source code. But since your .bp files appear to be using Lua syntax for just storing data structures[1] (kind of a Lua-based[2] config language similar to “JSON” – but using Lua syntax instead of JavaScript syntax), rather than as a full-blown programming language, then you don’t have any functions (or classes). If you did, it would make it easy to navigate to each function (which is as close as source files come to having “headers” from word-processing nomenclature).
[1: Looks like a video-game config file to me. We’ve seen some search-and-replace queries in video-game configs recently. I wonder if there’s been one or more more easily-moddable games released recently.]
[2: I say “Lua-based” loosely, because the Lua syntax highlighter was not highlighting the comments, which a quick google tells me are actually -- indicated, not #. So now I’m wondering if it’s really not Lua-based, or if it would be better to pick some other language for syntax highlighting for your .bp blueprint files.]
@PeterJones Sorry for not providing text to the sample but thank you very much for re-typing the whole thing!
Yes, the sample file I showed you is a gaming file. And yes it is a lua file. The game is decades old with a very active modding community (‘mods’ are like add-ons or plug-ins).
I became familiar with Npp plugins after you provided me the link to the Npp manual and after I quickly scanned the Npp owner’s guide. I thought that a text editor that mentions the word ‘sex’ in its cover page has really something to offer and therefore worth checking out. Lol.
The reason why I thought I had a problem was because I did change the language setting in the Configuration Style but nothing instantly changed on screen unlike other settings. It was not clear that I had to quit Npp before the change would reflect onscreen.
BP is an acronym for BluePrint. It is a lua file. The game modders just extended the lua syntax by adding ‘#’ for comments.
https://wiki.faforever.com/index.php?title=Modding
Btw, if you or anyone is stressed out, I found that this particular game, --having real physics in its ballistics (eg. nukes, artillery, etc.) and is very moddable might help take your mind off more serious stuff. In my opinion shared by lots of others, it’s the only real time strategy game that and still exists. There’s lots and lots of videos in YouTube on the game.
Thank you for your help and excellent reply.