Skip to content

Add guide line for line length #416

Closed

Description

@bob-tee

There are times when I write markdown documents that I need to format the lines to be equal to or less than 80 characters. I see there is a helpful column count on the bottom right. In addition to this it would be useful to have a configurable guide line similar to the line shown in Netbeans. Like in this image:

https://i.stack.imgur.com/VE46n.png

Activity

  1. cyanzhong commented on Nov 24, 2023

    @cyanzhong
    Contributor

    Thanks for the feedback. That's a useful feature, but I am hesitant to add more settings to the app.

    However, with the customization capability (learn more). I think you should be able to add a guide line easily:

    /* editor.js */
    
    const div = document.createElement('div');
    div.className = 'cm-md-guideLine';
    document.body.appendChild(div);
    /* editor.css */
    
    .cm-md-guideLine {
      border-left: 1px solid #ccc;
      position: absolute;
      top: 0;
      left: 640px;
      height: 100%;
    }
    
    @media (prefers-color-scheme: dark) {
      .cm-md-guideLine {
        border-left-color: #666;
      }
    }

    These values are completely configurable.

  2. bob-tee commented on Nov 24, 2023

    @bob-tee
    Author

    Great, thank you! that seems to work ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions