Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7754689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:22:26+00:00 2026-06-01T12:22:26+00:00

[using MacVim 7.3 on OS X Lion] I have a vimscript function which runs

  • 0

[using MacVim 7.3 on OS X Lion]

I have a vimscript function which runs an external command. It’s executing correctly, but the output displays (unwanted) control characters, such as [0m, [33m, [36m, and -1H. The relevant line in the vimscript function is:

exec ":!bundle exec rspec --color " . a:filename

Which produces:

:!bundle exec rspec --color spec/acceptance/user_logs_in.feature
[33m*[0m

Pending:
[33m  User logs in [0m
[36m    # the step 'the user "foo@test.host" exists' is not implemented[0m
[36m    # [0m

Finished in 0.07121 seconds
[33m1 example, 0 failures, 1 pending[0m

Here’s what the same command and output look like from the terminal, which is how I want it to display in vim:

$ bundle exec rspec --color spec/acceptance/user_logs_in.feature
*

Pending:
  User logs in
    # the step 'the user "foo@test.host" exists' is not implemented
    #

Finished in 0.1161 seconds
1 example, 0 failures, 1 pending

Also, any time I execute and external command, vim displays -1H immediately after it. For example, if I type:

:ls<return>

I see:

:ls-1H
<rest of the output is as expected>

Any ideas on hiding those control characters and -1H.

(disclaimer: I’m very new to vim so please don’t assume too much background knowledge on my part.)

Thanks.

Update 3/31/2012 @ 17:32 PM

Sam Goldman‘s correct: MacVim doesn’t know how to display colors, so it outputs the color codes.

I’ve switched to terminal vim (which supports colors, at least with iTerm), but using the version of vim that comes with MacVim, which is more up-to-date and is compiled with ruby support (among other things). The easiest way to do that is:

brew install macvim --override-system-vim 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:22:28+00:00Added an answer on June 1, 2026 at 12:22 pm

    MacVim doesn’t know how to display colors. Terminal vim will display the colors correctly, or you can add –no-color to your rspec command (or a .rspec file). I’m not sure about the -1H thing. Maybe some customization you have for your terminal?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using MacVim & have gotten used to it but my main
I am using MacVim to convert cs files to HTML. The convert function works
I'm using the latest MacVim. Is there any way to have it so if
Using MVC2 I have an AJAX form which is posting to a bound model.
I am using MacVim and have colours set on .html documents. I working on
I'm trying to open a file using MacVim 7.3 (53) from the command line
I'm using (mac)vim with tex-suite and would like to have a single regex command
I'm using Mac Lion 10.7.1, MacVim Snapshot 61, Vim version 7.3 I want to
I usually use macvim, and have a number of key bindings using my macs
I'm using macvim with the janus plugin that includes nerdtree with it. The issue

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.