How to detect file changed by myself in IntelliJ IDEA - intellij-idea

Is it possible in Intellij to mark edited file tabs with a star (*) so that I can see which files I have changed.

By default, Intellij automatically saves your edits every few seconds, and every time it looses focus. So, most of the time your files are not in a changed state, so no icon is needed. However, under Settings, IDE Settings, Editor, Editor Tabs, there is an option to Mark modified tabs with asterisk, which will enable the feature you want.

Related

IntelliJ IDEA current file tab closes on opening a different file

Every time I open a new file (single click), the existing file closes by itself. It started happening in the latest version. How do I fix this?
In the Project tool window, click the three vertical dots and uncheck Enable Preview Tab option (which is on by default)

IntelliJ IDEA reload file from disk on type

I have used Emacs a lot, and in Emacs when you try to edit a file which has been modified on disk, it disallows it, prompts that the file has changed, and asks you what you want to do about it.
In IntelliJ, if a file has changed on disk, I can type forever. This just happened to me: I wrote a 20 line function, and tried to save. Then IntelliJ prompted that the file had changed. I had the option of overriding my changes with the data on disk, or to corrupt the whole file by keeping the current data. I wanted to just copy my function and reload, but I couldn't even do that because the popup had the focus. I there isn't even a button to cancel the save. I pressed Escape and prayed that my change would be overwritten. What a nightmare...
Is there any way to make IntelliJ prompt on the first character typed? I really don't want to synchronize the whole project every time I start to edit a file a switch git branch.
Preferences > Appearance & Behavior > System Settings
Under the heading 'Synchronization', enable the property 'Synchronize files on frame or editor tab activation'.

IntelliJ keeps folding my code by default

When I open up any code file .java or .html IntelliJ (12.x) keeps the code folded and I always have to expand everything.
How do I make code expand by default?
In the preferences (ctrl+alt+s on my machine), under Editor, you will find an entry called Code Folding. In there you can choose what's folded by default. In your case, you'll probably want to remove all the defaults.

IntelliJ IDEA 13.1.2 javadoc and tabs

I hate to ask such simple questions, but nothing I found so far helped me...
So, I've recently started using IntelliJ instead of Eclipse and there are 2 things that really bothers me...
1.) size of javadoc popup window - ok, so I finally get this little guy to pop-up whenever I need it, but it's so small I have to use scroll every single time... and that's pretty anoying when I'm working with unknown libraries...
2.) tabs == spaces - maybe some of you like this, but I don't... Eclipse was treating tabs as tabs and not spaces... I tried to change settings but with no result... or is that maybe connected with project I'm working on? (meaning, if, at the start of a project, setting were such that tabs == spaces and now changes are not applied to it)
Sorry for stupid question but, as I said, nothing I found so far helped me...
1) Just resize the window with your mouse. It will retain the size the next time it opens. You can also click on the gear icon in the upper right corner and adjust the font size. Again, it will retain the size on subsequent use.
2) I'm assuming you make the change to the "Use Tab Character" option on the "Tabs and Indents" tab for all file types and saved the Code Style. After that, you need to run the Reformat Code action (Ctrl+Alt+L or Code > Reformat Code from the menu or Reformat Code from the context menu (i.e. right-click) in The Project Tool window or Navigation Bar). IDEA retains the previous formatting (so spaces in this case) until you run a reformat on the project (or a part of it).
If you have multiple projects already created, for each one, you will need to go into File > Settings > [Project Settings] > Code Style and set the Scheme (and then do a reformat). While the Scheme definition is saved IDE wide, the scheme to use is set per project (which makes sense since an Apache Open Source project you are working on may have different code style requirements than the projects you do at work vs the ones you do for fun).
Finally, you will also want to go into File > Other Settings > Default Settings > [Template Project Settings] > Code Style and make sure your saved code style scheme (with the use tab option) is set so that new projects use that scheme when they are created.

IntelliJ - not asking if I want to save a file

I'm new to the IntelliJ IDE. In the past I was working with Visual Studio or Eclipse.
In those IDEs there was an asterisk * above the name of the file which has been modified.
But in IntelliJ with the default configuration I can't see if the file is modified. What's more the file is saved automatically when I change focus to another window.
I've found some options under Settings -> IDE Settings -> General -> Synchronization:
Synchronize files on frame activation
Save files on frame deactivation
Save files automatically if application is idle for...
After unchecking all that options the file is not saved automatically every time I change focus to another window, which is good. But still I can't:
see if the file is modified (no asterisk)
decide if the file should be saved when I'm closing it (IDE doesn't ask for that)
And when I'm closing IntelliJ file which has been modified is saved without even noticing.
Do you know what can I do to change how IntelliJ behaves?
After unchecking mentioned options go to:
Settings/Editor(IDE Settings)/Editor Tabs:
Check "Mark modified tabs with asterisk"
On 2019.3 Ultimate it's under:
Settings/Editor/General/Editor Tabs:
Mark modified (*)
The exact Save feature like eclipse is not available in IntelliJ.
Because IntelliJ IDEA has the ability to change so many files
simultaneously in large refactoring actions, and change them without
ever opening them, single file saves don't make very much sense. In
recognition of this, IntelliJ IDEA reserves the right to save any of
your files literally whenever it wishes. It's actually quite nice to
never have to worry about your file's save statuses, once you get used
to it.
"What if I don't like some changes I made, and want to roll them
back?", I hear you say. Well, for that IntelliJ IDEA includes this
amazing feature called the Local History. Every time it saves your
files, IntelliJ IDEA actually saves a diff of your file from it's
previous state, and saves that as well. You can see the entire edit
history of your files (going back some number of days), see the
changes you've made, and roll back any change. It rules triumphantly,
and more than makes up for the temporary disorientation caused by lack
of single-file save.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206336279/comments/207351939
To show an asterisk when a file is modified: open Settings (CTRL+ALT+S), switch to Editor > General > Editor Tabs and select the Mark modified tab with asterisk checkbox.
To remove autosave, uncheck: Appearance & Behavior > System Settings > Save files on frame deactivation