https://i.imgur.com/SlQ41BS.jpg
Here is an example. For some reason code is simply not being highlighted using the Lua 5.2 interpreter. Autocomplete doesn't appear to be working correctly either. Also whenever I declare a function it doesn't automatically add a space in the middle and the end at the bottom which I've seen. These would all be immensely helpful starting off. I have never coded before.
I don't see any issue with the highlighting, as the Lua code in your snapshot is highlighted. I'm not sure why auto-complete is not working in your case, but if you type "pr" and don't see "print" and "pairs" offered when Lua 5.2 interpreter is selected, you may want to open a ticket and we'll investigate.
Related
I have started implementing code minings in our plugin. As we try to support older versions of eclipse as well, the initial development platform was 4.19. As this release only provides LineHeaderCodeMining and LineContentCodeMining, I have created my own LineEndCodeMining that places the mining at the end of a given line. It is done by calculating the offset of the last character in the line and placing a LineContentCodeMining there. The feature based on this is quite similar to Gitlens; I display git commit info at the end of the current editor line.
Our text editor code overrides handleCursorPositionChanged() and that method is responsible for adding/removing these line end minings if the cursor moves to another line. At the end of the handler
((ISourceViewerExtension5)getSourceViewer()).updateCodeMinings();
is called to update the minings.
This works well in eclipse 4.19, however updating the minings works weird on recent eclipse versions: many times these line end minings are displayed only if I move the cursor again (even if I move the cursor horizontally, and this case the code mining related code paths like updateCodeMinings() are not called at all).
Just for testing, I have modified my code to place the minings at the character before the last one and that works perfectly. It seems the problem only occurs with content minings placed at the last character of a line.
I have the feeling it is somehow related to introducing LineEndCodeMining in Eclipse 4.23, but it is just a guess.
I would be happy for any pointers.
Extra question: as a workaround I was thinking of using LineEndCodeMining if it is available (eclipse >= 4.23) and use my own code for older versions. I am wondering what is the correct way to check for the availability of LineEndCodeMining; I cannot find any eclipse style IxxxxxExtension interface for this; should I check the Eclipse version itself?
in IDEA ,I can type soutto represent System.out.println();and I want to know how to make my own code abbreviation.For example, alias System.out.print(); to sounor any other names
This is called a Live Template in IntelliJ.
Go to File > Settings > Editor > Live Templates. From there, select Java and on the right, you'll see a plus sign. By clicking it, you'll get a 1. Live Template and that will get you a new abbreviation.
Name it soun and the text should be
System.out.print($END$);
Once you're done, make sure you've enabled that abbreviation by clicking the check box next to it.
The docs of IntelliJ cover in detail what the syntax is for these templates.
The $END$ syntax indicates the position of the cursor when the code snippet is complete, and you can no longer press Tab to jump to the next variable.
There are more variables to look at as well and other configurations to do!
Edit: there is an answer here for this question, but it looks like it doesn't necessarily answer the question asked on that post, so that's why I've decided to post a dedicated answer (tackling the issue at hand).
Sorry for another post like this, I found a LOT of them here asking how to enable auto-completion, but that is not my case.
If I declare a variable and then hit CTRL+Space it works - it will autocomplete it. What I am missing thought is, that is shows a list of the possible solutions while typing - how do I enable that? (They only show after hitting CTRL+Space, is there no feature like in IntelliJ where they show that during typing already?
(Spyder maintainer here) I guess what you are referring to is auto-completion on the fly, i.e. as you write on the Editor or Console.
Unfortunately, it's not possible to enable that right now (August/2018). However, it'll be available (but only for the Editor) in our next major version: Spyder 4, to be released in 2019.
Xcode's desire to complete certain things drives me nuts. If I type "else" and hit return, for example, I want to just end up on the next line after my "else", but instead I accidentally select Xcode's "else" completion and I'm still on the same line, which is literally never what I want. I like code completion in general, it's these ones that effectively replace normal code typing that bother me. Is there a way to disable specific completions in Xcode 6? This question asked basically the same thing (the author was even also bugged by the "else" completion – seriously, Apple, please remove that one), but all of the answers to it are out of date and do not apply to Xcode 6. (I would have just commented on that question, but doing so requires 50 reputation, so I had to start a new question instead, grr.) Xcode 6 has the macro browser thing where you can add new completions, but it does not seem to be possible to disable their built-in completions there. Is there a config file somewhere that can be edited?
The problem that Xcode doesn't have completion snippet for "else" statement. It has only for "if" and "if - else" statements.
I propose to create custom snippet for your goal.
Here is an example how it should look like:
While editing a JavaScript file, the IDE shows highlights on the lines that have problems and displays the lightbulb when you're on one of those lines.
How can I see a live list of all problems found in the current file (e.g. syntax errors)?
The only way I found so far was to manually run inspection and check the inspection window. That's quite cumbersome. Even the "Problems" section of the Project window updates itself automatically as soon as I change the code (even without saving) - but it doesn't display the actual errors (only which files have errors).
Apparently the IDE knows what errors exist in the file - I just can't find a way to see all of them in a list.
In every other IDE I know, it is a built-in, enabled-by-default, feature: eclipse, visual studio, brackets, etc.
Apparently this is an open issue on the IntelliJ family of products. Please upvote that issue if you feel it is missing as well!