Git Product home page Git Product logo

sublimeansi's Introduction

ANSI escape codes color highlighting for ST3

From time to time, you end up with a file in your editor that has ANSI escape codes in plain text which makes it really hard to read the content. Something that has been added to make your life easier, stands in your way and it's really annoying.

This plugin solves this annoying problem. Not by just removing the ANSI escape codes but by bringing back the color highlighting to those files.

Sublime ANSI Screenshot

Installation

You can install via Sublime Package Control
Or you can clone this repository into your SublimeText Packages directory and rename it to ANSIescape

Usage

When you see garbage in your editor change the syntax to ANSI and you're good!

The plugin works by detecting the syntax change event and marking ANSI color chars regions with the appropriate scopes matching the style defined in a tmTheme file.

Using this plugin as a dependency for your plugin/build output panel

If you're writing a plugin that builds something using a shell command and shows the results in an output panel, use this plugin! Do not remove ANSI codes, just set the syntax file of your output to Packages/ANSIescape/ANSI.sublime-syntax and ANSI will take care of color highlighting your terminal output.

Likewise, if you would like to display ANSI colors in your existing build-command output, you would only need to set ansi_color_build as the target and Packages/ANSIescape/ANSI.sublime-syntax as the syntax; for example:

// someproject.sublime-project
{
    "build_systems":
    [
        {
            /* your existing build command arguments */
            "name": "Run",
            "working_dir": "${project_path}/src",
            "env": {"PYTHONPATH": ".../venv/python2.7/site-packages"},
            "cmd": ["nosetests", "--rednose"],

            /*  add target and syntax */
            "target": "ansi_color_build",
            "syntax": "Packages/ANSIescape/ANSI.sublime-syntax"
        }
    ]
}

If you use a custom build script and sub-programms don't output color, it could be that they assume the output has no colors. On Linux some applications can be forced to use colors by setting the environment variable CLICOLOR_FORCE=1. It is not recommended to set it permanently since it could cause issues if color is not supported and applications still output color. But in a SublimeANSI build you can use it for the usage in a Makefile build script, e.g.:

// someproject.sublime-project
{
    "build_systems":
    [
        {
            /* your existing build command arguments */
            "name": "Build",
            "working_dir": "${project_path}",
            "env": {"CLICOLOR_FORCE": "1"},
            "cmd": ["sh", "build.sh"],

            /*  add target and syntax */
            "target": "ansi_color_build",
            "syntax": "Packages/ANSIescape/ANSI.sublime-syntax"
            
             "variants":
            [
                {
                    "name": "Clean",
                    "cmd": ["sh", "build.sh", "clean"]
                }
            ]
        }
    ]
}

Killing the build process

If you want to kill build process during execution, use this command in sublime console (ctrl+` ):

window.run_command("ansi_color_build", args={"kill": True})

You can also add key binding eg.:

// Preferences > Key Binding - User
[
    { "keys": ["ctrl+alt+c"], "command": "ansi_color_build", "args": {"kill": true} },
    // other key-bindings 
]

Formatting ANSI codes during build process

In order to format ANSI codes during building process change 'ANSI_process_trigger' in ansi.sublime-settings.

Customizing ANSI colors

All the colors used to highlight ANSI escape code can be customized through ansi.sublime-settings. Create a file named ansi.sublime-settings in your user directory, copy the content of default settings and change them to your heart's content.

Caveats:

  • ANSI views are read-only. But you can switch back to plain text to edit them if you want.
  • Does not render ANSI bold as bold, although we support it. You can assign a unique foreground color to bold items to distinguish them from the rest of the content.
  • Does not support dim, underscore, blink, reverse and hidden text attributes, which is fine since they are not supported by many terminals as well and their usage are pretty rare.

Known Issues

Not able to paste copied build message into a new buffer view

Just making the new view non-empty so the syntax won't be auto set. For example, type a new line before you paste.

License

Copyright 2014-2016 Allen Bargi. Licensed under the MIT License

sublimeansi's People

Contributors

asfaltboy avatar aziz avatar dakta avatar fawques avatar hadisfr avatar jakkubu avatar jfcherng avatar matias-eduardo avatar matt1003 avatar mickare avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sublimeansi's Issues

Error loading colour scheme in Windows

After installing with Package Control, I get this error:

Error loading colour scheme
Packages/User/ANSIescape/tmTheme: Unable to open Packages/User/ANSIescape/tmTheme

Looking in the folder Packages/User/ there is a file named 'ansi'. Inspecting it shows it really has the name 'ansi.sublime-colour-schema'.

I'm using SublimeText 3.0, build 3143 in Windows.

Sometimes the ANSI codes are not handled properly

For example this

run { test: 'data' }
Import 1
Import 2
Import 3
�[33mUnitests: �[0mstarted: 1, �[0mfinished: �[32m1, �[0mfailed: �[32m0�[0m

other times it works fine. This is sublime 3 3095.

File change on disk causes jumbled content and unfixable state

First thanks for the plugin! 👍 I really appreciate being able to read colored log files in the same workflow as my regular editing/etc.

In my current use, I frequently leave a tab open with a log file at all times. But when the file changes on the disk and gets reloaded, the changes jumble up the content and get it into an invalid state that can't be fixed by toggling in/out of ANSI mode. (Closing and reopening the tab works, of course)

Is there an event you can tie into before a reload to revert the style? That's the first solution that comes to my mind, but I know from my limited plugin development that the Sublime API can leave a lot to be desired... If you can't detect reloads, this is way more challenging and probably not worth it, haha.

Edit text in ansi view

What do you think about adding editing possibilities to ANSI view?

The biggest issue is to change view back to plain text, since now it's done by simply reverting history.

feature_request(sequences): font effects support

1. Summary

It would be nice, if SublimeANSI will support font effects (see Font Effects section) as bold, underline and reverse.

2. Argumentation

More features in output. For example, I use bold and underline text in output of my programs.

3. Environment

  • Windows 10 Enterprise LTSB 64-bit EN,
  • Sublime Text Version 3.1.1, Build 3176 Portable,
  • Python 3.7.0,
  • ANSIEscape 0.2.5,
  • SublimeREPL 2017.01.28.19.13.15.

4. Steps to reproduce

I open SublimeREPL Python Interpreter → I paste this code:

print(u"\u001b[1m SashaBold \u001b[0m\u001b[4m SashaUnderline \u001b[0m\u001b[7m SashaReversed \u001b[0m")

Enter.

5. Expected behavior

As in this article:

ANSI__Expected

6. Actual behavior

No effect:

ANSI__Actual

Thanks.

Light theme

Is there a light theme that would work with this?

Wrong installation instructions in the README.md

The installation instructions in the README.md [on master] are not correct, or there is an issue with the master version..

The instructions references two methods of installation:

  1. use Package Control
  2. clone the repository (and rename)

At least on my system (ST3/Ubuntu), they yield two different results:

  1. creation of Packages/User/ANSIescape, with a ansi.tmTheme (and nothing else)
  2. (obviously) cloning of the repository, which has a completely different layout/logic, in particular, there is no ansi.tmTheme.

I have no understanding of the ST[3] plugin structure, but the differences should be at least documented.

This is important, especially because in cases like mine, both installation procedures yield a non-working plugin, in two different ways (I'll file this in two different issues) :-)

ANSI 256 color table support

Would be very awesome if you could add the 256 color table support:
Example: [38;5;231m

Or even better would be true RGB support.
Thanks alot!

how to run it with Typescript build ?

Hi and thx for this module,

The read.me says we have to edit the build config as following :

// someproject.sublime-project
{
    "build_systems":
    [
        {
            /* your existing build command arguments */
            "name": "Run",
            "working_dir": "${project_path}/src",
            "env": {"PYTHONPATH": ".../venv/python2.7/site-packages"},
            "cmd": ["nosetests", "--rednose"],

            /*  add target and syntax */
            "target": "ansi_color_build",
            "syntax": "Packages/ANSIescape/ANSI.tmLanguage"
        }
    ]
}

but with typescript build (included in https://github.com/Microsoft/TypeScript-Sublime-Plugin), target is already defined like that :

{
    "target": "typescript_build",
    "selector": "source.ts, source.tsx"
}

So how to use ANSI colors with typescript build ?

Thx in advance.

Error loading colour scheme

I get this error when I try to set the syntax to "ANSI". Error loading colour scheme Packages/User/ANSIescape/ansi.sublime-color-scheme: Unable to find Packages/User/ANSIescape/ansi.sublime-color-scheme

After looking through the closed issues it looks like restarting sublime might fix it: #66 (comment)

AttributeError: 'NoneType' object has no attribute 'views'

This showed up when Sublime Text started:

Traceback (most recent call last):
  File "D:\SublimeText\Data\Packages\ANSIescape\ansi.py", line 237, in check_left_ansi
    if not self._is_view_valid(view):
  File "D:\SublimeText\Data\Packages\ANSIescape\ansi.py", line 271, in _is_view_valid
    if view not in view.window().views():
AttributeError: 'NoneType' object has no attribute 'views'

This seems to coincides with the Overrides Reports package report.

This are the lines:

File: Data/Packages/ANSIescape/ansi.py
266:     def _is_view_valid(self, view):
267:         if view.window() is None:
268:             return False
269:         if view.window() not in sublime.windows():
270:             return False
271:         if view not in view.window().views():
272:             return False
273:         return True

Related:

  1. #12 event listener callback error

Hide BS (backspace) character

Some applications use the BS (backspace, code 08) character to overwrite lines on output. This package could hide these when viewing which cleans up the output.

Unable to configure properly SublimeANSI for 'tput reset' output

Hello !
On my machine tput reset ouputs the string \033(B\033[m.

I've been trying to change the configuration in the ansi.sublime-settings so that the ANSI_FG white scope match it but it doesn't seems to be working... here what I tryed:

      {"scope": "white", "code": "(\\x1b[(]B)?\\x1b\\[(0;)?(37)?m", "color": "#c7c7c7"},
      {"scope": "white", "code": "(\\x1b\\(B)?\\x1b\\[(0;)?(37)?m", "color": "#c7c7c7"},

I pre-pened the original string (which should match the \033[m) and added (\\x1b[(]B)? or (\\x1b\\(B)? to detect the leading part.

This technique is no effective, do you have any idea ?
Thanks a lot!

ANSI escape codes are lost when restarting sublime

Description:
When restarting sublime text the ansi escape codes are lost for files that have already been processed by the ansi command. This is occurring because the escape codes are lost from the sublime text "undo" buffer when sublime text is restarted.

Reproduce Issue:

  1. Open the file "ansi_test_file.text".
  2. Set the syntax to "ANSI" via the sublime text menu.
  3. Close and re-open sublime text. (note: the coloring has disappeared)
  4. Set the syntax to "Plain Text" via the sublime text menu. (note: the escape codes do not return)

Potential Solution:
On plugin initialization we need to force such files to be reloaded from disk, therefore reloading the lost escape codes. I am currently working on some patches to implement such functionality.

ANSI undo command deleting user changes

Description:
When executing the undo ansi command on an non-ansi file there is a potential for the user's previous changes to be delete. This occurs because the ansi plugin blindly uses the sublime text undo command to restore deleted escape codes; however if no escape codes have been deleted this will result in the user's previous changes being deleted.

Reproduce Issue:

  1. Open a new file.
  2. Insert text to the file.
  3. Set the syntax to "ANSI" via the sublime text menu.
  4. Set the syntax back to "Plain Text" via the sublime text menu. (note: the inserted text will be deleted)

Potential Solution:
We should probably double check view.command_history() before invoking the sublime text undo command to ensure that we are undoing what we think we are undoing.

Can it be used for ST 2 as well?

I'm running ST2 and would like to install your package, but couldn't find it with the Package Control. Do you know if this is also working for ST2?

thnx
viTus

Make default color mapping support OSX Clang

Clang on OSX outputs escape sequences that look like this:

<ESC>[0;1;31m

I don't know escape sequences well enough to know if clang is just flat out wrong, or if it is expecting more complete ANSI support. Either way, the default settings only match color escape sequences with two values.

Here's a mapping that seemed to work for me:

{"scope": "black", "code": "\\x1b\\[(0;(0;)?)?30m", "color": "#000000"},
{"scope": "black_light", "code": "\\x1b\\[(0;)?1;30m", "color": "#686868"},
{"scope": "red", "code": "\\x1b\\[(0;(0;)?)?31m", "color": "#c71e12"},
{"scope": "red_light", "code": "\\x1b\\[(0;)?1;31m", "color": "#ff6f6b"},
{"scope": "green", "code": "\\x1b\\[(0;(0;)?)?32m", "color": "#00c120"},
{"scope": "green_light", "code": "\\x1b\\[(0;)?1;32m", "color": "#67f86f"},
{"scope": "yellow", "code": "\\x1b\\[(0;(0;)?)?33m", "color": "#c7c327"},
{"scope": "yellow_light", "code": "\\x1b\\[(0;)?1;33m", "color": "#fffa72"},
{"scope": "blue", "code": "\\x1b\\[(0;(0;)?)?34m", "color": "#0a2fc4"},
{"scope": "blue_light", "code": "\\x1b\\[(0;)?1;34m", "color": "#6a76fc"},
{"scope": "magenta", "code": "\\x1b\\[(0;(0;)?)?35m", "color": "#c839c5"},
{"scope": "magenta_light", "code": "\\x1b\\[(0;)?1;35m", "color": "#ff7cfd"},
{"scope": "cyan", "code": "\\x1b\\[(0;(0;)?)?36m", "color": "#01c5c6"},
{"scope": "cyan_light", "code": "\\x1b\\[(0;)?1;36m", "color": "#68fdfe"},
{"scope": "white", "code": "\\x1b\\[(0;(0;)?)?(37)?m", "color": "#c7c7c7"},
{"scope": "white_light", "code": "\\x1b\\[(0;)?1;37m", "color": "#ffffff"},
{"scope": "_bold", "code": "\\x1b\\[(0;(0;)?)?1m", "color": "#ffffff", "font_style": "bold"}

Incomplete combined escape sequence support

It seems plugin doesn't support combined escape sequences. E.g. the following string won't be colorized at all in sublime text by plugin, while Colored should appear with red color on a yellow background.

echo -e "Normal\x1b[31;43mColored\x1b[0mNormal"

"Empty language names are not allowed"

Hello,

Using ST3 (build 3083) w/ ANSIescape installed via Package Manager. When trying to use it as part of a build command I see the following error via popup and in console, and no ANSI coloring on the build output:

error: Error loading syntax file "Packages/User/ANSIescape/ANSI.tmTheme": Empty language names are not allowed

ansi-error-st3

event listener callback error

I keep getting an error in detect_syntax_change because view == None, but you are referencing it anyway. Please add check to see if view == None and return if True.

    if view == None:
        return

Also, probably should add this check in assign_event_listener as well.

Missing theme file in Sublime Text 4 (Linux)

After installing ANSIescape from Package Control and trying to set filetype to ANSI I get this error:

Error loading colour scheme Packages/User/ANSIescape/ansi.tmTheme: Unable to open Packages/User/ANSIescape/ansi.tmTheme

The directory Packages/User/ANSIescape exists but is empty.

Version: Sublime Text 4, build 4107
OS: Debian Stable

Unable to find Packages/User/ANSIescape/ansi.sublime-color-scheme

When I select the ANSI language, I get the following error.

Error loading colour scheme Packages/User/ANSIescape/ansi.sublime-color-scheme: Unable to find Packages/User/ANSIescape/ansi.sublime-color-scheme

Screen Shot 2021-06-10 at 4 48 52 PM

I'm on ANSIescape version 0.6.3 and Sublime Text 4 (build 4107).

Screen Shot 2021-06-10 at 4 48 30 PM

No colours on Mac

After installing via Package Control, I can choose ANSI as the syntax for my log file, and the escape codes disappear, but there's no color. I get just a black background with white text.

Does the log file use escape codes that are not supported, or is my installation wrong? I'm using Sublime Text 3.2.2, build 3211.

�[0;90;49m
Running test ./spec/site/alarm_spec.rb:2 - RSMP site alarm A0302 detector error (logic error)�[0m
2020-12-16 09:57:52 UTC                           Starting supervisor on port 12111
�[0;95;49m2020-12-16 09:57:52 UTC                           Waiting for site to connect�[0m
2020-12-16 09:57:53 UTC                           Site connected from 127.0.0.1:36592
�[0;94;49m2020-12-16 09:57:53 UTC  KK+AG9998     -->  231f  Received Version message for site KK+AG9998 using RSMP 3.1.2 {"mType":"rSMsg","type":"Version","mId":"231f74a6-137b-47b6-8378-524e3b80a469","siteId":[{"sId":"KK+AG9998"}],"RSMP":[{"vers":"3.1.2"}],"SXL":"1.0.7"}�[0m

Unable to use synatx highlighting in console

When setting the target and syntax properties in my build system as stated in the README:

{
"build_systems": [
        {
            "cmd":
            [
                "..."
            ],
            /*  add target and syntax */
            "target": "ansi_color_build",
            "syntax": "Packages/ANSIescape/ANSI.tmLanguage"
        }
    ],
}

the build is broken (does not start) and I have the following output in my ST3 console:

Unable to find target command: ansi_color_build

Not able to apply ANSI scheme to the effect of the screenshot

After installing the plugin, I attempted the same as in the animated screenshot; namely I add a few ansi color codes into a text file and toggle from "plain text" syntax to ANSI.

Although the plugin seems to have been loaded and no errors appear in console, no change seems to happen.

I'm new to ST syntax language/theme files; is there any way to debug what the issue is? Here is some sample content:

�[0;36mtest_something�[0;34m()�[0m
�[0;32m    514 �[0;31m�[0;34m�[0m�[0m
�[0m�[0;32m--> 515 �[0;31m        �[0mself�[0m�[0;34m.�[0m�[0massertEquals�[0m�[0;34m(�[0m�[0mr�[0m�[0;34m.�[0m�[0mstatus_code�[0m�[0;34m,�[0m �[0;36m400�[0m�[0;34m)�[0m�[0;34m�[0m�[0m
�[0m�[0;32m    516 �[0;31m�[0;34m�[0m�[0m
�[0m

Update1: The generated ansi.tmTheme file, just in case you need to have a look at it.

Update2: If I run view.run_command("ansi") in console when the ANSI file view is focused it works nice

Large file takes long time to load

A large file (~34MB) takes a minute to load. At first glance it looks like SublimeANSI is broken, especially if you have not used it before.
Sublime Text is blocked, the OS X busy cursor is shown, and Sublime Text is marked "not responding" by OS X.

To reproduce

  1. Open a ~34MB logfile, eg. from a rails project, /log/test.log, but probably any large ansi file will do
  2. File is loaded fine by sublime text, no issues
  3. Switch to ANSI: View -> Syntax -> ANSI
  4. Sublime text is blocked, disc activity, takes 40-60 seconds to finish

Expected: Dealing with large ANSI files should not be much slower than for example SQL files. The same file, which also contains lots of SQL statements, works smooth when viewed with "View -> Syntax -> SQL", there is no notable loading time. Trying to parse it as C++ takes a few seconds.

ANSI colorings breaks after file autoreload

Brief:

I use SublimeANSI to review logging output of my programs. Sometimes I want to review logs when program is still running (and is writing to the log file). ANSI coloring breaks every time file is changed externally and reloaded by Sublime.

Version:

ANSIescape v0.1.5 (from package manager)

Steps to reproduce:

  • Open file with ANSI escape sequences in Sublime (e.g. test/ansi_test_file.txt provided in the repository)
  • Switch to ANSI syntax
  • change file externally: open the same file in another text editor (e.g. Notepad or Atom), change (add newline an the top) and save it; or write into this file programmatically
  • Bring Sublime back to focus

Desired behavior:

File contents updates along with ANSI coloring

Observed behavior:

File contents updates, dark ANSI theme is still up, but escape sequences are no longer recognized properly: there are "ESC" signs and colored fragments in random places

Workarounds:

  • Switching to plain text and back fixes the colors, but only until the next refresh
  • "Auto Refresh" package allows for disabling of the default auto refresh, but this defeats the purpose of real-time logging. Also it is tedious to do so for every file

red_light and yellow_light codes may be wrong in default settings

Hello,

Before all, thank you for this very useful package :)

I just used it and it appears that i had to change the default settings to see the output with correct colors. Light red and light yellow sere not detected, until i add a ansi.sublime-settings file in my User repo with the following changes :

# default: 
{"scope": "red_light", "code": "\\x1b\\[1;31m", "color": "#ff6f6b"},
{"scope": "yellow_light", "code": "\\x1b\\[1;33m", "color": "#fffa72"},
# user defined :
{"scope": "red_light", "code": "\\x1b\\[31;1m", "color": "#ff6f6b"},
{"scope": "yellow_light", "code": "\\x1b\\[33;1m", "color": "#fffa72"}

Here is a piece of code that did appear red in my shell, and not in Sublime when i redirected it into a file :

�[31;1m{M}�[0m: '...'
�[31;1m{S}�[0m: '...'

Thank you by advance !

Support a per-project configuration

Different projects use different build tools, and it may be useful to override setting per-project. Looking at a different project's source, this is probably as simple as calling view.window().project_data().get('SublimeANSI'), with appropriate None checks.

no color

Hello,

I am running ANSI syntax/color scheme. weird ANSI escape codes disappeared but the text color did not change. I did not change anything in default ansi.sublime-settings.
Any idea what the problem could be?

Thanks,
Emre

How to make the build not read-only?

Originally posted on: rctay/sublime-text-buildview#24

This plugin is doing the output panel to be read-only, when I am setting the target build as ansi_color_build & Packages/ANSIescape/ANSI.tmLanguage on my .sublime-build file.

File example:

    "build_systems":
    [
        {
            "working_dir": "$project_path/installers",

            "name": "Galileo Installer",
            "cmd": ["galileo.bat", "$project_path/plugins/addons/amxmodx/scripting/galileo.sma", "galileo", "$packages"],

            "target": "ansi_color_build",
            "syntax": "Packages/ANSIescape/ANSI.tmLanguage",
        },
    ]

Event listeners deleted when moving tabs

It appears that the view validation that was introduced in commits b5ceb21 and 143a6f8 may be a little too aggressive. It turns out that view.window will be set to None while a tab is being shifted from one position to another. This somewhat makes sense, as the view doesn't really belong to any specific window while it is being moved around.

The problem is that _is_view_valid is invoked while the view is being moved; hence it sees view.window == None and assumes the view is invalid (thus removing the ansi event listeners). As a result, views that have been moved will no longer respond to syntax changes via the sublime menu.

control characters unaccounted for

I have some log files that have CSI characters which are showing up in my logs. Perhaps parsing should be added to remove these.

[ESC]SC[0Ktravis_fold:end:services
[ESC][0Ktravis_fold:start:postgresql
[ESC][0Ktravis_time:start:121e4528
[ESC][0K$ travis_setup_postgresql 9.6
Starting PostgreSQL v9.6[ESC][0K
 * Stopping PostgreSQL 9.2 database server       [ESC][80G 
[ESC][74G[ OK ]
 * Stopping PostgreSQL 9.3 database server       [ESC][80G 
[ESC][74G[ OK ]
 * Stopping PostgreSQL 9.4 database server       [ESC][80G 
[ESC][74G[ OK ]
 * Stopping PostgreSQL 9.5 database server       [ESC][80G 
[ESC][74G[ OK ]

I tried adding the following into ansi.sublime-settings but it did not work:

      {"scope": "_bold", "code": "\\x1b\\[0K", "color": "#ffffff"},
      {"scope": "_bold", "code": "\\x1b\\[K", "color": "#ffffff"},

Coloring gone

Coloring of the text disappeared. Ubuntu-18, ST-3207. Previously worked. After installing manually and switching to commit b97ea0e the problem disappears. Tested on two computers at home and at work. I would like to get rid of manual rollback of the package.

Do we need to replace unsuported lines before processing?

In these lines we are replacing unsupported ANSI codes:

SublimeANSI/ansi.py

Lines 149 to 153 in 3e49dc6

# removing unsupported ansi escape codes before going forward: 2m 4m 5m 7m 8m
ansi_unsupported_codes = view.find_all(r'(\x1b\[(0;)?(2|4|5|7|8)m)')
ansi_unsupported_codes.reverse()
for r in ansi_unsupported_codes:
view.replace(edit, r, "\x1b[1m")

Is is necessary? We remove them later, during looking for ANSI colour codes this replacement shouldn't change much. Am I missing something?

Crashes with large files

Changing to ANSI on large files crashes ST3, might just be worth indicating the upper limit on file size in documentation, still a very useful tool. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.