https://github.com/b1f6c1c4/no-evil-eol-newline
Hide the last 'new line' in Atom, just like vim does.
https://github.com/b1f6c1c4/no-evil-eol-newline
atom eol line-numbers newline vim
Last synced: 11 months ago
JSON representation
Hide the last 'new line' in Atom, just like vim does.
- Host: GitHub
- URL: https://github.com/b1f6c1c4/no-evil-eol-newline
- Owner: b1f6c1c4
- License: mit
- Created: 2018-03-18T10:45:21.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T21:52:40.000Z (almost 3 years ago)
- Last Synced: 2025-04-04T22:23:48.906Z (about 1 year ago)
- Topics: atom, eol, line-numbers, newline, vim
- Language: JavaScript
- Homepage:
- Size: 544 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# no-evil-eol-newline
[   ](https://atom.io/packages/no-evil-eol-newline)
> Hide the last 'new line', just like Vim and GitHub.
[:arrow_right: Link to the package on APM on atom.io :arrow_left:](https://atom.io/packages/no-evil-eol-newline)

# 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](https://github.com/atom/atom/issues/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.