Comments (4)
the autoCompletion\cs.xml
is a customizable configuration file; you can add any function completion you want to that file, and the next time you run Notepad++, those extra functions and parameters will be available for Function and Parameter Hint completion.
The user manual has a section on auto-completion. Please note the caveats on punctuation in auto-completion (your examples of Transform.rotation
, for example).
from userdefinedlanguages.
There is no Unity3D C# UDL shared with this repository, nor have I ever seen one linked on the community.notepad-plus-plus.org forum.
However, If "Unity 3D C#" is really just C# syntax, with some extra keywords, then UDL might not be the best choice: it's probably easiest to just assign the Unity 3D C# extension to be interpreted as C#, and then add extra keywords to the C# lexer:
- Settings > Style Configurator: click Language:
C#
User ext.:
=u3d
or whatever the extension of "Unity 3D C#" is- The Style:
INSTRUCTION WORD
andTYPE WORD
both have User-defined keywords boxes, where you can add in all the extra keywords for the "Unity 3D" keyword extensions to C#
If you'd rather have different colors for the "Unity 3D" keywords as compared to "standard" C# keywords, the built-in lexer isn't enough. But adding the plugin EnhanceAnyLexer, you can define a [c#]
section in the config file (Plugins > Enhance Any Lexer > Open Configuration File). For example, if you wanted these fake keywords unity3d
and deunify
to show up as cyan, and magenta
and purple
keywords to show up as a magenta color:
[c#]
0xFFFF00 = \b(unity3d|deunify)\b
0xFF00FF = \b(magenta|purple)\b
If you have more words for the same color, just continue adding them inside those parentheses with |
between. If you want other colors for other keywords, just use similar lines . The left side of the equal-sign is a color; the right side is a regular expression (the same syntax that's allowed in Notepad++'s regular expression search; the ;
-prefixed comments in the default config file for that plugin explains more about the color syntax.
from userdefinedlanguages.
Hello pryrt,
thank you for your quick and competent answer. Well the Unity 3D extension for C# is .cs so basically the default extension. I could add some more default keywords for Instruction Word and Type Word. But if e.g. I would add the type Transform I would not get auto-completion to offer me some properties like Transform.position or Transform.rotation. Would that be possible by editing the language file? Maybe I could copy the original file and add important classes with their properties and functions step by step?
Kind regards.
from userdefinedlanguages.
Thank you very much, I think I'll go for customizing the cs.xml. Ideal would be writing a script that goes through the Unity Scripting API and generates the xml file. For me this topic can be closed.
Kind regards.
from userdefinedlanguages.
Related Issues (20)
- https://github.com/notepad-plus-plus/userDefinedLanguages HOT 7
- Language Menu too long HOT 3
- Spelling error "deliminer" HOT 3
- Convert old UDLs to 2.1 syntax
- Add: Zig UDL
- An alternate autocomplete xsd file to validate autocomplete files. HOT 18
- Koltin HOT 1
- Missing UDL file- RenderMan-RSL_by-focus_gfx.xml HOT 2
- the Delimiters didn't work right with sequence of six like this one: "`0"` HOT 1
- Bad display of cue syntax HOT 1
- No UDL for PO files (Portable Object)
- Rules & Checks: Display Name HOT 1
- add functionList\
- Looking for help to define column-oriented languages HOT 3
- rename autoCompletions to autoCompletion
- Add Unit Tests for functionList submissions to the UDL Repo HOT 5
- udl-list.md generator HOT 1
- How do I delete an issue created by mistake? HOT 1
- Need to check reverse direction from AC/FL back to JSON
- Now User Defined Language Directory HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from userdefinedlanguages.