Skip to content

(MIRROR) Ruler extension for CodeMirror 6

License

Notifications You must be signed in to change notification settings

cookshack/codemirror-ruler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@cookshack/codemirror-ruler

Ruler extension for CodeMirror 6.

Draws a vertical line at a certain column.

Options

Name Default
col 100 The column at which the line will be drawn.

Use .cm-ruler-w to style the line.

Example

import * as Ruler from '@cookshack/codemirror-ruler'
window.view = new EditorView({
  extensions: [ Ruler.make({ col: 80 }).exts, ...
.cm-ruler-w > div.cm-ruler-vert {
  border-left-width: 2px;
  border-left-color: var(--clr-fill);
}

Build from source

$ npm i # only needed first time
$ npm run prepare

About

(MIRROR) Ruler extension for CodeMirror 6

Resources

License

Stars

Watchers

Forks