capo367 / npp-gmod-lua

Automatically exported from code.google.com/p/npp-gmod-lua
0 stars 0 forks source link

Skip literal string detection #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
First this is a sugerense of question on How to do it.

What version of the product are you using? On what operating system?
Plug-in ver = 1.2
OS = Windows XP

This is related to World of Warcraft customizing features.

Hi there, it would be wonderful that Notepad++ could be issued to stop the
highlighting the literal strings, so when coding Handlers Snippets or any
type of Snippet the normal highlighting would continue inside of them.

What I mean is to be able to stop the detection of long strings, and color
inside the literal like if it where a operator or a parenthesis. 

Thanks for your Time. FF

Original issue reported on code.google.com by Free...@gmail.com on 9 Nov 2009 at 12:23

GoogleCodeExporter commented 9 years ago
Can you give me a code snippet that shows the problem? Also, this is for 
Garry's Mod,
not World of Warcraft.

Original comment by Garthex on 9 Nov 2009 at 12:26

GoogleCodeExporter commented 9 years ago
It is not a problem, is a question on how to do it or a suggestion that can be 
added
to the plug-in. I know it is not WoW, WoW is just an example where this could be
useful. Because I believe that when writing a snippet is and see the chunk all
colored the same is quite uncomfortable.

Quoting from the site:
"features you would like under the Issues tab"

http://www.facepunch.com/showthread.php?p=8625735

The project is now being hosted by Google Code:
http://code.google.com/p/npp-gmod-lua/
Please report any problems you encounter or features you would like under the 
Issues tab.
Also check out the How-To Wiki page for important instructions.

Example:
[code]
FFParser:SetAttribute("Function_Get",[[
        local rIni, rEnd = select(1, ...);
        rEnd = rEnd or self:GetAttribute("argsN");
        if rEnd then
            rIni = rIni or 1;
            local outPut = self:GetAttribute("arg" .. tostring(rIni));
            if rIni ~= rEnd then
                local f = self:GetAttribute("Function_Get");
                return outPut, control:RunFor(self, f, (rIni + 1), rEnd)
            else
                control:RunAttribute("Function_End");
                return outPut
            end
        end
    ]]);

[/code]

With notepad++ default or Gmod-Lua plug-in this is seen all with the same color
between [[ and ]], with are not only part of the block comment format but also 
the
way to define literal/long strings.

I hope there is a simple work around.

Thanks for the quick response.

Original comment by Free...@gmail.com on 9 Nov 2009 at 1:11

GoogleCodeExporter commented 9 years ago
(I know one can erase the [[ and add them to the last before execution but that 
is
also extremely uncomfortable, more when debugging many snippets at the same 
time)

Original comment by Free...@gmail.com on 9 Nov 2009 at 1:15

GoogleCodeExporter commented 9 years ago
Ahh, I see what you mean. It is possible to change the literal strings to always
parse more lua code, but it might not always be desirable. This would require a
setting in the dialog menu to enable this feature so that it can be turned off.
Another issue would be coloring and whether or not to use the same coloring 
scheme as
the rest of the code (which might cause confusion since it's really inside a 
string).
I'll consider it, but it seems that rare that this functionality be desired. 
Are you
requesting that inside the literal string, it parse the code as Garry's Mod lua 
or as
a different language?

Original comment by Garthex on 9 Nov 2009 at 1:24

GoogleCodeExporter commented 9 years ago
Hi,
That is nice, but is there a way for a user to dwell inside your source and 
modify it
with out having to swim inside a big pool of considerations commonly known to 
persons
that create Notepad++ plug-ins?. How such persons should approach this problem?.

If the easies way to do this is creating another language that is detected at 
the
same time that Gmod-Lua; is there a way to derivate it from the current 
plug-in?.

To differentiate it once could choose a Bold, underline or different font 
approach
and keep the same coloring as Garry's Mod.

I might be wrong but WoW Interface sites and forums are quite a community, to 
this
you can add any other game that takes the same approach or any system that 
requires
of a scripting interface and uses similar solution.

Thanks Again.
FF.

Original comment by Free...@gmail.com on 9 Nov 2009 at 11:23

GoogleCodeExporter commented 9 years ago
All of this plugin code is open source, so if you want to look at the code and 
modify
it for your own use, you are more than welcome to.

Original comment by Garthex on 15 Nov 2009 at 12:06

GoogleCodeExporter commented 9 years ago
Hi again,
I was searching a more direct way to communicate with ya and I didn't find any 
PM
system or mail direction.
Plz contact me at fedebec4070@hotmail.com.

Original comment by Free...@gmail.com on 9 Dec 2009 at 10:07

GoogleCodeExporter commented 9 years ago

Original comment by Garthex on 25 Sep 2010 at 10:25