Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lexer/syntax highlighting to visually distinguish the different components of a command #27

Closed
donnemartin opened this issue Dec 7, 2015 · 4 comments

Comments

@donnemartin
Copy link
Collaborator

A lexer would make it easier to visually distinguish the different components of a command:

 aws [options] <command> <subcommand> [parameters]

Config File

Default theme: vim

# visual theme. possible values: manni, igor, xcode, vim,
# autumn,vs, rrt, native, perldoc, borland, tango, emacs,
# friendly, monokai, paraiso-dark, colorful, murphy, bw,
# pastie, paraiso-light, trac, default, fruity.
# to disable themes, set theme = none
theme = vim

Disable Syntax Highlighting

 theme = none

Sample: Dark Background

 theme = vim

Imgur

Samples: Light Background

 theme = vim

Note: My terminal colors are customized which might be why we see light gray for aws>.

Imgur

 theme = xcode

Imgur

@jamesls
Copy link
Member

jamesls commented Dec 8, 2015

I think this would be great. The only concern I have, as you mentioned in your TODO, is being able to have color themes. Either that or ensuring the color theme is neutral enough (for now) that it works for both dark and light backgrounds.

@donnemartin
Copy link
Collaborator Author

I tried a few themes on white background--some work better than others, which I think is expected. I'll do some more tweaks to try to make the lexer more neutral, at least for the default theme.

I've hooked it up so that setting theme = none will disable the lexer.

Below are the supported themes:

# visual theme. possible values: manni, igor, xcode, vim,
# autumn,vs, rrt, native, perldoc, borland, tango, emacs,
# friendly, monokai, paraiso-dark, colorful, murphy, bw,
# pastie, paraiso-light, trac, default, fruity.
# to disable themes, set theme = none
theme = vim

@donnemartin donnemartin changed the title Add lexer to visually distinguish the different components of a command Add lexer/syntax highlighting to visually distinguish the different components of a command Dec 18, 2015
@donnemartin
Copy link
Collaborator Author

I updated the initial comment with the proposed UI.

donnemartin added a commit that referenced this issue Dec 24, 2015
Implements #27: Add lexer/syntax highlighting.
@donnemartin
Copy link
Collaborator Author

Implementation merged in 9149483.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants