vim-sexp-mappings-for-regular-people
portacle
vim-sexp-mappings-for-regular-people | portacle | |
---|---|---|
6 | 37 | |
424 | 681 | |
- | 1.0% | |
0.0 | 3.6 | |
over 1 year ago | 6 months ago | |
Vim Script | Shell | |
- | zlib License |
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.
vim-sexp-mappings-for-regular-people
-
Vim function to move following word into parentheses?
The vim-sexp plugin does slurping and barfing of s-expressions. When I used it years ago with Clojure, c/o of tpope's fireplace plugin, I preferred his mappings for it.
-
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.)
-
VIM?
I use vim with slimv, paredit turned off but a few bindings from https://github.com/tpope/vim-sexp-mappings-for-regular-people are useful.
-
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.
portacle
-
An Exploration of SBCL Internals (2020)
I agree that it's a hurdle.
Portacle, https://portacle.github.io/ , is a way around config and whatnot, lowering the threshold a little.
-
Selling Lisp by the Pound
Reminder that Portacle is a way to try Common Lisp (and its tooling!) in a portable, self-contained way, on all platforms.
https://portacle.github.io/
-
plain-common-lisp: a lightweight framework created to make it easier for software developers to develop and distribute Common Lisp applications on Microsoft Windows
Thanks for your work! I can definitely see how your project improve CL's accessibility. Not sure if you're aware of the Portacle project, but I think there is an opportunity merging two projects together.
-
Emacs4CL: A 50 line DIY kit to set up vanilla Emacs for Common Lisp
Also it is not much of a kit either since the user is left to install all the tools on their own. User who wants an easy to start kit with Emacs baked in is much better using Portacle or clean Emacs, or some of more polished Emacs distributions like Doom or Prelude together with Roswell for the "kit" part.
- Portacle
-
15 Best Lisp Courses to Take in 2023, for Emacs Lisp, Common Lisp, Scheme and Racket, by ClassCentral -featuring System Crafters
Then there's Portacle, a portable Emacs with SBCL, Quicklisp and Emacs goodies (magit, file-tree…) pre-installed. https://portacle.github.io/
-
What are your opinions on these three books?
There are some updates about Portacle last year. The latest is 1.4c Pre-release. https://github.com/portacle/portacle/releases Without Mac, can not verify it.
-
So i wanna learn Common Lisp
See also Portacle: https://portacle.github.io/ It is a portable Emacs that is ready-to-use for CL: it comes with Slime, some Emacs packages, Quicklisp and git.
-
How to learn Lisp?
Others have covered the language, but you'll also want tooling. An easy one to get started with is Portacle. It's a Lisp compiler, emacs with Lisp plugins, QuickLisp package manager, etc. so you don't have to spend time setting it all up.
-
Trying to get into Lisp, Feeling overwhelmed
1) I also love VSCode ... but for Lisp Emacs really is so much better. Look at Portacle. It basically is Emacs that's well configured for Common Lisp with SBCL right out of the box. You'll have to learn how SLIME work (the shortcuts to recompile running Lisp, etc).
What are some alternatives?
parinfer-rust-mode - Simplifying how you write Lisp
awesome-lisp-companies - Awesome Lisp Companies
doom-emacs - An Emacs framework for the stubborn martian hacker [Moved to: https://github.com/doomemacs/doomemacs]
slime - The Superior Lisp Interaction Mode for Emacs
paredit - Official mirror of Paredit versions released on vim.org
evil - The extensible vi layer for Emacs.
slimv - Official mirror of Slimv versions released on vim.org
emacs4cl - A tiny DIY kit to set up vanilla Emacs for Common Lisp programming
emacs
sbcl - Mirror of Steel Bank Common Lisp (SBCL)'s official repository
vim-slime - A vim plugin to give you some slime. (Emacs)
sly - Sylvester the Cat's Common Lisp IDE