Sublime Text / Python editor: When I type the third character after a slash character that follows and opening quotation mark (double "/...
or single '/...
OR "\...
'\...
) the slash disappears. How can I stop this behavior?
When typing:
"/hom
turns into this: "hom
.
"\hom
turns into this: "hom
.
Unicode codepoint "\u002F
turns into "u002F
Newline \n
after the double quote "\n555
turns into "n555
So far, the only thing that seems to help is if I (in Python.sublime-settings
) turn off the automatic pairing of quotes and brackets by setting auto_match_enabled
to false. This causes other issues, so I would like to find a more workable solution.
// Controls auto pairing of quotes, brackets etc
"auto_match_enabled": false,
For some reason, I am not able figure out how to change this behavior. I have spend hours on this, I have tried changing everything I can think of (punctuation, auto_corrects, triggers, and other stuff) so that could cause this behavior with no luck.
This behavior only occurs only with Python editor when editing .py files in Sublime Text, and only when I type in the third character following the slash that follows the quotation mark. It is the same behavior with raw strings: r"/hom...
turn into r"hom
when I type in the third character after the forward slash. CTRL+Z
has no effect on bringing the forward slash back after it disappears.
Excluding the undesirable option of making the auto_match_enabled
to false, the only other thing I can do is have to (1) remember that this happens, AND (2) I have to go back to the beginning of the string that I am trying to type and manually add the forward slash. NOTE: When I do go back to insert the slash character at the beginning of the sting in quotes, the slash does not disappear. I can also paste a string starting with a forward slash, and it will not disappear. This happens only when I type in the third character following the slash that follows the opening quotation mark.
How can I type a quoted string when the string starts with a slash? What am I missing? Thank you for your help in advance.
Sublime Text / Python editor: When I type the third character after a slash character that follows and opening quotation mark (double "/...
or single '/...
OR "\...
'\...
) the slash disappears. How can I stop this behavior?
When typing:
"/hom
turns into this: "hom
.
"\hom
turns into this: "hom
.
Unicode codepoint "\u002F
turns into "u002F
Newline \n
after the double quote "\n555
turns into "n555
So far, the only thing that seems to help is if I (in Python.sublime-settings
) turn off the automatic pairing of quotes and brackets by setting auto_match_enabled
to false. This causes other issues, so I would like to find a more workable solution.
// Controls auto pairing of quotes, brackets etc
"auto_match_enabled": false,
For some reason, I am not able figure out how to change this behavior. I have spend hours on this, I have tried changing everything I can think of (punctuation, auto_corrects, triggers, and other stuff) so that could cause this behavior with no luck.
This behavior only occurs only with Python editor when editing .py files in Sublime Text, and only when I type in the third character following the slash that follows the quotation mark. It is the same behavior with raw strings: r"/hom...
turn into r"hom
when I type in the third character after the forward slash. CTRL+Z
has no effect on bringing the forward slash back after it disappears.
Excluding the undesirable option of making the auto_match_enabled
to false, the only other thing I can do is have to (1) remember that this happens, AND (2) I have to go back to the beginning of the string that I am trying to type and manually add the forward slash. NOTE: When I do go back to insert the slash character at the beginning of the sting in quotes, the slash does not disappear. I can also paste a string starting with a forward slash, and it will not disappear. This happens only when I type in the third character following the slash that follows the opening quotation mark.
How can I type a quoted string when the string starts with a slash? What am I missing? Thank you for your help in advance.
Share Improve this question edited Mar 19 at 18:51 rich neadle asked Mar 19 at 0:01 rich neadlerich neadle 8042 silver badges8 bronze badges 3 |1 Answer
Reset to default 1RESOLVED
PROBLEM: When in Python Editor, only when typing, any slash (/
and \
) placed after an opening quotation mark (('
or "
) disappeared when typing the third letter after the slash.
ISSUE: sublime-package
called AutoFileName
.
SOLUTION: Remove AutoFileName
package in Sublime Text 4.
TROUBLE SHOOTING SUBLIME TEXT EDITOR FOR THIS AUTOCORRECT ONLY IN PYTHON ISSUE:
After (optionally) checking the Preferences/Settings
for any obvious auto_correct issues (do not spend 3+ hours like me), move to test the Sublime Text app settings before any settings changes or packages were installed in the SAFE MODE allowing you trouble shoot from ground up.
- Make sure your Sublime Text app updates are up to date: In Sublime Text app go to
Help/Check for updates...
- Get a list installed packages for reference in trouble shooting: In the Sublime Text app go to
Preferences/Browse Packages
. This will open a folder on your computer for../Sublime Text/Packages
. From the..Sublime Text/Packages
navigate back toSublime Text
folder and then go toSublime Text/Installed Packages
folder that will list all the installed packages. I took a screenshot. This will be helpful later when I start deleting packages troubleshoot, I know the package names I have, so I can reinstall them easily. - Close all instances of your Sublime Text app to move to safe mode: (https://www.sublimetext/docs/safe_mode.html) (Windows: Open Sublime Text while holding keys
SHIFT
+ALT
(for Windows)(Mac: HoldOption
key) - In safe mode:
- Create
.py
file. Test for problem by typing"\hello
. - > Works correctly. This means that the issue is not with the basic set up of the Sublime Text app. - Install Package Manager: In Sublime Text,
CRTL
+SHIFT
+P
. In the search bar that opens on the top, typeinstall...
to search. From dropdown menu selectInstall Package Control
. - Install any packages you have at the
../Sublime Text/Installed Packages
folder, to see if you are able to recreate the problem. - You can install a package in the Sublime App with package control: Open Package Control search bar with
CRTL
+SHIFT
+P
. In the search bar, typeinstall
. SelectPackage Control: Install Package
. In the search bar, type the name of the package you want to install. Select the package from the list below. And, the package is installed. - After installing any package, in your
.py
file, try to recreate the problem. In my case, I was not able to recreate the problem after installing some of the packages on my list. This tells me that the package(s) that I thought were the problem, were not the problem. - Normal mode:
- In parallel to the safe mode, open the Sublime Text app normally. I started removing and and reinstalling packages with
CRTL
+SHIFT
+P
(orPreference/Package Control
). In the search bar, typeinstall
. SelectPackage Control: Remove Package
orPackage Control: Install Package
respectively. - After removing a package, I do another typing test in the
.py
test file to try to recreate the issue. If the issue persisted after removing the package, I would reinstall the package. - I kept removing and reinstalling packages, until I came to and older (archived 2022) package called
AutoFileName
. Once I removed this package, the issue with typing in my.py
file typing issue was resolved.
subl --safe-mode
. If it helps, some setting or some plugin is probably to blame. Or you might have discovered a bug. However, last release of SL3 is dated 2019. I guess they maintain only the SL4. Probably its time to upgrade. – VPfB Commented Mar 19 at 11:55