mkleehammer / surround Goto Github PK
View Code? Open in Web Editor NEWAn Emacs package for inserting, changing, and, deleting surrounding pairs of quotes, braces, etc.
License: MIT License
An Emacs package for inserting, changing, and, deleting surrounding pairs of quotes, braces, etc.
License: MIT License
NOTE: I've not started working on this, so if this is a problem for you, please upvote this by adding a comment or an emoji.
The current algorithm for nested pairs (those where the open and close are different, like parens and braces) simply counts open and cloes as it finds them. But it could be smarter by paying attention to the syntax of each character (ppss).
For example:
(message "finding (, huh?")
---------
If the cursor is anywhere past the paren inside the string, it will incorrectly identify the underlined portion as the pair instead of matching with the first paren before "message".
For this particular case, it would work if we use syntax-ppss and note that we started outside of a string, so we should ignore the paren inside the string. Would work for skipping over comments too.
On a similar note, we could figure out which direction to search for quotes. If we are on a closing quote in a comment and the next quote is not in a comment, we should try the other direction.
To reproduce: M-' i [
[blah]
^
For example given the text (foo)
. When the point is at the opening brace and I call surround-delete
or surround-change
, I only get a message: surround--find-char-nestable: Did not find (
This is true for (
, [
and {
, but it does work for "
and '
.
what's pros and cons with https://github.com/casouri/isolate ?
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.