symex.el
vim-sexp-mappings-for-regular-peopl
symex.el | vim-sexp-mappings-for-regular-peopl | |
---|---|---|
18 | 4 | |
255 | - | |
1.2% | - | |
6.2 | - | |
16 days ago | - | |
Emacs Lisp | ||
GNU General Public License v3.0 or later | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
symex.el
-
Sapling: A highly experimental vi-inspired editor where you edit code, not text
I also recommend symex[1]. Although it is more “locked-in” to s-expressions than other solutions (which takes some getting used to at first), I find that for me this is exactly what makes movement feel much more intuitive and editing much more precise.
The one thing I don’t like is that symex depends on so many other plugins (especially Evil, which I am trying to swap out with the more lightweight meow), but this will apparently change soon. They are also working towards support for non-Lisp languages via tree-sitter, but I don’t know how well it works.
[1]: https://github.com/drym-org/symex.el
-
We've launched Attribution Based Economics
The pilot projects (including Symex.el) are accepting financial contributions and will distribute them to sources of value including contributors and antecedent projects in a process that we all have a say in.
-
Tree-sitter starter guide
This is a really useful synopsis. symex has recently had TS support merged in, and apparently includes navigation and structural editing similar to its lisp-like language capabilities. I think it's still early going and I haven't tested, but may be worth a look.
- Learn Lisp the Hard Way
-
What modal sexp editing mode should I switch to?
Has anyone used symex.el without evil? I just learned it can be use with vanilla emacs (despite the 2nd word in its tagline). I also learned they have a tree-sitter branch which will expand its powers to many languages.
-
Advice on config hacking / yak shaving / bikeshedding
I started out using evil, but now I mostly use Symex. (Structural editing. non-lisps support wip for those sad moments you can't use lisp). For now depends on evil, but could be separated.
-
You are invited to the First Congress for Attribution-Based Economics!
The purpose of this congress is to engage in the process of Dialectical Inheritance Attribution, which is a collective process by which we apply agreed-upon standards to the task of appraising and attributing the value of work done in the world. At this initial congress, there are two open source projects on the agenda to be appraised: Symex.el which is an Emacs extension, and Qi, which is a functional DSL on the Racket platform.
- symex.el: An evil way to edit Lisp symbolic expressions ("symexes") as trees in Emacs
-
paredit based on treesitter
symex has a branch that’s been working on integrating with tree-sitter.
-
Paredit 25 Released
If you want to go nuts with structural editing you may also want to check out symex mode: https://github.com/drym-org/symex.el
It uses paredit (among others) for its low level functionality, but the vim-style modal interface allows you to manipulate the tree structure with single keystrokes in a precise and very expressive way. Keep in mind that you have to actively learn how to use it and it will feel awkward at first (similar to how vim feels for beginners), but I find the editing experience very pleasent and smooth after I got used to it.
Another thing I really like about it is that you can still switch to normal mode and it doesn’t get in your way like other plugins where I had to change my keybindings all the time because the amount of convenient shortcuts is still quite limited in the end. This modal switching to different editing contexts (or languages?) is something I feel should be explored much further.
vim-sexp-mappings-for-regular-peopl
-
Paredit 25 Released
I'm a vim user and generally dislike tools typing for me at the same time that I'm typing. I've gotten some value from https://github.com/tpope/vim-sexp-mappings-for-regular-peopl... though when writing Lisp.
-
Paredit Mnemonics for Slurping and Barfing Lisp Symbolic Expressions
vim-sexp-mappings-for-regular-people [1] uses really easy-to-remember shortcuts for these:
- "backward slurp" is "<(" (move opening paren to the left)
- "forward slurp" is ">)" (move closing paren to the right)
- "forward barf" is "<)" (move closing paren to the left)
- "backward barf" is ">(" (move opening paren to the right)
[1]: https://github.com/tpope/vim-sexp-mappings-for-regular-peopl...
-
Running Lisp in Production – Grammarly Engineering Blog
I think the paredit stuff is a bit overblown but apart from managing parens for you, another simple example is editing single expressions. e.g. in Java you might have a line: "int a = blah.bar(something, thing, whatever);" If you realize you need to actually pass "whatever" first, not last, unless you know an IDE shortcut that can make the edit for you, you're going to have to type stuff. I would probably just move my cursor to the start, type "whatever, ", move my cursor to the comma after "thing" and highlight to the end then delete. If "whatever" was a longer variable, or even more interestingly an entire sub-function call like "whatever(x, y, z)", I might instead highlight it all, cut, backspace the comma, move cursor to the start, paste, type a comma. Oh no, I might miss a comma or somehow mess up a paren/semicolon or typo a name?! Whatever, it's rare for me, and for most mistakes I'd get a red squiggly alerting me to it immediately. I like typing, and prefer most 'helpful' plugins get out of my way for most things, so such a process isn't that annoying to me.
But I do at least see there's a nicer process if you have something like paredit: you just move you cursor to the "whatever" (even if it's instead "whatever(a,b,c)") and a command will move it to the left/right/etc. and fix up anything that needs fixing up. In Lisp though the base syntax is so simple and uniform that there's not usually much needing "fixing up" -- there's no pesky commas to deal with for instance, and having the opening paren come in front of the function name instead of after simplifies a lot of things. The worst is adding/removing/moving a form that's at the end of a let binding, or perhaps sometimes adding something to the end of a function that previously ended with ))).
I like to use vim (which does have paredit though I have it disabled) and just having the ability to jump between open/close parens by pressing "%" and to cut jumps as a whole, or the insides, without having to move my cursor character by character, is good enough for me. I still use some paredit-like commands in some instances like moving forms around or in those "worst case issues" I mentioned but I use them with these mappings: https://github.com/tpope/vim-sexp-mappings-for-regular-peopl...
There are more advanced things but how much I care about them varies; I don't tend to need them for Lisp, though every so often I'll miss something from Eclipse that I suspect not even emacs does (or does well). e.g. I know emacs can do a "templateized" completion just like a Java IDE when you type a function name and insert its arguments as placeholder variables to later define/type over, I don't know though whether emacs can then let you place the cursor over each one in turn and with something as easy as 'ctrl+1' hoist that var to an assignment form just above (I did this all the time in Eclipse to avoid having to choose a name, type it, and type its correct type). (In Lisp it's complicated by needing to introduce a let binding if it doesn't exist or append to one if it does. It wouldn't surprise me if paredit can do this, it's just that I'm aware of some refactoring tools in Slime but they don't tend to approach what Eclipse or IntelliJ users expect even if in theory they could.)
-
Lisp as an Alternative to Java (2000)
Slimv comes with a Paredit Mode: https://github.com/kovisoft/slimv Personally I leave it off, though, never been a fan of anything trying to 'help' me automatically while I'm typing apart from indentation. I do appreciate vim-sexp occasionally with these mappings: https://github.com/tpope/vim-sexp-mappings-for-regular-peopl...
https://susam.in/blog/lisp-in-vim-with-slimv-or-vlime/ is a good overview of the differences between slimv and vlime (the two vim plugins) and how to use them.
What are some alternatives?
lispy - Short and sweet LISP editing
vim-sexp-mappings-for-regular-people - vim-sexp mappings for regular people
elisp-tree-sitter - Emacs Lisp bindings for tree-sitter
vscode-emacs-mcx - Awesome Emacs Keymap - VSCode emacs keybinding with multi cursor support
smartparens - Minor mode for Emacs that deals with parens pairs and tries to be smart about it.
grpc - gRPC implementation for Common Lisp
gopcaml-mode
slimv - Official mirror of Slimv versions released on vim.org
emacs - Mirror of GNU Emacs
tls1.3 - A Common Lisp implementation of TLS1.3
typescript.el - TypeScript-support for Emacs
awesome-cl - A curated list of awesome Common Lisp frameworks, libraries and other shiny stuff.