Using xkb command to change keyboard mapping results in read-only files - readonly

I am new to Linux and maybe the answer to my question is too simple but I did my research and found nothing out there.
The key "a" in my laptop is broken. So I need to remap it in another position. I opened the location /usr/share/X11/xkb/symbols/ and tried to edit the file "us" which contains the mapping for the English keyboard but when I tried editing it in "vi" editor I got a "read only" message. I need to edit and save the changed file. How can I do this?

Related

.srt file types doesn't exist under 'Choose default apps by file type' after after formatting windows 10, what to do?

Before I did a clean install of my desktop with windows 10 I had .srt to open by default in Sublime Text after I have formatted my computer I somehow miss the file format .srt under 'Choose default apps by file type'.
The .srt should be be between the .srf and .srw file types, but it isn't (as shown in the image here: https://answers.microsoft.com/en-us/windows/forum/windows_10-desktop-winpc/srt-files-back-to-unknown-application/e33cace8-dd59-4557-9631-e8e82a8307b3?auth=1).
If I try "open with and find Sublime (or any other software for that matter, it will open it, but it will not set it as the default program even though I checked the box) and will still appear as an unknown filetype....
If I go into properties and try to change the "open with" from there, it will just keep showing "choose a program" even still.
tried updating the computer and restart it and frankly I've given up, and it doesn't seem anyone have run into this problem before of missing a filetype under 'Choose default apps by file type'.
I also tried
1) Settings - Indexing Options
2) Advanced button
3) File Types tab
4) Add New Extension to List box, type in extension (without a period) such as "py"
5) Click Add, OK and Close
and while the format does appear in the 'Choose default apps by file type', it still doesn't let me change it at all...
Anyone got an answer to this problem?
I have now tried to go into regedit and use "search" on anything that included "sublime" and ".srt" and deleted them all... restarted the computer, reinstall sublime. The file extension I created myself in the indexing option, has been deleted.
Sublime can still open the file, but if you try to make it default program by simply opening it or or going into the files properties and do it that way, it will just open the file without it making it the default program as it should.
going into the indexing option and create the .srt extension format so it can be found under 'Choose default apps by file type' will allow you to choose notepad or wordpad as default program. When I choose either of them, the will just freeze for 1-2 sec and then nothing has changed and the extension havn't been associated with any of the programs.
I tried following the following links, and nothing has worked. Guess I'll just have to accept there is no solution rather than to live with out until I reform my PC again, cause it works without a problem on my laptop and I formatted them both the same time and installed the exact same things on both and the exact same way s:
I've tried to use the following links for help, but to no avail since non of the things I have tried have fixed it.
https://superuser.com/questions/655600/i-cant-set-a-program-as-the-default-to-open-a-filetype-with-in-windows-7
https://superuser.com/questions/91655/open-with-dialog-ignores-my-selection
https://superuser.com/questions/13653/how-to-set-the-default-program-for-opening-files-without-an-extension-in-windows
Windows 7 file extension association
One way to get an empty .srt entry back in the 'Choose default apps by file type' control panel is to create a new key for .srt in your registry under HKEY_CLASSES_ROOT:
Open Registry Editor, e.g. by typing 'regedit' into the start menu or a command prompt
At the top of the tree, right-click on 'HKEY_CLASSES_ROOT', New -> Key
Rename the new key to '.srt' and press enter to save

Manually edit spelling entries in RStudio dictionary

While editing an R Markdown file, I accidentally added the word 'teh' to the current dictionary when performing a spell check. Is there a way to manually edit the dictionary to undo this incorrect entry?
I am running RStudio version 1.1.423 on macOS Sierra (10.12.6).
I found the user dictionary. On macOS, you can edit the text file ~/.rstudio-desktop/monitored/lists/user_dictionary.
The link where the OP found the solution appears to have been taken down, so for Windows users the location is: %localappdata%\RStudio-Desktop\monitored\lists\user_dictionary

Changing Atom editor copy/paste behavior

The Atom editor is a very good product, but in some areas it attempts to deviate from long standing user interface standards for operating systems, which can extremely annoying.
For example, on a Mac running OS/X, all apps compliant with Apple's guidelines will handle a Copy command with no selection by leaving the clipboard intact. On Atom, this action will either delete the contents of the clipboard if the line is empty, or overwrite them with the contents of the entire line.
Deviating from such very basic user interface guidelines is not a good idea, but if it's going to be done, the deviation should be an option, not the default.
Is there a way to force Atom to behave the way it should on a Mac, through options or scripting?
Figured it out.
Adding the following at the bottom of the keymap.cson configuration file returned Cmd-C to the correct behavior.
'body':
'cmd-c': 'native!'
To edit the keymap.cson file open Preferences, then Keybindings, then click on "your keymap file" at the end of the sentence under the "Keybindings" title.

Unable to set DefaultIcon in registry

I am attempting to update the Windows registry to add an icon for my custom file extension, and I have thus far been unsuccessful. My current version is closest to this stackoverflow question. Unfortunately, my file's icon is still one of the generic built-in Windows icons (see screenshot below).
At this point my best guess is perhaps there is something wrong with my .ICO file. I have shared it here on Dropbox
Here is the full registry update I'm making with regedit. As you can see, I am also associating my file extension with a .bat file for execution. That works great. Also the Type displayed in Windows Explorer is PartQuest Archive which is also great (see above screenshot). Alas, no dice with the last entry for the icon.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\pqunzip]
#="PartQuest Archive"
[HKEY_CLASSES_ROOT\pqunzip\shell]
[HKEY_CLASSES_ROOT\pqunzip\shell\open]
[HKEY_CLASSES_ROOT\pqunzip\shell\open\command]
#="\"C:\\MentorGraphics\\PartQuestTools\\SDD_HOME\\common\\win32\\scripts\\pqunzip.bat\" \"%1\""
[HKEY_CLASSES_ROOT\.pqz]
#="pqunzip"
[HKEY_CLASSES_ROOT\.pqz\DefaultIcon]
#="\"C:\\MentorGraphics\\PartQuestTools\\SDD_HOME\\common\\win32\\config\\decrypted.ico\""
I have also attempted adding a ,1 to the end of the file name since the .ICO file appears it may have two icons embedded in it. This is did not make a difference.
For good measure, I have been rebooting after each change. I'm not certain if this is necessary.
Any tips from the Windows experts around here will certainly be appreciated!
So I did a little reverse-engineering to figure out the issue based on 7Zip's file associations. It turns out that the DefaultIcon key entry should be a child of the application, not the file name. So in my case I need it associated with pqunzip rather than .pqz:
[HKEY_CLASSES_ROOT\pqunzip\DefaultIcon]
#="\"C:\\MentorGraphics\\PartQuestTools\\SDD_HOME\\common\\win32\\config\\decrypted.ico\""
For maximal clarity, this is the entire contents of my .req file that works as expected:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\pqunzip]
#="PartQuest Archive"
[HKEY_CLASSES_ROOT\pqunzip\shell]
[HKEY_CLASSES_ROOT\pqunzip\shell\open]
[HKEY_CLASSES_ROOT\pqunzip\shell\open\command]
#="\"C:\\MentorGraphics\\PartQuestTools\\SDD_HOME\\common\\win32\\scripts\\pqunzip.bat\" \"%1\""
[HKEY_CLASSES_ROOT\pqunzip\DefaultIcon]
#="\"C:\\MentorGraphics\\PartQuestTools\\SDD_HOME\\common\\win32\\config\\decrypted.ico\""
[HKEY_CLASSES_ROOT\.pqz]
#="pqunzip"

Sublime Text 2 - Key Binding for Open Recent?

How can I map Open Recent, or "open last file" to a keyboard shortcut?
This is my pitiful attempt so far:
{ "keys": ["super+shift+r"], "command": "open_recent"}
I tried looking at the console (Ctrl-`) while using Open Recent but it doesn't display anything.
In general, how does one go about adding key bindings? And is there a more appropriate place that Stack Overflow for this question?
Thanks!
Key bindings should be added to the User key-binding preferences. Adding to the default settings will also work, but the settings will be overwritten when a new version of Sublime Text 2 is installed.
Your attempt matches the general structure of a Sublime Text key-binding, but "open_recent" isn't a valid command. From what I can find in the documentation, I think the Open Recent menu keeps track of the different file names then calls open on whichever file is selected, instead of calling an open_recent command.
If there isn't a way to get the name of the most recent file, you could probably write an extension that kept track of the most recent file and then opened it, but that probably be a fairly kludgy solution.
The command is reopen_last_file. So you should add something like this:
{ "keys": ["ctrl+shift+r"], "command": "reopen_last_file" },
Little PS: I'm using ctrl+shift+t, so that the shortcut for reopening the last document is consistent across my browser, IDE and editor.
I suggest you try out a couple of packages:
https://github.com/spadgos/sublime-OpenRecentFiles
or:
https://github.com/paccator/GotoRecent
And the easiest way to install them is with this package control, package:
http://wbond.net/sublime_packages/package_control/installation
That should give you what you want...

Resources