emmetio / codemirror-plugin Goto Github PK
View Code? Open in Web Editor NEWEmmet plugin for CodeMirror web editor
License: MIT License
Emmet plugin for CodeMirror web editor
License: MIT License
I have a project using codemirror and emmetio which uses some other functionality from codemirror.
The preview of abbreviation does not show up.
I have tried removing all extra functinality except for syntax highlighting and sublime however that did not work (emmet didn't even work at all without syntax highlighting)
there are no errors and i can use emmet as usual just without the preview.
help?
<div>1</div>
in the HTML>1</div
with cursorCan reproduce at http://download.emmet.io/codemirror/index.html
Repository didn't contains a 'dist' folder, how can i make emmet work on codemirror then?
If you TAB after a fully-written CSS property, it has weird effects:
body {
background-color[CURSOR]
}
Then press tab, you get:
body {
background: color;
}
Which is pretty weird, you'd think it would either do nothing since it's already expanded, or give you the more complete syntax like:
body {
background-color: #fff;
}
If I enter "p" + Tab it gives: '
p' . Is there anything wrong with the settings? Thanks.CodeMirror supports multiple cursors, so Emmet snippets could too!
Like:
width: ${1};\nheight: ${1};
I'm attempting to use this project in a project that uses Create React App, which uses Uglify when building. When I try to build I get the following error message
Failed to compile.
Failed to minify the code from this file:
./node_modules/@emmetio/stream-reader/dist/stream-reader.es.js:4
Read more here: http://bit.ly/2tRViJ9
The link in the error message is very instructive and explains the issue well. Basically Uglify needs code that is compiled to ES5 to work and codemirror-plugin doesn't do this
I have already forked codemirror-plugin and its dependencies and have begun the process of modifying them to target ES5, but it's slow going because I'm not familiar with rollup or mocha and I'm unable to get any of the tests to pass and I don't know if what I have at the end of it will be good enough to merge into this project.
So Command-D in "normal" emmet does outward-expansion. But in CodeMirror, if you turn on the official Sublime Text bindings:
https://codemirror.net/demo/sublime.html
Then Command-D gets replaced with "select next occurrence" (selectNextOccurrence
).
Because CodeMirror supports multiple selections/multiple cursors, that means you don't just have the original selection, but it keeps adding to the selection.
That's all fine, and so far working as expected:
But that's without Emmet.
I would test it here, but this demo doesn't have Sublime Text bindings on:
https://download.emmet.io/codemirror/index.html
On CodePen, we do (you have to turn on Sublime Text bindinds, and Emmet, in Editor Preferences).
When BOTH are active, in HTML specifically, something gets funky with line positions. You can see here:
It looks like maybe Emmet's tag-matching thing is catching the second-and-beyond selection?
Hello,
I to try generate html5 (!+tab), but get code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
</body>
</html>
How to get code like this?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>
Hello,
I'm coding a chrome extension to Shopify to add emmet to the built-in online editor.
The CodeMirror editor in there is already initialized and I'm grabbing it as so:
var $cm = document.querySelector('.CodeMirror').CodeMirror;
How could I initialize emmet using this existing instance without FromTextArea
?
Thanks!
A user of CodePen found that if you make a custom snippet that is essentially:
"gt": "grid-template: repeat(2,auto) / repeat(auto-fit, minmax(250px, 1fr))"
Emmet 2 doesn't expand that but instead moves focus out of the editor.
Typing Uppercase
word incorrectly triggers abbreviation preview
Are there any plans to support codemirror 6?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.