Notepad++ Shortcuts File Location - windows-10

I have two accounts on my Windows 10 machine.
On one, the notepad++ shortcuts stored in users/user1/appdata/roaming/notepad++/shortcuts.xml work fine.
On the other account, the shortcuts defined in users/user2/appdata/roaming/notepad++/shortcuts.xml are not available.
This makes me sad. Can anyone explain how user2 can make those shortcuts work please?

I install notepad++ on user1, and create user2, switch user2 and shortcuts.xml also work.
On notepad++ installed, will create two shortcuts.xml file, first is install dir, like
C:\Program Files\Notepad++\shortcuts.xml
second is user dir like
C:\Users\admin\AppData\Roaming\Notepad++\shortcuts.xml
if switch new user and open notepad++, soft will create new shortcuts.xml in current user dir, like
C:\Users\admin2\AppData\Roaming\Notepad++\shortcuts.xml
you can modify current notepad++ shortcut and look the three shortcuts.xml file who's last modify time is nearyly, if no shortcut.xml file change, try uninstall and install again maybe useful

Related

How to change the default working directory in vim permanently (on windows 10)?

Although this question is similar, answer given over there changes the working directory only temporarily i.e. whenever I close and reopen gVim and write a new file given just the filename, it saves it in the home directory.
Here is another similar question, but I didn't get what the answer is trying to say. I found a _vimrc file at C:\Program Files (x86)\Vim. But I don't know what to do with it.
I want to achieve this:
Whenever I open vim and write a new file, given only the filename, it should save it in C:\Users\Sourav Kannantha B\Documents\Vim Projects instead of C:\Users\Sourav Kannantha B
I just downloaded gVim today from their website. So I am new to this.

How I can grant write permission to the file Preferences.sublime-settings and locate this file of Sublime Text 3 using Elementary OS Luna?

I cannot grant write permission to the file Preferences.sublime-settings in Sublime Text on Elementary OS Luna 3. If someone went through it, can you help me?
There is no way to go to the directory where it is because it simply is not in the way I get by clicking with the right button of mouse > Copy File Path.
I get this path:
/home/llarruda/.config/sublime-text-3/Packages/Default/Preferences.sublime-settings
In the directory Packages i just have the directories User and the link of current directory (.) and level return link (..).
I sailed across the directory tree for the Sublime Text 3, via bash, listing including hidden directories, nothing positive. I tried to grant permissions recursively to the for the whole Sublime Text 3 directory and even the innermost level that I can access and should contain the file Preferences.sublime-settings, I haven't success.
I did the install from the .deb package obtained on the official website.
PS: I want grant write permission, but I force give to the whole directory full permition - sudo chmod -R 777 sublime-text-3, that inside on .config directory
In ST3, plugins/packages are run directly from the .sublime-package file. For most things, you don't actually need the contents of those files. For instance, you can create a Preferences.sublime-settings in the user folder, and it will be merged properly. That being said, ST3 does allow you to override files. To make things easier, you can use the plugin PackageResourceViewer. I wrote it to assist with viewing default files. Again, you don't need to do this for your particular case though. In the menu, go to Preferences -> Settings - User. This will create a preferences file in the user directory. When merged, the values in the User directory will be used rather than those in Default.

Where are the default packages in Sublime Text 3 on Ubuntu?

I'm migrating from Sublime Text 2 to 3. In Sublime Text 2, I changed a lot of the default settings of the editor -- such as the tab bar height, sidebar color, etc. -- by modifying the Default.sublime-theme file in sublime-text-2/Packages/Theme - Default. I was also able to modify the colors of the default color schemes in a similar fashion. I've been trying to figure out how to do this for Sublime Text 3, but can't seem to find these files. ~/.config/sublime-text-3 only seems to contain overrides for user settings, not the default settings.
This link on the Sublime Text forums seems to give the location for Windows and Mac, but not for Ubuntu. I've searched a bit to no avail. Does anyone have suggestions?
Thank you!
To amplify on #skuroda's answer - ST3 contains all of its data that, in ST2, was stored in Packages/PackageName, in PackageName.sublime-package files that are basically just zip files, or "Resources" as they're now known. Using PackageResourceViewer, you can easily edit the individual files contained within the resource, then save it back again. When saved, the proper directory structure under Packages/PackageName will be created, allowing you to edit the file directly next time. The way file precedence works in Sublime, any file that exists in ~/.config/sublime-text-3/Packages/PackageName/ will override any file of the same name stored in PackageName.sublime-package.
However, since you don't want these files to be accidentally overwritten, I would suggest creating ~/config/sublime-text-3/Packages/User/Themes/ and User/Color Schemes directories and storing your customized files there instead. The User/ directory is protected from overwrites during upgrades, etc., and unless you're planning on creating a customized theme or color scheme for redistribution through Package Control, it's best practice to keep your files in there.
EDIT
I just realized you hadn't gotten an answer to your original question - where are the files stored? If you installed the .deb file from sublimetext.com, all the .sublime-package files are in /opt/sublime_text/Packages.
If you want the easiest way to save your customized settings first copy all the default settings and paste into a new file named Preferences.sublime-settings.
Then make your changes and save the file to:
/home/**username**/.config/sublime-text-3/Packages/User
In order to see the .config folder you will have to enable show hidden files.
The instructions are written at the top of the default settings list in case you are wondering where got this from.
In the ST console, try entering sublime.executable_path(). This should get you close to where you need to be. Also, you should copy the content of the file out and move them (under a new name to the packages folder). You probably don't want your modifications to be reverted on subsequent update. An alternative method is to try overriding the files you need to. I haven't done that for theme files, so I'm unsure if everything will work as it should. If you take the override route, I'd recommend using PackageResourceViewer. I wrote it to help with browsing/overriding package files in ST3.
You can use
dpkg -L <package name>
For example
dpkg -L subli<tab>
Just open up sublime text, hit ctrl+` to open sublime text console, then run these command accordingly
sublime.packages_path() to see user installed packages directory
sublime.installed_packages_path() to see zipped packages (with .sublime-package file type) directory
Mostly likely, you'll find the Default package inside zipped packages directory.
You can use PackageResourceViewer to see zipped packages's contents as #MattDMo suggested, but more over, you can actually extract zipped packages into user installed package directory directly using PackageResourceViewer's extract command.

Corflags.exe cf001 Could not open file for wiriting

I am trying to edit the corflags file so that I can run 32bit applications on a 64 bit pc but everytime I try to edit the file using something like corflags.exe assembly /32bit+ it comes up with the error message cf001 could not open file for writing.
Now I have tried a lot of different options such as:
Running in administrator mode;
Finding the file using a search and checking read only is not ticked
Checking that user full control is ticked
Tried to set the whole folder to non read only
When trying the whole folder, it goes through looking like it has set read-only, but then I click OK and re-right click on the whole folder, the box is filled in (not ticked) does this mean that part of the folder is read only and why does it reset to read only?
I just faced the same problem and have tried the same things.
Run cornflags from an elevated ("Run as administrator") Visual Studio Command Prompt. I did the same for a copy of the original .exe just to make sure no other process was using the program.
Create a copy of the file you intend to target with CorFlags.
(e.g. "WcfServiceHost.exe" --creates--> "WcfServiceHost - Copy.exe")
Rename the original file to something else:
(e.g. "WcfServiceHost.exe" --> "WcfServiceHose_Original.exe")
Rename to copy to the original file name
(e.g. "WcfServiceHose - Copy.exe" --> "WcfServiceHost.exe"
For my purposes, I created copies and named them describing their configuration:
Example:
WCFServiceHost_With32BitOn.exe
WCFServiceHost_With32BitOff.exe
Now I can destroy the WCFServiceHost.exe files and create them from these pre-modified copies. No more CorFlags operations necessary.
Note: this is basically a more verbose version of #RMalke answer and that answer should be marked as the answer.
I realise this is years later, but for anyone else looking, I found that the quickest way was to copy cmd and corflags.exe into the same folder as the one you want to edit. Then run cmd as admin from there.

How to set the working directory of WinGHCi

I just installed WinGHCi. When I try to load an .hs file with Ctrl+L, it opens the file browser in C:\Program Files (x86)\Haskell Platform\2012.2.0.0\winghci which is where I installed this. I don't want it to go there by default, I keep my code files in a different directory on a different drive and I don't want to have to navigate to D:\MyPath\Haskell every time I load a file.
I tried to set the "Start in" field of the shortcut I use to launch WinGHCi but it changed nothing.
How can I make WinGHCi look in my own directory by default?
It opens in the last directory you opened a .hs or .lhs from.
Try opening something from the folder you want, exit, restart.
Did it restart where you were?
Try working like that for a while, and if you like it (I do) then you're fine.
If you really do want to go to the same place every time, perhaps there's a way.
I can't find any setting to control this, but the information is stored in the registy.
Mine is at
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Haskell\WinGHCi 1.0.6]
"WorkingDir"="D:\\Files\\Andrew\\prog\\haskell"
You can save your version of that as resetghci.reg:
To make your own, open regedit and first try the same location. If not, search for WinGHCi.
You can export that subtree but you get the whole lot including recent expressions etc, which I don't think you should reset. Save that as ghcioriginal.reg just in case. Edit away all the lines except WorkingDir and save as resetghci.reg
When you double-click it it will ask you if you're sure you want to add that info to the registry. Yes you are.
Untested:
What follows works on older versions, but Microsoft seem to be going off .pif files and the start command, and I'm not able to test this in Windows 7.
Make a text file called ghci.bat in the same folder as the .reg you made. In it put
#echo off
regedit resetghci.reg
start WinGHCi
You might need to specify the full path to WinGHCi.
The start command is the windows equivalent of making a background process from a shell prompt, so this should terminate immediately.
Make a shortcut to ghci.bat (it will be called ghci.pif) and set it to open minimised and put a nice lambda icon on it (nick it from the winghci executable).
Pop that on your desktop, start menu or shortcut bar, and when you use it, you'll be popped back to your standard location.

Resources