File Edit Archive In Sublime Text 2 - sublimetext2

a few days ago, I wrote a code and then saved this file. Day by day, I edited this file. And now, I need the first variant of my code, which I made a few days ago. But I can't remember the first variant of my code. My question: Is there any chance to get the first variant of code in Sublime Text or another program?

Have you kept your editor open this whole time?
Yes → Hold down Ctrl+Z.
No ↓
Are you using Dropbox (or any similar service) or Windows with file history turned on, or have regular automatic backups that happened to take place between then and now?
Yes → Try that
No → Learn from your mistake and use version control next time, all the time.

Related

Disabling notifications in PHP Storm 9

I am using PHPStorm 9.
I have installed PHPCS to sniff my code. It is properly configured, up and running.
I am working on a very old project, which was implemented in plain PHP, and not using any code standard.
As a result, every time I open any of those files, I get a message at the top of the screen saying that I have too many errors (code style errors).
I have a couple of problems with that.
First, I already know how bad the code is, so I don't need PHP Storm to tell me that all the time.
Second. That message appears and disappears every time I edit the code. As a result, the window editor is constantly moving up and down, which I find specially annoying.
Also, at the top of the screen it is showing me the breadcrumbs, to tell me where I am. I appreciate the help, but I don't actually need it.
So the question is, how can I configure the IDE to disable those two messages? (read arrow and orange arrow in the attached image).
Please notice that I don't want to disable PHPCS. I only want to turn off those annoying messages.
I was unable to find it out by myself because I don't even know how those messages are called. Certainly not 'popups', nor 'status bar'
Best regards
Nicolas
Answering my own questions, thanks to the help of the PHPStorm Support team, Vladimir Luchansky (perhaps you need to create an account to see the thread):
To disable breadcrumbs: Go to File->Settings->Editor->General->Appearance, and untick the option Show HTML Breadcrumbs. Then restart the IDE
To disable the PHPCS messages without disabling PHPCS itself: Well, that option is not available in PHPStorm 9. It will be available for a future release. According to Vladimir, a developer is working on it. In order to make this request to go up in the future request list, the request needs to get as much 'votes' as possible. So, if you are interested in this feature to be ready ASAP, please vote up here.
Best,
Nicolas
I don't believe there's any mechanism for suppressing those phpcs: Too many messages per file alerts. As an alternative solution, you could give this work-around a try:
Clone your current inspection profile via Preferences > Editor > Inspections. Name the new one "Strict (with phpcs)". Then, choose your old inspection profile from the Profile: dropdown box (thus, reverting your project's default inspection profile to your old one). Rename it to "Weak (without phpcs)" and disable phpcs for that particular profile by unchecking the PHP > PHP Code Sniffer validation option.
From this point forward, phpcs inspections (and related alerts, like the one you're concerned about) won't come into play as you're editing your files. However, whenever you do want to inspect one of your files using PHP Code Sniffer, you can do so easily via Code > Inspect Code > Inspection Profile > Strict (with phpcs)
Hope this helps!

Is there a way to save just one file in PhpStorm?

My traditional workflow must be a little different to the PHPStorm default. I often work on multiple files at the same time and want to be able to save just one file when I've finished with it, without saving the others that I've modified.
I've managed to turn off the auto-save feature. Now, when I edit files I get stars on the ones I've edited and they stay like that until I hit 'save'. So far so good.
But when press CTRL-S to save, expecting it to save the one file I'm looking at so I can go back to the ones with asterisks to polish them off too, it also saves ALL the other files too.
I hope there's some way to change this behaviour or set up something to allow me to save just one file at a time!
Yes, you can .. but that still does not change a lot (e.g if you change your settings, or run/re-run something -- all files will be saved automatically anyway). Eventually (after few weeks or month of adaptation) you will get used to this behaviour and quite likely will love it (yes, this means changing working habits a bit, which is quite hard to do (requires time) for some people/in some cases).
Anyway ... to enable "save single file" functionality:
Settings | Keymap
On that screen, in search box type "save"
The action you are after is called "Other | Save Document"
Assign whatever shortcut you want.
P.S.
This action will NOT ask for confirmation (same behaviour as standard save does).
P.P.S.
This action is available since PhpStorm v7 ONLY.

Sublime Text 2 Slowness with Emmet

I recently installed Emmet on sublime text 2 and since then I have been noticing a lot of slowness when working with large files.
One file I am working with has 1500 lines and whenever I hit "tab" after typing an html/tag short cut Sublime Text 2 becomes unresponsive for about 10-15 seconds...
When I work with smaller files, this is not an issue at all. When I uninstall Emmet/PyV8 performance on the larger files returns to normal.
I have searched here and other forums and haven't found much on subject but was wondering if there some other plugin/setting I'm missing?
Thanks in advance.
I've just spent a while this morning trying to revive my installation which becomes slow after a period of time.
I eventually succeeded by reverting to a fresh state, renaming (moving) the data folder. The packages you have downloaded can be copied across from the renamed old data folder - don't forget package manager.
A little cross-testing seems to indicate that the culprits were the session file in Settings and the project files themselves, so create new project files.
Sometimes ST2 slows down because the Data/Settings/Settigs.sublime_session gets too big to handle, take a backup of that file and remove it, sublime will recreate it and it will be like 2kb or something ( the new one) Sometimes the session file gets too big, it stores recently accesssed files, find history, replace history etc. etc. you can take a look at it, its a text file.
all the best.

php storm move statement up down configuration

I'm using php storm on a mac.
To move a selection up or down (move statement up/down), the shortcut is cmd + up/down.
If you press this shortcut multiple times that's fine.
But sometimes you just want to hold the shortcut down and see the selection going up or down.
(It saves you from typing the shorcut multiple times).
The problem I founded is that in this case where you hold the shortcut down : there is too much time
between the moment where you push the shortcut and the moment where php storm understood that you want a "holding shortcut" operation.
Is there a setting to customize this time please ?
I didn't find it.

Prevent PhpStorm from automatically saving files on close

When I close a file in PhpStorm, it saves the file automatically.
How can I change it to ask me "Do you want do save the file before closing?"
Autosave settings are under File | Settings | General.
http://www.jetbrains.com/phpstorm/webhelp/saving-and-reverting-changes.html
While autosaving is handy for local, non-vital projects, this can be disastrous in a live project, where every change needs to be checked first.
Update: In recent versions, they have been moved to File | Settings | Appearance and Behavior | System Settings | Synchronization
There is no way to disable automatic save completely, but you can partially control this behavior:
Note that those are optional autosave triggers, and you cannot turn off autosave completely.
The answer below from #Owen is not correct, since there is no way to completely turn off automatic save in the IDE.
Automatic save is the core design feature, we believe that it's much more efficient and productive than manual save. There is no way to disable this behavior or enable any confirmations, quoting the FAQ (WebStorm is based on IntelliJ IDEA platform, so the same applies):
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
configurable 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.
This feature has been in IntelliJ IDEA for a decade, and now even Apple has recognized that it's better than manual saving and implemented it in Mac OS Lion.
Just my two cents to a similar issue:
I had PhpStorm seemingly auto-save on every keypress, which was making my live reload go mad. Turns out, I had checked Recompile on changes under Settings -> Languages & Frameworks -> TypeScript.
Hope this can help someone.