syntax-highlighting

Kotlin: Why are most variables underlined in Android Studio and how do I turn that off?

笑着哭i 提交于 2019-12-03 19:15:44
问题 I wanted to know why most variables in Kotlin are underlined. Some files contain a lot of underlining which is very annoying. If I hover my mouse over a variable it doesn't give any information most of the time. But on some it says "This property has a backing field" or "Value captured in a closure". Does anybody know how to disable those underlines? Here is a screenshot with what I mean: And realm is then underlined throughout the entire file. 回答1: It's just Editor Preferences. Edit: This is

Xcode 8 syntax highlighting doesn't work

喜夏-厌秋 提交于 2019-12-03 18:51:24
问题 The code above has correct syntax highlighting in Xcode 7 . It is mix of Obj-C + Swift: I've updated project to support Xcode 8 and only few things was changed: In Build Settings Swift 2.3 support And have fixed few errors related to implicitly unwrapped properties in UIKit After all the project is compiled fine for Xcode 8 . But Obj-C code integrated in Swift doesn't have any syntax highlighting and vice versa: And there is << error type >> problem with autocomplete: Derived data deleting

Highlight debug functions

杀马特。学长 韩版系。学妹 提交于 2019-12-03 18:16:17
问题 I use PhpStorm for a while now, and it's code inspection and syntax highlighting is great! To further extend this feature, I am looking for a way to alert myself of 'debug functions'. I frequently use functions like var_dump() , exit() or echo '<pre>',print($var),'</pre>' . Unfortunately, I also frequently forget these when deploying some code. Is it possible to add custom highlighting in PhpStorm for some defined functions with the Inspection-feature, so I am visually notified that some

Razor @if inside <script> is rejected by VS11

半腔热情 提交于 2019-12-03 18:01:56
问题 Is the following markup incorrect, or is it a bug in the Razor engine in MVC4? Either way, what's the best workaround? The entire content of View1.cshtml is shown. It compiles fine, but the Intellisense error highlighting is annoying. (Included as an image so you can see how the syntax is rejected by VS11.) Hote that the @: syntax (instead of <text></text> ) isn't accepted either. 回答1: It's a little tricky to mix JavaScript with Razor. Personally, I find it easier to always separate these two

User-defined language not applying to specified file types in Notepad++

不打扰是莪最后的温柔 提交于 2019-12-03 17:33:36
问题 I have created a fairly simple user-defined language in Notepad++, and given it an associated extension. But, when I open files I have named with that extension, nothing happens. No syntax highlighting, or comment highlighting. Any idea what I have done wrong? The settings for the extension do not have a leading "." , as specified in the Notepad++ docs. 回答1: This has been fixed, so I guess the whole question could be closed or deleted. I'm not sure in which version they fixed it, but in the

Syntax-highlight Python in a vim fold line

a 夏天 提交于 2019-12-03 17:11:47
问题 I have found that code-folding helps me organize my files better. Thus, at the bottom of my ~/.vimrc , I enable vim code folding by default: ""Folding set foldmethod=indent set foldnestmax=2 nnoremap <space> za vnoremap <space> zf "set nofoldenable "set this to disable folding on file open This has the advantages of using SPACE to toggle folds at the cursor, or if they start to annoy me I can use z R to unfold everything. However, I'm also addicted to syntax highlighting. I use Dmitry

Git - Do colours mean something in vi when I commit?

旧巷老猫 提交于 2019-12-03 14:41:32
问题 I'm using Git Bash on Windows and, when I run git commit , the vi editor opens to allow me writing a Commit note. I noticed that the first row of the text I write is yellow (although not all of it, only the first 30 or 40 characters), the second is white on a red background and from the 3rd onwards they are gray. Does this colour coding mean anything, or is it just some sort of weird glitch? I come from an SVN background, where Commit comment was pure text and I wasn't expecting this "rainbow

Visual Studio: Custom code highlighting based on regex

对着背影说爱祢 提交于 2019-12-03 14:26:34
As my application supports some paranoid debug level (every data assignment, every step in the code is written to a log destination), my code is littered with logging calls in some methods, e.g. logger.Log(LogLevel.Debug, 0, "Initializing i18n..."); Lang.Language = SystemInfo.Language; Logger.Log(LogLevel.Debug, 0, "Default system language: " + Lang.Language); string[] languageFiles = Directory.GetFiles(ClientEnvironment.LanguagePath); Logger.Log(LogLevel.Debug, 0, "Initializing local language files..."); As you can see, there are only two "real" code lines. This makes the code somewhat hard

Matrix multiplication - view/projection, world/projection, etc

拜拜、爱过 提交于 2019-12-03 13:48:19
问题 In HLSL there's a lot of matrix multiplication and while I understand how and where to use them I'm not sure about how they are derived or what their actual goals are. So I was wondering if there was a resource online that explains this, I'm particularly curious about what is the purpose behind multiplying a world matrix by a view matrix and a world+view matrix by a projection matrix. 回答1: You can get some info, from a mathematical viewpoint, on this wikipedia article or on msdn. Essentially,

Text editor with syntax highlighting and line numbers?

那年仲夏 提交于 2019-12-03 13:36:12
问题 This is a bit challenging even probably for a team project, let alone for a one-man implementation, but I was trying to put together a simple yet elegant text editor with syntax highlighting, using a JEditorPane . I stumbled upon this which was discontinued and really hard for me to understand with all the lexer files and .lex stuff inside. I even found in some blog that this project was later taken on by some other team but even yet again discontinued. I don't need it to be too fancy, like