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

:Rake in macvim has weird characters, how to fix? #161

Closed
benlieb opened this issue May 10, 2012 · 7 comments
Closed

:Rake in macvim has weird characters, how to fix? #161

benlieb opened this issue May 10, 2012 · 7 comments

Comments

@benlieb
Copy link

benlieb commented May 10, 2012

How can I get the output to format correctly when running :Rake from macvim? The following is an example of what I see. Maybe because I have color output configured? But I can't remember where that was done...

�[1m�[36mSQL (0.3ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20101103163442')�[0m
�[1m�[35mSQL (0.2ms)�[0m INSERT INTO schema_migrations (version) VALUES ('20101103172107')
�[1m�[36mSQL (0.2ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20101105165436')�[0m
�[1m�[35mSQL (0.2ms)�[0m INSERT INTO schema_migrations (version) VALUES ('20101211202439')
�[1m�[36mSQL (0.2ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20101215195843')�[0m
�[1m�[35mSQL (0.2ms)�[0m INSERT INTO schema_migrations (version) VALUES ('20110115205527')
�[1m�[36mSQL (0.2ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20110201191623')�[0m
�[1m�[35mSQL (0.2ms)�[0m INSERT INTO schema_migrations (version) VALUES ('20110202180430')
�[1m�[36mSQL (0.2ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20110202211901')�[0m
�[1m�[35mSQL (0.2ms)�[0m INSERT INTO schema_migrations (version) VALUES ('20110208034644')
�[1m�[36mSQL (0.2ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20110208035825')�[0m
�[1m�[35mSQL (0.2ms)�[0m INSERT INTO schema_migrations (version) VALUES ('20110830160841')
�[1m�[36mSQL (0.2ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20110830174353')�[0m
�[1m�[35mSQL (0.7ms)�[0m INSERT INTO schema_migrations (version) VALUES ('20110830175356')
�[1m�[36mSQL (0.3ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20110902030216')�[0m
�[1m�[35mSQL (0.3ms)�[0m INSERT INTO schema_migrations (version) VALUES ('20110902161931')
�[1m�[36mSQL (0.2ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20110904152218')�[0m
�[1m�[35mSQL (0.3ms)�[0m INSERT INTO schema_migrations (version) VALUES ('20110906015627')
�[1m�[36mSQL (0.2ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20110906021630')�[0m
�[1m�[35mSQL (0.3ms)�[0m INSERT INTO schema_migrations (version) VALUES ('20110906024539')
�[1m�[36mSQL (0.3ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20110906025116')�[0m
�[1m�[35mSQL (0.5ms)�[0m INSERT INTO schema_migrations (version) VALUES ('20110909161928')
�[1m�[36mSQL (0.3ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20110914202700')�[0m
�[1m�[35mSQL (0.3ms)�[0m INSERT INTO schema_migrations (version) VALUES ('20110915011953')
�[1m�[36mSQL (0.2ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20120315143923')�[0m
�[1m�[35mSQL (0.2ms)�[0m INSERT INTO schema_migrations (version) VALUES ('20120316194815')
�[1m�[36mSQL (0.2ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20120317003322')�[0m
�[1m�[35mSQL (0.2ms)�[0m INSERT INTO schema_migrations (version) VALUES ('20120502183140')
�[1m�[36mSQL (0.2ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20120502192948')�[0m
�[1m�[35mSQL (0.2ms)�[0m INSERT INTO schema_migrations (version) VALUES ('20120502195100')
�[1m�[36mSQL (0.2ms)�[0m �[1mINSERT INTO schema_migrations (version) VALUES ('20120508171538')�[0m
Loaded suite /Users/benlieb/.rvm/gems/ruby-1.8.7-p352@idance/gems/rake-0.9.2/lib/rake/rake_test_loader
Started
�[32m.�[0m�[32m.�[0m�[32m.�[0m�[32m.�[0m
Finished in 0.932235 seconds.

�[32m4 tests, 11 assertions, 0 failures, 0 errors�[0m
Loaded suite /Users/benlieb/.rvm/gems/ruby-1.8.7-p352@idance/bin/rake
Started

Finished in 0.000405 seconds.

�[32m0 tests, 0 assertions, 0 failures, 0 errors�[0

@tpope
Copy link
Owner

tpope commented May 10, 2012

However you configured color output is broken. It should be checking $stdout.tty? and only outputting color if it's true.

@tpope tpope closed this as completed May 10, 2012
@tpope
Copy link
Owner

tpope commented May 10, 2012

To be clear, it's probably some gem you added that's the real culprit. Find it and make a request to its author.

@graywh
Copy link
Contributor

graywh commented May 11, 2012

The problem is that :!irb<CR>$stdout.tty? returns true.

@tpope
Copy link
Owner

tpope commented May 11, 2012

Not true in :make.

@graywh
Copy link
Contributor

graywh commented May 11, 2012

I get color codes like "[1m[37m" in gVim/MacVim from :Rgenerate with rails 3.1.4.

@tpope
Copy link
Owner

tpope commented May 11, 2012

:Rake uses :make. :Rgenerate doesn't. (Also, rails generate is similarly broken with respect to checking $stdout.tty?. Someone should pursue that.)

@seyhaheng2
Copy link

sorry when am running command !rails g controller home index
in my Macvim . it's show me like this

[1m[32m create
[1m[32m invoke
[1m[32m invoke
[1m[32m invoke
[1m[32m create

please can someone tell me how to config it thank you

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

No branches or pull requests

4 participants