Article From:https://segmentfault.com/q/1010000010133510
Question:

For example, a NULL symbol like this will appear at the end of the page whenever it is archived. Is anyone meeting it? How to deal with it, thank you


Answer 0:
MacOS + Sublime Text 3Under the environment:

1.Open the terminal

$ cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/

2.Create ashow_nul_characters.pyfile

$ touch show_nul_characters.py

3.Open Sublime Text3, selectSublime Text -> Preferences -> Browse Packages


4.Add in the User fileshow_nul_characters.pyFile, open with Sublime Test3


5.Copy the following code and paste it toshow_nul_characters.pyAnd save

import sublime_plugin


class ShowNULCharacters(sublime_plugin.EventListener):
    def on_modified_async(self, view):
        NULs = []
        p = 0
        while True:
            s = view.find('\u0000', p + 1)
            if not s:
                break
            NULs.append(s)
            p = s.a

        if NULs:
            view.add_regions("NUL", NULs, "invalid")
        else:
            view.erase_regions("NUL")

6.Restart Sublime Test3.

WindowsIt’s like. It’s openBrowse Packages, Create in the User foldershow_nul_characters.pyCopy the code

Answer 1:

Through experiments, we can change the connection SMB to AFP.

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *