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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:23:44+00:00 2026-05-31T04:23:44+00:00

I may have a unique situation here. I want gVim (gui version, in Linux)

  • 0

I may have a unique situation here. I want gVim (gui version, in Linux) to keep concealed characters concealed no matter what, even when the cursor is on that line or that character gets selected. (It should be as close to if the characters never existed as possible.) Currently the concealed characters show themselves when the cursor enters that line, which causes text to jump around when scrolling and when selecting text.

We are using gView (read-only gVim) to view logs, so as to take advantage of its robust syntax highlighting. Problem is, these logs contain lots of escape characters and TTY color codes, that make reading difficult. (^[33mSomeText^[0m)

I’m using this line to hide them:

syntax match Ignore /\%o33\[[0-9]\{0,5}m/ conceal

Since the files are viewed by non-vim-experts, it looks glitchy and broken when the text un-conceals itself. (And also looks glitchy and broken if the color codes are present, and also looks glitchy and broken if the color codes are blacked-out to become invisible, but still show when selected and appear after copy/paste.)

This should be fine because these files are opened read-only in gview, with an extra set nomodifiable making it even more difficult to save the file. While it’s possible to edit and attempt to save the logs, doing so is considered both an invalid thing to do, and a harmless thing to do, and requires enough Vim skills that if someone manages to edit a file they know what they’re doing. The problem with being able to edit a line with concealed text does not apply.

If 'conceal' can’t be configured to keep hidden text hidden no matter what, an acceptable alternative would be to replace the TTY color codes with whitespace when the file gets opened. But, this has to be done in read-only mode, and we can’t have gview throwing up a save dialog on closing the window because the file has been modified by its .vimrc.

Note: I am in full control of the .vim script file sourced when these are read, but cannot control the existence of the TTY color codes or the code that opens the log files in gview. (i.e. I can’t pass it through sed or anything like that.) The ideal solution is anything that can transparently nuke the color codes from within a .vimrc, but I’ll hear any suggestions. The 'conceal' feature is just my most promising lead.

So, any ideas how to permanently get rid of these on file view without dialogs popping up on close?

  • 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-31T04:23:45+00:00Added an answer on May 31, 2026 at 4:23 am

    :help conceal

    When the “conceal” argument is given, the item is marked as concealable.
    Whether or not it is actually concealed depends on the value of the
    ‘conceallevel’ option. The ‘concealcursor’ option is used to decide whether
    concealable items in the current line are displayed unconcealed to be able to
    edit the line.

    :help concealcursor

    Sets the modes in which text in the cursor line can also be concealed.
    When the current mode is listed then concealing happens just like in
    other lines.

    • n Normal mode
    • v Visual mode
    • i Insert mode
    • c Command line editing, for ‘incsearch’

    ‘v’ applies to all lines in the Visual area, not only the cursor.
    A useful value is “nc”. This is used in help files. So long as you
    are moving around text is concealed, but when starting to insert text
    or selecting a Visual area the concealed text is displayed, so that
    you can see what you are doing.
    Keep in mind that the cursor position is not always where it’s
    displayed. E.g., when moving vertically it may change column.

    Also, :help conceallevel

    Determine how text with the “conceal” syntax attribute |:syn-conceal|
    is shown:

    Value Effect ~

    • 0 Text is shown normally
    • 1 Each block of concealed text is replaced with one
      character. If the syntax item does not have a custom
      replacement character defined (see |:syn-cchar|) the
      character defined in ‘listchars’ is used (default is a
      space).
      It is highlighted with the “Conceal” highlight group.
    • 2 Concealed text is completely hidden unless it has a
      custom replacement character defined (see
      |:syn-cchar|).
    • 3 Concealed text is completely hidden.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have table with a unique auto-incremental primary key. Over time, entries may be
I want to have unique object ids over whole database. Is there any built-in
Warning: I may have the wrong 'problem statement' but here it goes: A Campaign
I want an index on a non-primary key column, but this column may have
I'm trying to keep track of a set of files, which may have the
We have a situation where we want to define a relationship where a class
Situation: In my database I have a table in which records may reference other
I have a custom Shape - MyShape - (may be control, does not matter).
I am designing a Web application that we estimate may have about 1500 unique
I have a unique situation where I need to produce hashes on the fly.

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.