There's a random line going through my code in Geany, and it persists to stay there upon restarting the application. How do I remove it?

Screenshot: enter image description here

  • Which one is the random line? Do you have the line in the document when you open it in some other text editor, gedit perhaps? – Varaquilex Dec 24 '13 at 17:07
  • The random vertical line near the right side. This only happens in this application. – zeldarulez Dec 24 '13 at 17:39

Edit > Peferences > Editor > Display and there, deactivate the long line marker (Umbruchhilfe)

The line is, btw, not random but it marks the 80 characters limit - which is e.g. still used for Linux-Kernel code.

  • 7
    Edit>Preferences>Editor>Display>"Untick" the option "Long Line Marker" [for latest release 1.22 by the moment] – Cody Aug 14 '14 at 7:20
  • Why is a Linux kernel development practice the default? Or even worse, why is the option to disable it hidden away in so many submenus instead of having it 2 clicks away in the View menu, like toggling line numbers? – AlexRamallo Jun 24 '19 at 15:55

It's a text editor, so they're showing you where the (old standard) 72-character line break would be (in case you had line-break turned on, or plan to open the text file in a legacy text editor).

More info:

Wikipedia - Characters Per Line:

At the end of the typewriter age, most designs were geared toward 72 CPL, derived from a pitch of 12 characters per inch, multiplied by 6 inches (see for example IBM Selectric). This would ensure at least 1 inch for each margin, with the U.S. government at the time having standardized on 8 1/2×11" paper. Early computer text editors used this measure as a baseline for their terminal interfaces.

Geany's docs:

Line breaking column - The editor column number to insert a newline at when Line Breaking is enabled for the current document.

enter image description here

It doesn't look like there's a specific option to turn the indicator off, but perhaps setting it to column 0, or to something like 5000 might keep it out of sight at least. :)

  • +1 for beating me by 6 seconds, and with a screenshot too. :) – Ilmari Karonen Dec 24 '13 at 18:00

The line breaker can be turned off by navigating to: Edit>Preferences>Editor>Display>"Untick" the box named "Long Line Marker"

enter image description here

  • 2
    this is the way for the latest release ! – Cody Aug 14 '14 at 7:18

I don't know how to get rid of the line, but I can guess why it's there.

If I'm counting the characters in your screenshot right, the line seems to be placed after column 72, which has traditionally been considered the maximum "safe" line length. Many text editors, if told to wrap lines, will do so at 72 characters per line by default.

Obviously, your editor isn't doing so (at least not in the mode you're using), but it's warning you that any lines of code that extend past that column might be too long to be viewed on one line without scrolling or wrapping in some cases (e.g. on a 80-column terminal, with a few columns taken up by line numbers).

You can probably turn off the warning line, or adjust its position, in your editor's settings.

See also:


That, my friend, is the vertical line for 72 characters (Thanks for mentioning @techie007). It's a coding convention for wrapping the line for better readability. There are also other conventions, one of them originates from IBM's punch cards, as explained in this programmers.stackexchange question.

Wikipedia mentions the 80 character limit too.

Cultural Impact

  • A legacy of the 80 column punched card format is that a display of 80 characters per row was a common choice in the design of character-based terminals. As of November 2011 some character interface defaults, such as the command prompt window's width in Microsoft Windows, remain set at 80 columns and some file formats, such as FITS, still use 80-character card images.
  • 1
    I counted, it's not at the 80th col. ;) – Ƭᴇcʜιᴇ007 Dec 24 '13 at 18:01
  • That is why you get a +1 from me :P – Varaquilex Dec 24 '13 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.