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 8742855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:34:22+00:00 2026-06-13T11:34:22+00:00

So I found this solution on StackOverflow here: Vim 80 column layout concerns If

  • 0

So I found this solution on StackOverflow here: Vim 80 column layout concerns

If I type a long line in my file, I would like the characters that exceed a limit of 80 characters to be highlighted. A lot of people seem to think that this solution works fine, but I have it in my vimrc file and it behaves as though nothing has changed at all. My long lines do not get highlighted.

highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/

For reference, here is my entire .vimrc, which isn’t that long:

" You'll need to add the following to your ~/.vimrc so that pathogen will be loaded
" properly. Filetype detection must be off when you run the commands so its best to
" You'll need to add the following to your ~/.vimrc so that pathogen will be loaded
" execute them first:
"filetype off
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
"filetype on

syntax on

let mapleader = ","
let g:CommandTMaxHeight=25
imap ii <Esc>

map <S-Enter> O<Esc>
map <CR> o<Esc>

set guioptions-=T
set guioptions-=r

set hlsearch
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%79v.\+/
set nocompatible
set ruler
set number
set shellcmdflag=-ic
set list
set expandtab
set tabstop=4
set softtabstop=4
nmap <C-k> ddkP
nmap <C-j> ddp
vmap <C-k> xkP`[V`]
vmap <C-j> xp`[V`]

au! BufWritePost vimrc source %
colorscheme vividchalk
  • 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-13T11:34:23+00:00Added an answer on June 13, 2026 at 11:34 am

    From: https://stackoverflow.com/a/10993757/1701170

    augroup vimrc_autocmds
      autocmd BufEnter * highlight OverLength ctermbg=darkgrey guibg=#111111
      autocmd BufEnter * match OverLength /\%75v.*/
    augroup END
    

    This works for me whereas the solution I had before does not. I’m not exactly sure why, but another commenter on the page offers a hint when he remarks, regarding the solution without opening and closing augroup lines, “This only works for the first file you open in any given buffer”.

    Now if someone could explain why the additional opening and closing lines solve that first-file-in-any-given-buffer problem, and why that problem exists in the first place, then I would feel enlightened.

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

Sidebar

Related Questions

So I want to show random divs, and I found this stackoverflow solution here:
I am using this solution found on stackoverflow to encode my MYSQL output to
I found this link to a page here on StackOverflow about Creating Audio using
I know people asked this before and I found this solution: for (UIView *subview
I searched for an implementation of std::map runtime ordering and have found this solution:
I've search for some solution to my problem and I found this link .
I found the solution for this question in C# , but I can't translate
I have been searching for a solution to this and so far found nothing
Edited to Add * I haven't found a solution for this one yet, can
I've been looking around for a solution to this thing but I haven't found

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.