Coder Social home page Coder Social logo

no-evil-eol-newline's Introduction

no-evil-eol-newline

APM APM APM GitHub code size in bytes

Hide the last 'new line', just like Vim and GitHub.

➡️ Link to the package on APM on atom.io ⬅️

Screenshot

Precondition

This package is meant for:

  • Vim enthusiastics - mostly previous vim users;
  • Unix fundamentalists - who think \n marks the termination of one single line, instead of acting as the separator between two lines.

You SHOULD NOT use this package if you think:

  • (Either) \n at the end of a file is totally heresy;
  • (Or) a new line MUST be displayed magnificently to indicate your fidelity of appending \n to each file you write.

Introduction

Suppress display of end-of-file newlines as blank lines. A temporal fix for Atom issue 7787. More precisely,

  • If a file ends with a \n, then the line number of the 'new line' is hidden (by css), just like what vim does.
  • If a file doesn't end with a \n, then the line number is shown in a bright color, indicating a missing \n.
  • Files that use \r\n as EOL simply work perfectly.

Attention: This package only deals with how things appear: it never modify any bit of your file content. Thus, this package:

  • Is compatible with whitespace, editorconfig, vim-mode-plus, and other packages.
  • Works consistently on Linux, macOS, and Windows.

no-evil-eol-newline's People

Contributors

b1f6c1c4 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

no-evil-eol-newline's Issues

HTMLElement.rootElement is deprecated.

I get

The contents of atom-text-editor elements are no longer encapsulated
within a shadow DOM boundary. Please, stop using rootElement and access
the editor contents directly instead.

HTMLElement.rootElement (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-element.js:23:10)
run (/Users/martin/.atom/packages/no-evil-eol-newline/lib/line-number-view.js:60:36)
LineNumberView.update (/Users/martin/.atom/packages/no-evil-eol-newline/lib/line-number-view.js:82:11)
new LineNumberView (/Users/martin/.atom/packages/no-evil-eol-newline/lib/line-number-view.js:47:10)
<unknown> (/Users/martin/.atom/packages/no-evil-eol-newline/lib/no-evil-eol-newline.js:23:16)
Workspace.observeTextEditors (<embedded>:28460:59)

when installing no-evil-eol-newline into Atom 1.25.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.