pulsar/packages/line-ending-selector
2023-01-10 22:36:54 -03:00
..
lib Line ending selector refactor (#20542) 2021-01-25 19:10:31 +03:00
spec Fixed specs on grammar and line ending 2023-01-10 22:36:54 -03:00
.gitattributes ➡️ Migrate core package 'line-ending-selector' into ./packages (#18239) 2018-10-16 17:36:59 -04:00
.gitignore ➡️ Migrate core package 'line-ending-selector' into ./packages (#18239) 2018-10-16 17:36:59 -04:00
package-lock.json add or update packages/*/package-lock.json 2022-12-10 19:13:50 +01:00
package.json remove 'standard' linter from packages 2022-11-19 17:12:43 +01:00
README.md rebrand and relicence 2022-12-03 02:46:08 +00:00

Line Ending Selector package

status bar tile

This is an Pulsar package that displays the current line ending type of a file: CRLF (Windows), LF (Unix), or Mixed (both). It also lets you change the line ending of a file.

To Use

When the package is activated it will show the current line ending of the file in the right side of the status-bar. If a new file is created the line ending will start with the system default: CRLF for Windows, LF for Mac and Linux, and CR for old-style Mac files. If a file contains multiple line-ending types it will display Mixed.

Changing a File's Line Ending

You can click the line ending in the status-bar to open a modal with the line ending options. Selecting a different line ending will change each line of the file in the active editor.

modal

Line Endings

  • LF is "\n"
  • CRLF is "\r\n"

Note: Because the CR line ending style is not used in any modern operating system, this package only supports converting from CR line endings not to it.

Pulsar Commands

You can also change a file's line endings by using or cmd-shift-P searching for these commands:

line-ending-selector:convert-to-LF
line-ending-selector:convert-to-CRLF