In other editors (Visual Studio Code and Netbeans which I mostly use), I can enable word wrap. Lines will then be split (visually) over multiple lines if the line is longer that the view area.
How can the same be enabled in IntelliJ (Community)? Right now I can't get any kind of word wrap (coding Kotlin).
The feature is called Soft-wrap. You can configure it here:
Related
One feature I've found really useful in Sublime Text is the ability to fold HTML tag attributes. Is there a way to do this with VSCode that I'm missing?
I don't think there's a built-in way to do this. Also, it seems the extension API currently doesn't have a way of hiding characters, see this open feature request (except for a hack mentioned by the second comment).
Extensions also can't customize the built-in folding yet, see #3422.
To fold individual attributes just move your mouse pointer to the left of the editor, in the empty space on the right of the line numbers. Small - icons will appear. Click on the ones you want to fold items.
Keyboard shortcut is CTRL+SHIFT+].
You can get the full list of key bindings there: https://code.visualstudio.com/docs/getstarted/keybindings
so i just spent some time fussing over why my String.split call in scala failed - i was trying to split on a tab.
Problem wasn't what i was doing, but rather the fact that intelliJ changes tabs to spaces. Fair enough, but can i tell intelliJ to not do that for some files - like say random text files I might be using for test/learning purposes?
First, I would turn on Settings > Editor > Appearance > Show whitespaces, that way you're SURE what white space characters are there.
Next, under Settings > Code Style > General there should be a Use tab character check box. This says "use tabs for anything that's not Java, Scala, HTML, etc.". Just make sure Java, Scala*, etc. Use tab character setting is set to what you want.
Unfortunately, I don't know of any way to be more fine grained with what file types do and do not use tabs vs. spaces.
*I'm assuming the IntelliJ Scala plugin adds a tab in Settings > Code Style.
Is there a text editor that will let me shade certain code blocks with specific colors so I can easily find them later? Bookmarks are great, but I also wanted to shade with the same color all code blocks which are somehow related to each other.
and
When my current text editors autocreate curly braces or parentheses for me and I type what I want in between them, are there any that let me either jump to the end of the line to put a semicolon there, or "return" to type the next line, or do I always have to use the arrow key to get out of the curly braces? Perhaps there is a shortcut I'm missing?
I think about every code editor, including Notepad++, has bookmarks. If you're looking for a more complete IDE, it probably depends on the language you're using. For .NET languages that is Visual Studio, but you probably would have known that. For PHP, Javascript and HTML/CSS, you can use Netbeans for PHP. Netbeans is also available for Java. It is a rich editor, and I think one of the best free general purpose IDE's available.
Marking pieces of code in colors is unknown to me. I've never seen an editor that supports this. You would also need a project in which to store the start and end points of these blocks, unless you would save them as comments or so in the file itself.
Visual Studio knows regions which you can define by a start tag and an end tag. You can collapse and unfold an entire region at once, making it quite easy to navigate through larger files.
But these regions are actually part of the code file, so you cannot use this for any file, because those region markers will probably make the file invalid.
I'm still wondering why any other shortcut key would be easier or more convenient than 'arrow down'..
In Visual Studio 2010, when I open a source code file that has a mix of tabs and spaces, a message will appear warning me as such and give me a chance to correct it. Is there such a feature in Eclipse whether native or via plugins?
I have not noticed such a feature, but there are settings you can change so you can detect it yourself. Essentially I show whitespace characters (specifically tabs and spaces). To show whitespace characters:
Preferences > General > Editors > Text Editors > Show whitespace characters
Click on the "whitespace characters" link to modify which whitespaces characters to show.
Then modify your language formatters to enforced tabs over spaces (or vice versa). Then when you format code (Ctrl+Shift+F) it will enforce the convention you set in your formatter. This has the other side effect of formatting the rest of your code, but that might not be a bad thing.
If you want to remove trailing whitespace when you format your code, you can do that by editing your "Clean Up" profile and clicking the "Remove trailing whitespace" option int the "Code Organizing" tab
Admittedly, this is not as nice as Visual Studio's solution and very similar to the answer above, but here's how I resolved this.
Go to Window > Preferences > General > Editors > Text Editors
Check the box "Show whitespace characters"
Click on "Configure Visibility"
Check the boxes under the Leading column for Ideographic space and Tab
Check the boxes under the Trailing column for Space, Ideographic space, and Tab
All other boxes should be unchecked.
"Ok" everything. You may have to reopen existing windows for this to take effect.
If you prefer having your code tabbed instead of using spaces, then you'll slightly modify these instructions to show leading spaces instead of leading tabs. In any case, having this set up as such gives me instant visibility when I have a file that uses tabs instead of spaces or mixed tabs and spaces.
I would not recommend using CTRL+SHIFT+F as it makes for a subversion nightmare when diffing old and new code. Alternatively, simply do a CTRL+F, check the Regex box, replace \t with four spaces. You'll still see a lot of diffs in subversion, but it's easy to pick out that you simply updated the spaces.
It's about IntelliJ's option "Right Click -> Split Horizontally/Vertically".
Is it possible that the split editor window gets a different color scheme (or a background, at least) than the "original" editor? Just for the sake of easier comparing of the code.
Thanks
No, colors & fonts settings affect all the editor windows, you known where to file a feature request =)