Home > Development Tools > sublime > body text

Solve the problem that sublime ctrl b suddenly cannot be used

藏色散人
Release: 2020-01-03 16:28:38
forward
6259 people have browsed it

Solve the problem that sublime ctrl b suddenly cannot be used

Sublime Text 2 ?ctrl b If the run is blank, press ctrl ` to display the error, as shown below, reproduced Article solution? Article reference:

http://eric.themoritzfamily.com/python-encodings-and-unicode.html http://desert3.iteye.com/blog/757508 https: //github.com/misfo/Shell-T

py is editing environment variables, but the character set in the environment variables does lack the ascii character set

My solution ( Refer to article 6 above):

Find the location of the configuration file directory (you can refer to my other blog post to modify the default configuration file location of sublime Text)

Packages\Default\exec .py, open and edit

and find lines 41-42:

for k, v in proc_env.iteritems():
?proc_env[k] = os.path.expandvars(v).encode(sys.getfilesystemencoding())
Copy after login

Two modification options:

1. Delete decisively! (You read that right, that’s it)

2. Perform exception handling on it to avoid stopping the program when it makes an error, like this:

?? ? for k, v in proc_env.iteritems():
? ? ? ? ? ? try:
? ? ? ? ? ? ? ? proc_env[k] = os.path.expandvars(v).encode(sys.getfilesystemencoding())
? ? ? ? ? ? except UnicodeDecodeError:
? ? ? ? ? ? ? ? print "Encoding error..."
? ? ? ? ? ? ? ? print "VARIABLE: ", k, " : ", v
Copy after login

Then you try to use python or other After compiling the program, you will find that everything is normal!

For more technical articles related to sublime, please visit the sublime column.

The above is the detailed content of Solve the problem that sublime ctrl b suddenly cannot be used. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template