Code Monkey home page Code Monkey logo

codemirror-plugin's People

Contributors

sergeche avatar tholman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

codemirror-plugin's Issues

abbreviation preview doesn't work

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?

No 'dist' folder

Repository didn't contains a 'dist' folder, how can i make emmet work on codemirror then?

Preview not close on change instance

image

image

I working with codemirror 5.2 and stand alone mode with Browser.js
I suggest add the events swapDoc and Blur
editor.on('blur', () => proxy.hidePreview()); editor.on('swapDoc', () => proxy.hidePreview());
Any suggestions?

Tab-expanding dash-separated properties

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;
}

the plugin does not work well

It's been a while since the plugin looks like this and I don't know why

image

this is my package.json

image

my code is exactly the same as shown in their documentation

react-codemirror2

please show me how to connect it with react-codemirror2. I make mistakes...
image
image

Minifying with uglify fails because build doesn't target ES5

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.

CodeMirror 5 + Sublime Text Key Bindings + Multiple Selections =

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:

CleanShot.2021-06-22.at.05.52.22.mp4

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:

CleanShot.2021-06-22.at.05.54.24.mp4

It looks like maybe Emmet's tag-matching thing is catching the second-and-beyond selection?

Emmet html5

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>

Adding Emmet to already initialized CodeMirror

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!

Custom Snippet Breakage

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.

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.