How to disable Notepad++ Auto-open previous files without opening Notepad++? - editor

How do I stop Notepad++ from loading all files from the past session?
I know how to do that settings in Notepad++, but the problem is that I once opened a very large file (>10GB) and made the Notepad++ hang up. Notepad++ has already marked that big file in the session and therefore hang up everytime I start the Notepad++. Is there a way I can stop it from loading the past session so it won't hang up every time?
P.S. I have received a report on possible duplicate with this question. This is obviously a different case. At least in that question the notepad++ still starts up normally while in my case I cannot even change the settings normally because the notepad++ just hang while loading the stored version. The answer to this question also provide a good way to change the settings without starting Notepad++, which will be useful in fixing problems caused by settings when the Notepad++ cannot starts normally.

Yes, you can change that setting by modifying the config file.
go to %appdata%\Notepad++
and open config.xml
You should find the following line in there:
<GUIConfig name="RememberLastSession">yes</GUIConfig>
just change it to no and that should do the trick.

Start from command line:
notepad++ -nosession
"Auto-open previous files" then should be disabled

This is for those who do not want to modify the XML config filess, and this will also work without having the Notepad++ in PATH.
As I do not have enough reputation to comment on other answers, I'll add on Jacques Hubart's comment, all credits should still be for him.
Open Windows Run (Windows + R)
Type in the full path to the Notepad++ EXE.
This would normally be C:\Program Files\Notepad++\notepad++.exe
Add the nosession parameter
Run
Preview:

If, like me, you left a huge file in the last session, you can also remove just the offending file from the session and keep the rest.
go to %appdata%\Notepad++ and open session.xml
Scroll to the right to see the filename. Be careful to keep the integrety of the XML by removing the entire "file" node. It should be on a single line.

There is also another way from GUI
In Settings/Preferences/Backup uncheck the "Remember current session for next launch"

As suggested use notepad++ -nosession from run to open notepad++. Then go to preferences --> Backup --> Uncheck Remember current session before next launch
Close notepadd++ and open it normally without run. It worked for me.

another possibility is that the window is on an other screen not visible anymore due to starting it in a new multimonitor setup.
in that case, you have to bring the windows in the visible area by:
select the window by Alt+Tab
Alt+Space opens a small menu in the top left corner
Arrow-Down and Enter selects ' Move'
Arrows brings it back

Related

Debugged Line is not getting Highlighted in my cs-html page

The Debugged line is not getting highlighted in the cs-html page. It works perfectly when i am debugging in the cs page but unfortunately its not working for the cs-html page.
I tried changing the font size or background color from the Options->Fonts and colors.But still its not working.
Please check if you could get some help from this thread.
And I think what you mean is: When you set a breakpoint in the .cshtml file, the highlight does not work instead of during debug mode.(Any misunderstanding please correct me!)
If you set the breakpoint in the .cshtml file but no highlight you can try closing VS,go C:\Users\lancel\AppData\Roaming\Microsoft\VisualStudio to delete all 15.x folders. And restart VS to resolve it. (This solved the issue in my side, and you can try other suggestions from the link above)
If what you mean is the highlight not work in this situation:
Please go Tools menu=>Get Tools and Features to open installer and choose repair VS.
Any update please feel free to let me know:)

how to open many tabs in chromium but unload/disable inactive/notCurrent ones, releasing memory and cpu?

So I have 50 tabs opened on chromium, but that is using too much memory and some of the CPU.
How can I have all those concurrent researches I am doing opened but not clog my machine?
I think there should have a way that only the active tab is loaded in memory and running, and all the others should stay closed/unloaded from memory, until I want to look at them...
Any extension can do something like that?
EDIT: tabs outliner seems to do the trick as #Danny Beckett said, but I still wonder if the non active tabs could be unloaded (automatically); may be something like keep only the last newest 10 tabs opened/loaded, and auto-close the older ones; may be tabs outliner can have that feature in the future, just need find a proper way to ask its developer... any other tips?
EDIT: here a link to the idea: auto close old tabs, go there and upvote if you like it!
The Tabs Outliner extension does exactly what you're asking.
Type command "chrome://kill" (or "chrome:kill") in the address URL bar (like a http:// URL but with chrome:// first) to individually release tabs from memory.
Otherwise for a GUI, in the standard Chrome Task Manager (type Shift-Esc [or go to menu "More Tools..." then "Task Manager"]), then just "click-to-kill" the tabs you want to release from memory.
That language command is painful/difficult/violent/triggering but will not crash your computer or cause harm, that is the actual English command.
(I too use and love the Tabs Outliner suggested before, but still sometimes type the command.
Pro Tip: Make "chrome://kill" a convenient link in your Bookmark Bar.
Other benefits to the command version, are that if you reload the page, Chrome with chrome:kill still has it cached, so page position and form fields can be restored automatically. However with Tabs Outliner it wil not remember the reloaded page contents, there is not any cache.)
You can right click on Chrome title bar and choose "Task Manager"
Task Manager path
Then you can choose for which tab or window you want to end process which will essentially unload tabs and windows from the memory.
Task Manager screenshot
You can close everything except for the main Chrome process indicated by green arrow in the screenshot above. Ending this process would be the same as closing all Chrome instances altogether.

What causes the asp.net Cannot create/shadow copy error?

Several times a day I receive this error while running my asp.net mvc4 project. I am not asking what that means, or how to fix it, but what am I doing to cause it? It is really starting to bug me, and if I can cause it to go away by altering my workflow I will.
Cannot create/shadow copy '< assembly >' when that file already exists.
As I mentioned above the project is an MVC4 application. My workflow is typically.
Make a change (code or html)
If it was code, rebuild the project (using keyboard shortcut CTRL+SHIFT+B)
refresh the page
see annoying error
clean the solution
rebuild solution
refresh page
verify change
goto 10
(I get the error with/without the debugger attached.) I will be eternally grateful to anyone who can inform me on how to avoid this error, and will promptly tweet your praises
I find this annoying too. It seems to happen when you try to refresh the page in a browser before the build is fully complete. Try counting to three-one-thousand after build is complete and then refresh in the browser. Create/shadow copy should be done by that point.
I also don't think you should need to "clean solution". I believe a rebuild is a clean + build, so you may be cleaning twice.
After a bit of research, I also found this pre-build event which seems to be popular. (this workaround does not seem to work, perhaps it did in previous versions of VS / .NET framework)
Update: alternate solution
Another way to get by this is, when you see the YSOD, just type in a different URL in the browser and load it instead. Then click the back button and refresh to get to the page you were trying to reload in the first place.
What's causing this error seems to be doing the shadow copy (stating the obvious...), ie generating a file in one folder and then reading it to copy it elsewhere. I think what's causing the issue is generating or not that first file, and when/how it's copied, regardless of what your actions are. Does this first file (that will be shadow copied) needs regenerating, and therefore re-shadow copied?
This post says:
By default shadow copy is enabled on every appdomain created by ASP.NET. Assemblies loaded will be copied to a shadow copy cache directory, and will be used from there. So that the original file is not locked and can be modified.
And their fix is to prevent shadow copy. But I don't personnally fully understand what shadow copy does in the asp.net context, maybe someone can clarify if there are any bad side effect to disabling it:
<configuration>
<system.web>
<hostingEnvironment shadowCopyBinAssemblies="false" />
</system.web>
</configuration>
This post talks about disabling indexing and/or antivirus, which would suggest that building the project generates new files, and the antivirus (or indexing service) accesses them and locks them, just when the shadow copy is trying to copy that exact same file.
I get his error regularly and never found what specific action I do causes the error. I make a code change, press F5 (Run/ Play button), get the error in the web browser, close the web browser, press F5 again. It now works. I don't clean, I don't rebuild. However, with the second F5/Run, I believe VS detects there's been no code change, and therefore, maybe the shadow copy is not redone? Or maybe this time the shadow copy is timed slightly differently and it works.
I received this error after adding a new image to my web project.
In VS, each image has a property entitled "Copy to Output Directory". I chose "Copy Always", then I got the message.
I changed it to "Do Not Copy" - now it is happy.
Hope that helps someone.

Pspad "File contents were changed. Reload?" dialog bug

I've been using PsPad for quite some time now, always on Windows XP never a problem. But since I've upgraded to Windows7, PsPad is throwing the confirmation dialog "File contents were changed. Reload?" when it doesn't have to. I can reproduce this annoying message by: editing a file, saving it (to the fileserver win3k over a network), viewing that file/page in the browser, going back to PsPad to work on the file. After that last point it throws the dialog, while obviously nothing has changed in the meantime.
Does anybody experience the same bug? Is there something to do about it? PsPad forum has a thread about this, but no solution is provided there.
You can switch it off in program settings / Direct edit button
CheckDocChanges=0
You can switch it off in program settings / Direct edit button CheckDocChanges=0
The DIRECT EDIT button it's a button to the left of the OK button on the program settings dialog box ( in version 4.5.4 ). It's not entirely intuitive but it's there alright if you look.
This occurs because the time on your server and your workstations are not in sync. You can set your workstation to synchronize with the same timeserver as your server, which you will have to find out yourself or from your admin.
To change the time server on your workstation do the following
Open date and time
Go to Internet Time
Change Settings
Put in the server
Click update now and OK

Command - R like functionality in MacVim

I'm on a Mac and when I am in TextMate editing a ruby file I can simply hit Command-R to execute the file and see the results in a new window. Is there something similar to this using MacVim?
It's really important that I be able to open up a NEW window. Reason is because in the current window I might have more than one full page of info. If that happens I can't scroll through it.
You could create your own mapping to do it:
map <D-r> :w<CR>:!ruby %<CR>
% is the current file. If your file starts with #!/path/to/ruby you can omit the explicit call to ruby in your mapping.
Haven't tested the <D-r> mapping - no mac here. It's likely configuration dependent.
The following question has the answer to exactly what I was looking for
https://superuser.com/questions/133886/vim-displaying-code-output-in-a-new-window-a-la-textmate

Resources