Notepad++ Maptool Text Editor config file [UPDATE: 5/31/12]

Show off your RPG maps, campaigns, and tokens. Share your gaming experiences and stories under General Discussion and save this forum for things you've created that may help others run their own games. Use the subforums when appropriate.

Moderators: dorpond, trevor, Azhrei, Gamerdude

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Notepad++ Maptool Text Editor config file

Post by aliasmask »

If it's windows, then it's there, but it's hidden from you. When browsing your folders with explorer, you can click Tools | Folder Options. Click the View TAB look checkbox list and uncheck "Hide protected operating system files"... OR you can browse to the right spot and type in "\Application Data" after your user name. Then you can browse to the Notepad++ folder from there.

User avatar
Raoden
Dragon
Posts: 381
Joined: Fri Dec 18, 2009 2:33 am
Location: San Diego

Re: Notepad++ Maptool Text Editor config file

Post by Raoden »

Aha.

*Performs feel-like-a-noob facepalm.*

I know about hidden files/folders, but I've so rarely done anything that involved them, I had forgotten to check that option. Thanks!
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton

Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Notepad++ Maptool Text Editor config file

Post by Full Bleed »

Thanks for the update to the Lang file, Aliasmask.

And I updated my earlier post where I mention where the AppData directory is in Win7 to indicate that it's "Hidden". Turning on view Hidden files and showing Hidden OS Files is one of the first things I do when I install an OS.

TIP: Viewing hidden directories and hidden OS files can be a per folder option. If you turn the option on globally, you probably won't want to see the hidden files on your desktop. In Win7 you can turn them off for that folder by:

1) In Windows Explorer, navigate to your DeskTop Folder.
2) Click the "Organize" drop-down and Select "Folder and Search Options."
3) Make sure "Hide Protected OS System Files (Recommended)" is checked.
4) Click the "Apply" button at the bottom (not the "Apply to Folders" button at the top, unless you want the setting to affect all folders.)
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Notepad++ Maptool Text Editor config file

Post by aliasmask »

I was updating my config file for maptools code and I would really like to integrate a method for blocked code without messing up the code and here's what I'm thinking of doing.
@@ #macroName(param1[,param2{"{}"}]): returnVal
[H: param1 = arg(0)]
[H, if(argCount() >= 2): param2 = arg(1); param2 = "{}"]
[H: macro.return = returnVal]
!!
This would be an alternate to the existing formatting where the old will still work, but this method would do some extra things. First of all, I would only need to define the first line as shown above and the rest would be automatically filled in on import. Leaving the : and following out of first line will not generate and macro.return line. If no tip is defined, the tip will be set the code on the first line, for example "macroName(param1[,param2]): returnVal". In the above example I set the default value or param2 when not given inside the {}. If no default is given then "" is the default value.

Would anyone other than me use this?

edit: This is more of a MacroIO comment, but related to notepad, I'm updating the highlighting to accommodate this format. I'm also working on adding the function syntax and descriptions to the maptool.xml file. I was going to parse the data from the VIM editor, but it seems just as easy to just copy from the wiki since the data in VIM needs to be tweaked with anyway. The function format will be:
[JSON] FUNCTION: functionName (parameters)

Description in unformatted block of text 72 char wide.
Last edited by aliasmask on Fri Oct 29, 2010 7:18 pm, edited 1 time in total.

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: Notepad++ Maptool Text Editor config file

Post by CoveredInFish »

It could be that I would use it .. but ... aeh ... what? What does that? Is this about code highlighting or has it something to do with macroIO? I lost you... :?:

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Notepad++ Maptool Text Editor config file

Post by aliasmask »

CoveredInFish wrote:It could be that I would use it .. but ... aeh ... what? What does that? Is this about code highlighting or has it something to do with macroIO? I lost you... :?:
Currently, I'm just talking about code highlighting and using the autocomplete in notepad. The example format:
@@ #macroName(param1[,param2{"{}"}]): returnVal
[H: param1 = arg(0)]
[H, if(argCount() >= 2): param2 = arg(1); param2 = "{}"]
[H: macro.return = returnVal]
!!
is something I'm considering on doing with MacroIO. I'm terrible at setting bookmarks, but if I can collapse all the code I don't update and I'm not working on, that would greatly save my scroll button.

But doing this I found a bug?? with notepad. Apparently it doesn't like the "." character in the keywords. Before I had json and length as separate keywords and made a function out of length, but as you may know json.length and length would have the same description using that method. So, I was trying to make json.length a function but it doesn't seem to work. I know it didn't work before because "." was an operator, so I removed it from the operator list and discovered this bug. I'm in the process of posting it on sourceforge now, but who knows when someone will tackle that, so I'll just have to have both descriptions for that one example (to be thorough).

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: Notepad++ Maptool Text Editor config file

Post by CoveredInFish »

Ah ... okay, now i got it.

Sounds useful to me (except for the bug :) )

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Notepad++ Maptool Text Editor config file

Post by aliasmask »

New Maptool config and color scheme are up. I'm only posting the one color scheme now, since it's pretty easy to set your own scheme if you don't like it. The important thing is all the keywords are in the file.

I also updated the function keywords and added DESCRIPTIONS from the Wiki. You'll definitely want to download and update that file.

Next, I'll be working on new MacroIO functionality and eventually combine that, Cif's new timer code (or a close variation) and my debugging code in to one lib.

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: Notepad++ Maptool Text Editor config file [UPDATE: 11/3]

Post by CoveredInFish »

Oh this is so awesome. Feels like working in a real IDE. I cant wait to see what you do to macroIO. :-D

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Notepad++ Maptool Text Editor config file [UPDATE: 11/3]

Post by wolph42 »

Nice!
However I can't get the tooltip to work, how does it work?
as in if I type e.g. "replace(" and hover my mouse over it nothing happens. I do get the dropdownbox for function selection.

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Notepad++ Maptool Text Editor config file [UPDATE: 11/3]

Post by aliasmask »

When you open a document and set the language to maptool. You should be able to type in a function (case-sensitive) and when you put the paren "(" the tip should pop up.

Now for that to happen you do have to config notepad. Under Settings | Preferences | Backup/Auto-Completion TAB you have to "enable auto-completion on each input", select "Function Completion" and check "Function parameters hint on input". I didn't mention the last part in the original post because I didn't have the function data, but I'll update it now.

OPTIONALLY: You can leave the "Function parameters hint on input" unchecked and hit CTRL-SHIFT-Spacebar to have the hint popup while typing in the parameters.


User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Notepad++ Maptool Text Editor config file [UPDATE: 11/3]

Post by wolph42 »

I noticed that 'replace' is alphabetically in the wrong place in the function drop down list. As I don't know how to fix it, I thought I at least mention it here.

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Notepad++ Maptool Text Editor config file [UPDATE: 11/3]

Post by aliasmask »

wolph42 wrote:I noticed that 'replace' is alphabetically in the wrong place in the function drop down list. As I don't know how to fix it, I thought I at least mention it here.
Actually the regex.info1... is out of place. If you open the maptool.xml file, you can cut/paste those keywords in to the correct order. The file sorts by the order it appears in the xml file.

I typed in the regex.info1 after doing the replace because it was relevant, but I didn't think about putting it in to the correct place at the time. It does interfere with the popup (sometimes), so I'll replace the current file with the corrected one. But the way it reacts now is that the keyword doesn't popup unless there is a conflict in the keywords... so typing "str" will list "strfind,strformat" because the both start with "str". Depending on your setting of how many characters, it may not show up at all, but you can still hit ctrl-enter and it will either give you a list or input the keyword. So, if you set it to 1 character, then it will popup for everything.

edit: maptool.xml has been updated. Download again to have the auto-complete work better.


Post Reply

Return to “User Creations”