sublime text 2: view find/search history - sublimetext2

Is there a way to view the find/search history in Sublime Text 2?
In eclipse there is such a feature, see screenshot below. I'd expect something similar in sublime text 2.

It should be the same in ST2, but in ST3 you can put your cursor in the Find (CtrlF/⌘F) search field, and hitting the ­­↑ and ↓ arrow keys should scroll through the search history.

You can also view the entire raw history (of searches, file/folder paths and more)
Open the file Session.sublime-session and search for find_history
On Mac OSX: ~/Library/Application Support/Sublime Text 3/Local/Session.sublime_session
On Windows, I'm not exactly sure but probably something like:
%AppData%\Sublime Text 3\Options\Session.sublime-session

AppData\Roaming\Sublime Text 3\Local\Session.sublime_session

Related

How to use sublime text 2 like notepad++

In Notepad ++ we can use Move to other view for copy/paste attributes easily . But How i use sublime text 2 like two windows at a time for copy/paste attributes easily ?
If I understood your question right you will find the answer by accessing sublime's menu View>Layout>... Columns

Sublime text 2: difference between Sublimerge vs FileDiffs plugins

I want to do some file comparison in Sublime Text 2, I have done a bit of research and found out that:
Sublime text has a built-in diff feature but its features are limited open a folder (Click "File" | "Open Folder..." And choose a folder at a level that contains both files), Sumblime Text 2 will open a new window. Multi-select the two files you want to compare in the sidebar, then right-click and choose "Diff Files...". see quora.com/Sublime-Text/Can-you-compare-files-code-within-Sublime-Text-2
There are 2 good plugins that do the job: Sublimerge and FileDiffs
However I could not find a clear explanation of the differences between them. I suspect that rather that one beeing better than an other, one would fit one type of usage more than another, but I may be wrong.
Thanks in advance
Sublimerge has the ability to ignore whitespaces and caps and generally is a more feature rich diff tool where as FileDiffs is good for quick and dirty diffs.
Here are some of the available options you can turn on and off in Sublimerge.

Sublime Text 2 always opens empty window

I am opening a Sublime Text 2 project with the following command using gksudo in order to be able to edit some system files:
gksudo /usr/bin/subl /home/orschiro/.sublime/system-administration.sublime-project
However, what Sublime does is it opens the project in a window but additionally shows another empty window:
I already tried adding the following to the project and user settings but it does not resolve the problem:
"open_files_in_new_window": false,
"hot_exit": false
Does anyone have an idea how I can stop Sublime from opening that additional empty window?
You can try "create_window_at_startup": false, but that might only apply to OSX. Another option is to try "close_windows_when_empty": true.
Is your /usr/bin/subl a link to /path/to/Sublime Text 2/sublime_text, or do you have a -w specified as well? The -w option is not needed, so that's another thing to look at.
Good luck!
In your settings file, try:
"create_window_at_startup": false
I know this is an older issue and only for ST2 but none of these fixes worked for me on ST3. I was able to fix it by removing sublime text 2 and re creating my symlink with sublime text 3 (even though that is what it was linked to already). It seems it may have been confused by the multiple applications.

Set Default Syntax for a New Created File in Sublime Text 2

In Sublime Text 2, when I double-click on the tab bar, it will create a new file, Sublime Text 2 will give it Plain Text syntax, How to change this default Plain Text syntax to HTML syntax?
I know there is a sublime-DefaultFileType that could set the default file type of new files which are created with the Ctrl+N. However, how can I make it take effect when I double-click on the tab bar to create a new file?
I'm afraid there isn't a solution for double click.
According to the official website, DefaultFileType
This only affects files which are created with the Ctrl+N shortcut (Cmd+N on OSX).
for installation, follow the Installation part.
Please refer to this stack post: (On Text 3 it also works fine)
Sublime Text 2 Default File Type on new file
This py code solution support double click. DefaultFileType might be an easy option. But it didn't work in some cases, it has been 5 years old. In fact, I have to use this method for text 3 on windows.
This is the syntax for SQL :
http://rouge.jneen.net/pastes/PNq0
save it like DefaultLanguage.py
use the default location : \Data\Packages\User

In Sublime Text 2 How to view carriage return and line feed?

In notepad++ there is a toolbar button to switch on/off display of EOL characters, i.e. carriage return and line feed.
Can Sublime Text 2 do the similar thing?
In case anyone is here years later, I found success with the sublime package RawLineEdit.
Install with Package Control
Enter Raw Line Edit: Toggle into the command palette (via Ctrl+Shift+P)
Further documentation of features can be found in the User Guide.
Note that this package is only supported in Sublime Text 3.
Sublime Text does not currently support displaying EOL characters.
http://sublimetext.userecho.com/topic/104394-is-it-possible-to-show-all-characters-spaces-tabs-cr-lf-etc/
There is a quick workaround, in the search, enable the Regular expression and the search value use \n. You will see all the line feed is highlighted.
05 2021
This might not really helpful for OP question and also the question is 8yrs old and iam assuming he must have got a answer pretty early on.
This is anyone still looking for the answer to show the carriage return in Sublime text 3.
As on May 2021 the current version is 3.2.2
Detailed version of #Sam YC answer
Tested in Sublime text 3
Press Ctrl+ F (Windows)
Select the first box 'Regular Expression (Alt+R)'
Also select 'Highlight matches' (Last box with plain border)
Enter \n
You should see something like this. If you do not see anything, just toggle the 'Highlight matches'.
There is another way to achieve this.
Go to preference -> choose "settings-user"
In the file opened paste this command.
"ensure_newline_at_eof_on_save": true