Double clicking .txt files causes CMD to startup - file-extension

I think I accidentally set .txt files to open with command prompt when double clicking them.
However I cannot revert this and cause .txt files to open with Notepad++ or notepad using conventional methods do you have any tips on how to fix this?
Right clicking the text file, and choosing notepad++ from the default program menu only leads to noticing that the Always use this program check-box being disabled (grayed out).

Related

Auto refresh in Sublime Text 3

I want Sublime Text to auto reload files when they are changed in the hard disk (by some process else). Although I am not expecting to have my code open in different places, I use the editor to see resulting files, which is why this feature is crucial to my coding setup. I’ve figured out the option to prompt for the reload as below. But my issue is, it takes a long time for Sublime Text to realize the file has changed and give me the prompt. The files are in a Linux server and I am accessing them through Samba in Windows. Previously I've used Notepad++ which instantly recognize the change and prompt me to reload - so this is not to do with the file systems or hardware. Is there a way to achieve this in Sublime Text or VSCode?
"always_prompt_for_file_reload": true

How to open a file into the right editor (of split view)? [duplicate]

When I switch between files (Using ctrl-n for examples) in different editors, intellij always opens the file in the original editor the tab for the file is located. Coming from a vim background this seems counter intuitive for me. Is there a way to force intellij to always open the file in the same editor window?
Please vote for the following related issues:
IDEA-67559 Opening a file when there are multiple file groups may re-open in a different group rather than opening in the current group
IDEA-81628 Navigation within same file mistakenly leaves split editor
When using Ctrl-Shift-N to open the desired file, Shift-Enter to confirm will maintain the focused tab group.

After opening a folder in Sublime Text 3, how do I open two files at once?

I'm using MacOS 10.12.
I open a folder in Sublime Text 3 and I click a file.
The file then appears as a tab on the right side.
If I don't edit it and try to open another file, the previous one will be replaced by the new file.
My question is: how do I open the second one without having to edit the first one?
For now, my solution is to press a blankspace and delete it in the first file (so nothing changes here). And then open the second file.
This is annoying, and I figure there might be a better solution for this.
Thanks in advance.
By default, the following preference is set:
// Preview file contents when clicking on a file in the side bar. Double
// clicking or editing the preview will open the file and assign it a tab.
"preview_on_click": true,
This means that a single left click on a file in the sidebar will open a preview/transient tab. Single left clicking on another file will replace that tab with a preview of the new file. As you have noticed, editing the file in some way will convert the tab from a preview to a persistent tab. Setting this preference to false will mean that single clicking will do nothing. There is currently no option to get the file to open in a persistent tab from a single click.
Regardless of this preference, double left clicking will open the file in a tab that will stay.

Sublime-Text Force to not load previous files

I've accidentally opened tons of files. The nice feature that Sublime loads all files which were open in the previous session becomes a problem at this moment.
So i've find a setting to disable this feature, so that i start with a clean session.
Prefrences/Settings/User
"hot_exit": false,
"remember_open_files": false,
However this doesn't help. When i open SB3, still it loads all the files which were open before. Maybe the config changes are not picked because i am killing the app instead of closing?
So the easiest way around this will be to delete your .sublime_session files. They should be located in the following places:
Linux: ~/.config/sublime-text-3/Local
OS X: ~/Library/Application Support/Sublime Text 3/Local
Windows: C:\Users\username\AppData\Roaming\Sublime Text 3\Local
(I can confirm the first two, but I don't have access to a Windows box at the moment to confirm the last location. I'm reasonably sure that's its location, through.)
Open the Local folder either via the command line or through your operating system's file manager (I'd recommend the command line for OS X and Linux as ~/Library and ~/.config are hidden by default). Make sure Sublime is closed, then delete Auto Save Session.sublime_session and Session.sublime_session. This will not only close all the windows and tabs you have open, but it will also remove the entries in the File -> Open Recent and Project -> Open Recent menus.
The following hack will close everything but without losing the recent files. It works in Mac but not sure about other OS.
Right click and select Quit. Then the annoying "Do you want to save..." dialog box will appear.
Then use Force Quit and close the sublime.

Sublime Text 3: do not close tabs automatically

I am navigating the code of a big JavaScript library using Sublime Text 3. So I need to open a lot of tabs and switch between them to capture the code co-reference. However, Sublime closes 'unused' tabs automatically for me.
How to disable it? I googled but cannot find a solution. I find a shortcut ctrl+shift+t to restore the most recent closed file, but that is not enough. I need to disable the automatic closing, and that would be better if someone shows me the short key to "display and select a file from all open files". Thanks.
When you single-click on a file in the sidebar, Sublime displays it in a "temp" view that is overwritten the next time you single-click on a file. To open a file in a "permanent" tab that stays open even when other files are opened, you simply need to double-click on the file in the sidebar.
A more direct solution that I find mildly preferable, at least until I can retrain myself to double-click when I want a tab to stay open:
In the Settings, set preview_on_click to false.
This is not quite what I want since it all it does is disable the behavior to open a preview tab on single click -- thereby forcing the user to always double click. But perhaps by working this way for a week or so I will be able to retrain my ingrained assumptions and can go back to the default behavior.
Double click that file on left sidebar you do not want to close automatically.

Resources