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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:42:50+00:00 2026-06-14T22:42:50+00:00

If there are lines in a file that are too long to be displayed

  • 0

If there are lines in a file that are too long to be displayed on the screen, we can use word wrap. Now long lines are split into chunks visible on the screen.

Usually the code is structured and indenting is used for readability. If a line is wrapped into two (or more) lines, only the first line has right indenting and the other lines begin at the beginning of a row. Is there a way to keep all of the wrapped lines with the same indent level (or more generally different indent level)?

I have searched for a long long time, but still couldn’t find a solution. This question is similar to a post for vim, but I didn’t find a post or answer for emacs.

  • 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-14T22:42:51+00:00Added an answer on June 14, 2026 at 10:42 pm

    The package adaptive-wrap, which can be installed via the ELPA packaging system, should do what you want.

    After having installed the package, just run the following commands:

    • M-xvisual-line-modeRET (to wrap long lines)
    • M-xadaptive-wrap-prefix-modeRET (to make wrapped lines indent nicely)

    I also have the following snippet in my init.el file to automatically activate adaptive-wrap-prefix-mode along with visual-line-mode:

    (when (fboundp 'adaptive-wrap-prefix-mode)
      (defun my-activate-adaptive-wrap-prefix-mode ()
        "Toggle `visual-line-mode' and `adaptive-wrap-prefix-mode' simultaneously."
        (adaptive-wrap-prefix-mode (if visual-line-mode 1 -1)))
      (add-hook 'visual-line-mode-hook 'my-activate-adaptive-wrap-prefix-mode))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If there are lines in a file that are too long to be displayed
So lets say there's a server process that takes way too long. The client
I have a file that has fairly long lines. The longest line has length
I have a txt file that created in notepad , containing these lines for
Is there any way to copy all lines from open file to clipboard in
Is there a one-liner to read all the lines of a file in Python,
Summary : is there a way to get the unique lines from a file
I have a huge log file where there are about 15 million lines. I
I have a txt file that I’m trying to import as flat file into
I have a bad habit of writing lines of code that are too damn

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.