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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:44:08+00:00 2026-05-11T22:44:08+00:00

I have an editor I am attempting to emulate that has some very nice

  • 0

I have an editor I am attempting to emulate that has some very nice features. One feature of the editor is to hide lines of a file (similar to a fold but without decorations) and apply commands operations only to those lines which remain visible. The hidden lines can then be brough back.
For example the user sees

    Smurf
    Apple
    Bubble
    Tree
    Dog

The user says show-non-matching-lines (SNML) e

    Smurf
    Dog

The user runs a command paste-after-line (PAL) followed by a token, $ say, and gets

    Smurf$
    Dog$

The user says show-all-lines (SAL)

    Smurf$
    Apple
    Bubble
    Tree
    Dog$

I know this is doable in VIM but I am at a loss at how to store per line properties without resorting to modifying the lines in some way. Please nudge me in the right direction or way of thinking…

Update:
Using

:set foldtext=MyFoldingFunction

I can manipulate how text is folded with help from the following variables

v:foldstart Line num of 1st folded line 
v:foldend Line num of last folded line

I guess I would have to enumerate all the folds while applying functions as I am applying text formatting and figure out if a line is folded away. I really want a method to store per line properties in vim… I guess I am out in the dark corners here.

  • 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-11T22:44:08+00:00Added an answer on May 11, 2026 at 10:44 pm

    folddoopen does what you want; it executes some command on every line that isn’t part of a closed fold. To append a $ to every line that isn’t currently folded, you can do

    :foldd norm A$
    

    See :h folddoopen and :h folddocclosed. It doesn’t completely “hide” the folded text, you can still see the fold markers, but it’s pretty close.

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

Sidebar

Related Questions

I have a domain model that has the concept of an Editor and a
i have an editor that is basic microsoft actions: createlink bold etc. i made
I have ace editor integrated in my site. I have some code there, and
I have an editor that built as follows: EditorBuilder builder = context.Html.Telerik().Editor() .Name(ID) .Encode(false)
Hi I have text editor widget in smalltalk (visual works) that returns a text
I'm using Subversion to checkin a file on OSX. I have my EDITOR variable
I have a working rails 3.1 application that uses the mercury wysiwyg editor, however
Let's say I have a Student and a School table. One operation that I
I am attempting to develop an application that makes use of some simple trig
I am attempting to write some code to read in a *.CSPROJ file using

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.