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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:57:05+00:00 2026-06-12T13:57:05+00:00

Now my folded lines look like this: +– 123 lines: doSomeStuff();————————– +– 345 lines:

  • 0

Now my folded lines look like this:

+-- 123 lines: doSomeStuff();--------------------------
+-- 345 lines: doSomeOtherStuff();---------------------

I would like to remove everything before the actual contents of a line (+– xxx lines:), make it more like Notepad++/Eclipse visuals way — now it’s too hard to read, and I actually don’t care how much lines I have under a certain fold 🙂 So are there any commands for adjusting the format of folded lines?

  • 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-12T13:57:07+00:00Added an answer on June 12, 2026 at 1:57 pm

    Yes, foldtext function which romainl already mentioned returns a string to be displayed in a closed fold (in other words, that – what you see).

    You can modify the fold function to show whatever you find interesting. For example,

    function! MyFoldText() " {{{
        let line = getline(v:foldstart)
    
        let nucolwidth = &fdc + &number * &numberwidth
        let windowwidth = winwidth(0) - nucolwidth - 3
        let foldedlinecount = v:foldend - v:foldstart
    
        " expand tabs into spaces
        let onetab = strpart('          ', 0, &tabstop)
        let line = substitute(line, '\t', onetab, 'g')
    
        let line = strpart(line, 0, windowwidth - 2 -len(foldedlinecount))
        let fillcharcount = windowwidth - len(line) - len(foldedlinecount)
        return line . '…' . repeat(" ",fillcharcount) . foldedlinecount . '…' . ' '
    endfunction " }}}
    set foldtext=MyFoldText()
    

    will return something similar to this

    " Basic settings --------------------------------------------- {{{...              6 ...
    

    meaning 6 lines are in the fold (including the one with the closing fold marker)

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

Sidebar

Related Questions

So some code in MainApp.py goes like this, the lines I am concerned about
I made changes to my Vagrantfile (added config.vm.share_folder , config.vm.customize lines) and now I
I don't want to submit projectname.project folder. Now, I use like that git add
i have a question on lines 26 & 27: String dumb = input.nextLine(); output.println(dumb.replaceAll(REMOVE,
I have a file structure like this: 00000010 000000001.file1 000000001.file2 00000020 00000003.file1 00000003.file2 00000003.file3
I have a file that has over 200 lines in this format: name old_id
So i've been at this for 2 days now and i cannot get it
Now I want to export a image in my Project to a folder ,
Every now and then I have a problem with SVN inside eclipse folder gets
I have just created a GIT on a folder. I now want to add

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.