How to exit from "Edit as Table" mode in PhpStorm? - intellij-idea

When editing a CSV file in PhpStorm, I enabled "Edit as Table" and can not find how to close this mode. I do not know how to close the "Data" tab.
Help me please!
Linux Mint, Phpstorm v.2018.1.6

The "Edit as Table" creates a split pane. Assuming you dont have any other panes open, you can close them all by:
ctrl+shift+a
Search for Unsplit all
Ta-da
While still destructive (if you use multiple panes), it doesnt go full scorched earth policy like #jocull recommends.

I had a similar issue in WebStorm and reached this thread. After painful searching I found these buttons to toggle between views in the bottom left:

I looked all over but couldn't find a way to do this. In the end it was bugging me so much that I just dropped the Jetbrains/IntelliJ project files and recreated them. This is a very heavy hammer for this problem.
If you have a Git repository this is usually as simple as...
Close your project if it is open
git clean -idx and select the project files to remove (carefully, if you have stuff you don't want to clean out! this deletes things!)
Reopen the project and let it regenerate the project files from scratch
Tada! No more table editor mode. You may lose debugging profiles or other project specific settings, and YYMV :)

Related

In Intellij IDEA how do I reload file content's from disk?

In vim I can type :e and reload a file's contents from disk overwriting any changes I've made. It's a nice way to reset in case I've gotten lost or just want to undo all my changes. This obviously doesn't take into account any kind of refactoring, I just want to nuke all changes to buffer. Not even closing and reopening a tab will work.
How do I do this with Intellij IDEA? I'm using Intellij IDEA Ultimate 13 and I've disabled any kind of auto save.
File > Synchronize (Ctrl+Alt+Y)
It will load the file from the file system. If you have unsaved changes, it will ask if you want to discard them.
⌥⌘Y - Synchronize for Mac users
What I do in a similar situation:
Simple - Ctrl+Z, Ctrl+Shift+Z many times to quickly navigate the editing history
VCS rollback - either for the whole file or for the area being edited (by clicking green areas on the left)
Local History. Well, yes, for you case it's granularity is not sufficient, so first might be an option
There is also an option to put a label into Local History if you need to rollback to a specific point in time.
For those who use autosave - it is being triggered when code editor loses focus. So doing Alt-Tab during long editing without compiling or running the code makes sense.
Open the file in another editor, make an insignificant change and save it. PHPStorm will ask you what to do because the file system and in memory copies of the file have diverged. Click "Load File System Changes".
Note, I was unable to use my undo history as it had become corrupt.
Since what I want isn't really possible I wrote an extension to do it for me:
https://github.com/btipling/DiskRead/
I'll add it to the Jetbrains plugin repository, it's called "DiskRead".
I wrote a blog post about how I created this if anyone is curious.

Save Aptana Studio 3 project explorer state on close

I'm sure there is a simple option for this but I have as yet been unable to find it. Every time I close and reopen Aptana Studio 3 it collapses all the folders in the project explorer and I have to reopen them all, is there a way to get it to leave them open and save the project explorer's state when I close the program?
Thanks.
I cannot find any way to keep the state of the Project Explorer. However, using the App Explorer, the state of your open folder will be preserved. You can also try the "Navigator" which looks just like the Project Explorer, but appears to keep state. I will add the proviso to that: It kept state when I restarted aptana, but it also developed a GUI glitch where it appears to be scrolled to the right so I only see the right half of all of my file names and I cannot fix it, so this may not be a good option if you get the same glitch.
There is also a method which does not do quite what you ask, but may be a good fix for you anyway. If you click "Link with Editor" picture (two yellow arrows) in the Project Editor, it will automatically expand your project hierarchy to match whichever open file you have active. Since your files stay open when you close Aptana, this would keep the Project Explorer expanded to whatever you are looking at even on restart. See this question
You can also set up working sets for various parts of your code that are buried in the hierarchy and use the Project Explorer to show those working sets instead of you projects. This does not save state, but it does give you easy access to common parts of your code that may be deeply buried.
Hope one of these helps you.

How to delete projects in IntelliJ 12?

I created some dummy projects. Now I don't see any way to delete the projects that I don't want. Per this suggestion I can delete files, the project is going away but there is traces of it still available. For example, on the Recent Projects you can still see the name of the project you just deleted. So I am thinking there should be another (and really easy way) to delete a project.
Press the Del (or fn and delete) key to delete a project from the Recent Projects list.
Vote for this issue to make it more obvious and user friendly.
close project first, or until this dialog appear, then hover your mouse on project you want to delete from history, then press Del
you'll be asked for confirmation
On occasion, even with deletion of the project, some tidbits are left behind in the following Windows paths:
C:\Users\username.domain\.IntelliJIdea2017.1\system\compiler
C:\Users\username.domain\.IntelliJIdea2017.1\system\compile-server
C:\Users\username.domain\.IntelliJIdea2017.1\system\frameworks\detection
C:\Users\username.domain\.IntelliJIdea2017.1\system\conversion
C:\Users\username.domain\.IntelliJIdea2017.1\config\componentVersions
C:\Users\username.domain\.IntelliJIdea2017.1\config\tasks
This has been proven to be problematic - for example, if a new project is created using a previously deleted project name, it will create the project with data stored in the above paths, at least, this has been my experience.
The only way to TRULY delete the project is to get rid of all the garbage left behind in the aforementioned folders. I would suggest using Search Everything to find more tidbits left in the users temp folders.
In case your project is imported as a module, you can also go to File --> Project Structure and click 'Modules' in the left section. Now you can hit the minus button to remote the module from the project.
You can also click File -> Open project ...
When a file menu appears, you can right click the unwanted project folder and select Delete.
Just figured, I am using Idea Community edition 13.1.1 and the cleanest and easiest way is to go to File > Reopen project > Clear List. I just stumbled upon this menu today. I always thought that is just to clear the latest projects from the view inside the IDE and just realized it is clearing the projects from the main Dialog too.
-VRS
Also, in IDEA 13.x.x you can go File-> Close Project and you'll land in the window with Recent Projects tab. There pressing Del of Fn + Del on selected project helps .
On OSX Mountain Lion and IDEA 14, with the project open and focused, you can go to file -> close project, then delete the project from your filesystem. This removed all references to the project.
Note that if the project you are deleting is the only project open, closing it will show the welcome dialog, which will still show the project. Deleting the project manually from within your operating system is the next step, and the project will still appear in the welcome dialog until it is closed and shown again, usually by opening another project from the list, or quitting and restarting IDEA.
In my case, I had to delete home/.IntelliJIdea2017.2/config/options/recentProjects.xml
. In my file system (Ubuntu) this file appeared for some weird reason not writable and hold a list of projects I couldn't get rid of. Deleting this file and restarting will force Intellij IDEA to create a new one with an empty list of projects.
All you have to do is go to file - close project - to avoid seeing them again in the menu list and then you delete them from the projects directory.

Submit Eclipse Project on Perforce

I have a noob Perforce question. I got my perforce plug-in on Eclipse working(for both Java and C).
I have no problems "opening" my perforce stored projects on Eclipse.
Scenario 1:
Whenever I want to change code, I open the project on Eclipse and right-click on it and go to "team" and check out, make changes and then submit. Works fine. But even after that I see a tick mark(indicating check-out) on my perforce screen.
Scenario 2:
I just open perforce code as Eclipse project and make changes(If read only, it prompts and asks if i have to allow write and I say yes). I make changes and save. It doesnt ask for submit. Also if I now open the code on Perforce screen, I already see the new changes made.
Scenario 3:
Just on a Perforce screen, if I check a file out and don't make any changes, I obviously dont want to submit as there are no changes. In this case, how can i "disable" check-out so that my fellow programmers dont think i'm working on it??
Scenario3:
So here are 2 ways i consider a good usage of the plugin:
Use Revert Unchanged Files:
Before you begin development of a feature, checkout the entire tree/branch that your changes will be concentrated around in future. You can do this by right-click the relevant package in package explorer. Once you want to submit, Project->Right-click->Team->Revert Unchanged Files. Now, you can submit your changelist.
This approach stands very useful if you know you will be editing a lot of files or replacing files.
Ofcourse, others can see that you have checked out the files.
Enable Auto checkout:
Incase you are going to make few changes, you should enable autocheckout. This will checkout the file when you begin to make edits. Eclipse->Preferences->Team->Perforce->Enable support for workbench edit..
detailed explainations here. Its a good idea to have this enabled always as it checks out on demand.
However, this does not monitor the filesystem so and code/libs you replace outside of eclipse are not checked out.
For Scenario 3, you can change a workspace option to prevent submitting unchanged files:
SubmitOptions: reverttunchanged
If you have a file checked out (open for edit), others will be able to see that. I guess I'm not clear on why you check a file out if you don't intend to modify it?
If you are going to setup this way and are also using the desktop client, I recommend the following steps in the desktop client:
1.) Open your desktop Perforce client
2.) Click “Connection” on the global menu
3.) Select “Edit Current Workspace…”
4.) Under the “Advanced” tab select “allwrite”
5.) Click Apply, then OK

How to open files in Intellij-IDEA with double click?

My first day using this IDE...
is there a way to configure the IDE to open files in the project by double click? It is rather painful having to drag files from the project overview into the editor window.
You can change the KeyMap.
Go to File->Settings and find the keymap section.
You will have to create a new KeyMap by clicking copy, and then look in the View section for "Jump to Source" and change/add the keymap you want.
However, as Bozhidar Batsov noted, double clicking may not always work so well. Whether it works may vary by OS and/or windowing system. I have no trouble with it in Mac OS X, but it doesn't seem to work well in openSUSE.
There are also other predefined keymaps that you can select from this settings screen. They're set up to resemble other IDEs, so you might find them helpful if you're transitioning from something else.
It is easy way to do in windows.
I found a great solution to this problem by Jelmer Kuperus over at Orange11.
Create an .Xresources file in your home directory. Add the following line:
*multiClickTime: 400
Jelmer explains that this setting changes the default double-click speed from 200ms to 400ms, effectively slowing it down. Save the file and then run:
xrdb ~/.Xresources
The effect is immediate, no need to logout or reboot. Double-click in Intellij works as expected. I did try changing the mouse double-click speed in System Settings first before trying this out to see if that made a difference but it did not.
I am using Ubuntu 11.04, Intellij 10.5.2, and Sun JDK 1.6.0_26. YMMV
Use F4 to open quickly the selected files. Btw double clicking on files should work as well(at least in theory). Swing's buggy handling of such events, however, causes the double click to not always work in IDEA, so I eventually stopped double clicking and switched to using F4. You can also use "Autoscroll to source" from the projects menu - this will open the source files as soon as you select them in the project browser.