Textmate unexpectedly shows <CR> tag in code files

I have been using for quite some time, but yesterday in my code files I see , not sure what the problem is, after doing some searches I found that it should be an INVISIBLE character, Textmate version 2 fro MAC

<CR> tag

But now how can I remove it, can anyone suggest any ideas.

+3


source to share


1 answer


The textmate files are specified in one of three options.

  • CR

    (e.g. carriage return or \r

    ).
  • LF

    (like Line Feed or \n

    )
  • CRLF

    (e.g. carriage return line feed or \r\n

    )

If the file has inconsistent line endings, Textmate will treat it \n

as a line end marker and display it <CR>

as text.




The issue is caused by a corrupted startup database and can be fixed by running the following command in Terminal and resetting Finder.

sudo /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder

      




lsregister: [OPTIONS] [-domain { system | local | user | network }]... [path]...
Search the paths for application bundles and add each found item to the Launch
Services database.  For domain specifications, ask CF for the list of application
locations in the given domain(s).

  -kill     Reset the global Launch Services database before doing anything else
  -lint     Print information about plist errors while registering bundles
  -convert  Register apps found in older LS database files
  -load     Load the LaunchServices service plugin if it not already loaded.
  -lazy n   Sleep for n seconds before registering apps if the local cache
            is aleady populated.
  -r        Recursively register directory contents, do not recurse into
            packages or invisible directories.
  -R        Recursively register directory contents, including the contents
            of packages and invisible directories.
  -f        force-update registration info even if mod date is unchanged
  -v        Display progress information.
  -dump     Display full database contents after registration.
  -h        Display this help.

      

+2


source







All Articles