![]() ![]() ![]() Great stuff!įor those who are looking for this topic and don't want to run Slimv, because they aren't working with Common Lisp or other reasons, here is the scoop. So, this solution works well for me for most cases, and I didn't have to code (and maintain) anything. Although I'd say that this is more likely to be an issue with how the macro is written (non-standard language extension) than anything else. This seems to 'do the right thing' most of the time, but there are macros I use that still don't properly auto-format. Usually ones defined as a macro, using the &body keyword. I have found that this works well for a particular class of language extensions. And slimv can 'learn' new language extensions, as long as those macros are already loaded into the lisp core that the server session is using. Instead I leverage slimv to do the formatting for me. ![]() Instead of having to learn how to tell vim to indent particular functions properly, and writing the code that does this explicitly for each language extension that I define, and updating that code every time I add a new language construct. ![]() I then started up the lisp server (done through a GUI with MacVim), which loaded up my default lisp executable and core file.Īnd* since my core file is already loaded with the language extensions that I commonly use (awhen being one of them), awhen formatted correctly right out of the box. As a test, I downloaded MacVim (will need this working with terminal vim, but that's a different problem) and slimv, rsynched the slimv download into ~/.vim, launched MacVim, and loaded a. Any ideas how I can do this?Įdit: Thanks Gilligan and Tamas for the Slimv recommendation. I would like 'awhen to auto-format like 'when. I would like to know the best way to customize auto-formatting/auto-indenting in vim for Common Lisp.Īuto-formatting (I usually do this by typing '=' in command mode per line) works very well for the base lisp language in vim (e.g., defmacro, defun, lambda, if, with-output-to-string), but any time that new language constructs are defined (e.g., using macros), I find that the formatting for the new construct is often not what I'd like it to be.įor example, here's how vim formats 'when (standard lisp construct) and 'awhen (commonly-used anaphoric version of 'when not part of lisp standard) (when 'this ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |