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

  • Home
  • SEARCH
  • 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 277115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T01:01:30+00:00 2026-05-12T01:01:30+00:00

I used textmate to work with ruby code for over one year. Recently I

  • 0

I used textmate to work with ruby code for over one year. Recently I switched to using mvim. When I open some of the files in mvim I get empty blocks. Look at this picture to get a feel for it.

Any idea on how to get rid of them?

Thanks

  • 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-05-12T01:01:31+00:00Added an answer on May 12, 2026 at 1:01 am

    Others have explained that this could either be a search highlighting spaces or tabs or (more likely) it could be highlight designed to show up mixed indentation (particularly useful in python for what it’s worth). I find this very useful personally.

    Anyway, there are a number of options to sort out your highlighting depending on the cause:

    To clean end of line spaces (as mentioned by chaos), use something like:

    :%s/ \+//
    

    Probably the most useful one: tidy up the tabbing:

    If you’re using spaces for indentation:

    :set expandtab
    :retab
    

    If you’re using tabs:

    :set noexpandtab
    :retab!
    

    If you’re using tabs for indentation and spaces elsewhere:

    :set expandtab
    :retab
    :set noexpandtab
    :execute '%s@^\( \{'.&ts.'}\)\+@\=repeat("\t", len(submatch(0))/'.&ts.')@'
    

    I have the last line mapped to a command called :RetabIndents. All of those assume that your tabstop setting is correct (it should be set with set ts=2 based on your picture). Personally, I’d also recommend keeping shiftwidth equal to tabstop, so set ts=2 sw=2.

    You may also be able to get away with a simple gg=G (auto-indent the whole file). However, this won’t work in some languages (in particular python as there’s no way for any editor to know which lines should be indented to which level).

    To switch off search-based highlighting temporarily:

    :noh
    

    Or permanently (put this in .vimrc):

    :set nohlsearch
    

    Or a quick shortcut for when you’ve used it and don’t want it anymore:

    :nnoremap <ESC> :noh<CR><ESC>
    

    To switch off indent highlighting, you’ll have to identify which highlighting group is used, which is a little complicated and is probably easiest to just read your .vimrc, but if you really want to search for it, move the cursor to one of the highlighted characters and enter (taken from here):

    :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
    

    You can then clear the highlighting group by searching for the name that is reported on the command line in your .vim/.vimrc/_vimrc/vimfiles configuration and commenting out anything relevant.

    For more information

    :help :s
    :help 'expandtab'
    :help :retab
    :help :execute
    :help 'tabstop'
    
    :help :noh
    :help 'hlsearch'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 210k
  • Answers 210k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer How about something simple like this <h2>Info you entered</h2> First… May 12, 2026 at 9:54 pm
  • Editorial Team
    Editorial Team added an answer This slowness is a known issue and is tracked in… May 12, 2026 at 9:54 pm
  • Editorial Team
    Editorial Team added an answer And indeed it was a buffering issue. It took me… May 12, 2026 at 9:54 pm

Related Questions

I'm starting a new job soon where I'm going to be developing in Ruby
I've used Textmate for a couple of years, but for Objective-C I'm finding that
So like many people, I'm excited about Ruby on Rails. Being a Windows user,
I come from an Emacs background, and I'm used to typing ^H to delete

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.