I do simple web page, based on HTML and CSS in editor Sublime Text. I overwided my index.html with another by mistake (drag and drop at wrong file). I have no time to write whole content of the page again. Is there any possibility to "take a look" at history in Sublime Text? My OS is Windows 7. I didnt do any backup.
In pure sublime I do not know of any possibility to recover
overwritten files.
But there are backup extensions that might save you from the same issue in the future:
AutoBackups by Avtandil Kikabidze aka LONGMAN 22 k Installs:
Sublime Text 2/3 Auto backups plugin
BuffersBackup by lewisjosh 627 Installs:
A Sublime Text 2 plugin for backing up all open files/buffers on an periodic basis.
Automatic Backups by joelpt 10K Installs:
Automatic backups with historical navigation for Sublime Text.
Create Backup Copy by glutanimate ST3 1K Installs:
Sublime Text plugin that creates time-stamped backup copies of files
Local History by vishr 62K Installs:
A Sublime Text 2/3 plugin for maintaining local history of files. [backup | open | compare | incremental diff]
Veeam Logs Helper by yandexx ST3 217 Installs:
Veeam Backup & Replication logs syntax highlighting for Sublime Text
Related
I have some troubles with Github:
When I am pushing my Xcode project to github, it seems that it won't push all files regarding the pods and app extensions because when I pull the project down on my other mac, I get a whole lot of errors that is not there on the original file.
Thanks in advance!
After a lot of testing I found the answer. When I used the command lines in terminal for pushing the project to Github, instead of the shortcuts in Xcode, I saw that this files were not "added" to the committing (I checked this by typing: git status). Then all I had to do was to write in Terminal: git add -A to add all the files. I committed and pushed them to Github, and now everything is working fine!
Thanks for all the help I got!
As shallowThought is suggesting, extend your question with your .gitignore file, so we can identify the lines that are likely preventing git from tracking the pods and extensions.
If you are unsure how to find and copy this .gitignore file, do the following:
In Xcode, on the left open the Project Navigator (folder icon) & select your project (usually the top item in the list).
From the File Menu, choose Show in Finder.
Finder will open with <your-project>.xcodeproj selected. If you don't see the folder that contains <your-project>.xcodeproj, press ⌘ 3 to tell Finder to View as Columns.
De-select <your-project>.xcodeproj and instead drag the folder that contains it onto the Terminal icon (usually in the bottom of the screen). If Terminal was not there, first start Terminal; e.g. by pressing ⌘ Space and typing Terminal.
Now, Terminal is showing the commandline in the same place where your .gitignore file usually is—technically it can be in any subfolder.
Type pbcopy < .gitignore followed by Enter to copy the contents of the file in your clipboard.
… now post the contents in your question.
Another way to check if indeed git is not tracking your desired files is opening Terminal, and running the following command (from this answer): git ls-tree -r HEAD --name-only
If Git is not tracking the files that you require, they will not be in the list.
If you want to solve this yourself, your best bet is to remove the line from the .gitignore file that is preventing Pods etc. to be tracked. So, you're are actually doing the opposite of this SO answer ;-)
In step 3. type open -a "TextEdit" .gitignore followed by Enter to open the file.
Then remove the line(s) that you don't want ignored. Save. Now you can add/commit/push the files to GitHub.
I have been using TextMate version 2 for MAC from quite some time now, but suddenly yesterday in my code files I am seeing a <CR> tag.
Not sure what the issue is. After doing some googling around I found that it is supposed to be a INVISIBLE character.
But now how do I remove it, can any one suggest any ideas?
Thanks.
Textmate files are set with one of three options..
CR(e.g. Carriage Return or \r) line endings.
LF (e.g. Line Feed or \n)
CRLF (e.g. Carriage Return Line Feed or \r\n)
If a file has inconsistent line endings, Textmate will treat \n as a line ending marker and display <CR> as text.
The issue is caused by a corrupt Launch Services database and can be fixed by running the following command in Terminal and resetting Finder.
sudo /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder
lsregister: [OPTIONS] [-domain { system | local | user | network }]... [path]...
Search the paths for application bundles and add each found item to the Launch
Services database. For domain specifications, ask CF for the list of application
locations in the given domain(s).
-kill Reset the global Launch Services database before doing anything else
-lint Print information about plist errors while registering bundles
-convert Register apps found in older LS database files
-load Load the LaunchServices service plugin if it's not already loaded.
-lazy n Sleep for n seconds before registering apps if the local cache
is aleady populated.
-r Recursively register directory contents, do not recurse into
packages or invisible directories.
-R Recursively register directory contents, including the contents
of packages and invisible directories.
-f force-update registration info even if mod date is unchanged
-v Display progress information.
-dump Display full database contents after registration.
-h Display this help.
Open the file with TextMate, select one <CR>, copy it. Open the "Find" dialogue with the "Regular Expression" option activated. Paste the <CR>, and replace them all with an empty string.
I'm using Sublime text, and I'm sharing some snippets with coworkers. I would like to be abble to directly make sublime text go to this folder to find the snippets.
Do you know any good ways of doing it ?
create a share folder with your team (say /mnt/shared/snippets)
symlink that folder to your Sublime folder
ln -s /mnt/shared/snippets "~/Library/Application Support/Sublime Text 3/User/"
restart Sublime and it should pick up the snippets
I've got a problem with Sublime Text 2 in that when I start it it automatically tries to load a file that leads it to crash.
I can see that there are ways of changing the settings once it's loaded - how do I fix it when it won't finish start-up?
I'm running on Mac OSX (Mavericks).
For Sublime 3
on Mac, Auto Save session exists in this path
~/Library/Application Support/Sublime Text 3/Local. Just go to this path delete all the files. Sublime will start working fresh.
On Linux, Auto Save session exists in /home/<USER>/.config/sublime-text-3/Local. Delete all the files you'll be good to go fresh.
On Windows the path is %APPDATA%\Sublime Text 3\Local
You can try hunting around for the file causing the error. However, I'd recommend reverting your install (link) though rather than deleting, I'd just move it somewhere temporarily. Be sure to move your User folder out. After reverting, move the User folder back. If you used package control, it will grab all of the installed plugins again. If you didn't you will need to move those back manually. If it's a particular file that's causing issues (not a plugin) then you could also edit the Session file. It's a bit more involved but can be found in Application Support/Sublime Text 2/Settings.
If you could post the file causing the issue, we could probably tell you how to fix put it back into a working state. If it's a settings file, it might be as simple as malformed json. I'm unsure though as you didn't give much detail on the actual error.
So, I deleted both the Session.sublime_session and the Auto Save Session.sublime_session in the Settings folder and that allowed me to get it to run and not crash on startup.
Delete Session.sublime_session from ~/Library/Application Support/Sublime Text 3/Local.
rm ~/Library/Application\ Support/Sublime\ Text\ 3/Local/Session.sublime_session
Also:
Please don't delete all content in the ~/Library/Application Support/Sublime Text 3/Local folder as this will also delete your Licence. #kushdilip (Tried to add this as a comment to your post but didn't have enough reputation to do so.)
I would recommend using another text editor (such as using vim in the terminal) to view/edit the files in:
~/Library/Application Support/Sublime Text 2/Packages/Default/Preferences.sublime-settings
There are two other directories, but Default is probably where you want to start.
~/Library/Application Support/Sublime Text 2/Packages/User/Preferences.sublime-settings
~/Library/Application Support/Sublime Text 2/Packages/Vintage/Preferences.sublime-settings
(Make a backup before changing any files around!)
For subline text 2 on my Mac:
There is no directory named Local under ~/Library/Application Support/Sublime Text 2/, but there is strange hidden file .DS_Store, I remove it and sublime text don't crash anymore!
$ rm .DS_Store
I am using Oracle 11g. When I open a new SQL file writing the command
ed filename.sql
A new file is created in my bin folder with the name as filename but, I want them to be in separate folders for my convenience. I am developing 3 application(well for my practice only). I want them to store in different folders for each project. I tried all of the following none of them worked please tell me how can I save the files into specific folders.
ed erp/logindetails.sql
ed 'erp/logindetails.sql'
ed "erp/logindetails.sql"
ed 'erp\logindetails.sql'
ed erp\logindetails.sql
These commands except where I used "" worked and opened the default text editor with the name afiedt.buf which I am getting when I enter only edit. No files are created with any of the above command.
You're giving EDIT a relative path to the file; since your current working directory seems to be the bin directory that the SQL*Plus directory is in (is this Windows, and are you running a shortcut that sets the working directory, maybe?) it will try to create a file like %ORACLE_HOME%\bin\erp\logindetails.sql, and you're unlikely to have created an erp directory there. Giving the full path to the directory will work:
edit c:\users\dibya\projects\erp\logindetails.sql
for example.
As noted in the documentation, EDIT will search for existing files, but that involves setting an environment variable - which you'd have to change as you move between the projects. You might find it easier to edit the files in the OS and just run them from SQL*Plus.
You might also be able to use separate shortcuts to launch SQL*Plus for each project, each setting the 'start in' directory to a project-specific location - then just edit logindetails.sql would be looking in the right place by default. Or, from a command prompt cd into the relevant project-specific directory and launch SQL*Plus from there, which is effectively what a shortcut would do.