Skip to content

Instantly share code, notes, and snippets.

@halilim
Last active July 14, 2020 20:49
Show Gist options
  • Save halilim/0711a5de2bf7d474a5f8105b5b0501e1 to your computer and use it in GitHub Desktop.
Save halilim/0711a5de2bf7d474a5f8105b5b0501e1 to your computer and use it in GitHub Desktop.
Text editor color theme test

(Open the files in your editor and try out different color schemes)

It should highlight Markdown headers

It should handle basic styling like inline code, italic text, bold text, but should not italicize_inline under_lined text.

  • A list item
  • Some inline code
  • Etc lorem ipsum

It should highlight code blocks:

# Comments should not be too dim or bright
# It should highlight constants and keywords differently and sensibly
# Some schemes highlight actual code and code inside Markdown files differently, compare
module SomeModule
  class AnotherModule::Thing < Something::Else
    include Includable

    a_class_method :and_its_arg

    def self.a_class_method(etc)
      do_something_with(etc)
    end

    def a_method(param1, param2, &block)
      if Another.etc(true) && 1 + 1 == 2.to_i && param1[:etc].include?(3)
        @ivar.something(param1, :symbol, 'it should highlight strings differently than symbols', &block)
      else
        whatever do |block_param|
          { result: "ok #{param1}", etc: block_param }
        end
      end

      yield param2 if block_given?
    end
  end
end

Optional

It should highlight plain text:

# Some command
$ etc something 'lorem ipsum'
# Comments should not be too dim or bright
# It should highlight constants and keywords differently and sensibly
# Some schemes highlight actual code and code inside Markdown files differently, compare
module SomeModule
class AnotherModule::Thing < Something::Else
include Includable
a_class_method :and_its_arg
def self.a_class_method(etc)
do_something_with(etc)
end
def a_method(param1, param2, &block)
if Another.etc(true) && 1 + 1 == 2.to_i && param1[:etc].include?(3)
@ivar.something(param1, :symbol, 'it should highlight strings differently than symbols', &block)
else
whatever do |block_param|
{ result: "ok #{param1}", etc: block_param }
end
end
yield param2 if block_given?
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment