photog.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A place for your photos and banter. Photog first is our motto Please refer to the site rules before posting.

Administered by:

Server stats:

242
active users

#vimscript

0 posts0 participants0 posts today
Jürgen<p>So, hier hat der Regen jetzt Scheinbar aufgehört. Den Rest <a href="https://mastodon.social/tags/refactoring" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>refactoring</span></a> mache ich morgen. Interessanterweise ist jetzt passiert, was wir alle schon lange befürchtet haben: ich will morgen mein erstes eigenes <a href="https://mastodon.social/tags/vimscript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>vimscript</span></a> für <a href="https://mastodon.social/tags/vim" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>vim</span></a> und <a href="https://mastodon.social/tags/neovim" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>neovim</span></a> <a href="https://mastodon.social/tags/nvim" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>nvim</span></a> versuchen zu schreiben!</p>
Wolf<p>I think any large interesting program you might write could well have an embedded language within it, in which the user can write stuff that is just as good, and just as deep as built-in functionality. You want this. It’s a thing that makes programs compelling.</p><p>In <a href="https://hachyderm.io/tags/Vim" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Vim</span></a>, that embedded language is <a href="https://hachyderm.io/tags/VimScript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>VimScript</span></a>. In <a href="https://hachyderm.io/tags/emacs" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>emacs</span></a>, that’s <a href="https://hachyderm.io/tags/elisp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>elisp</span></a> (which in fact, I think the whole thing is written in). In a <a href="https://hachyderm.io/tags/smalltalk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>smalltalk</span></a> environment, you control the entire environment with Smalltalk, just as elisp applies to Emacs. For many, many things, that language is <a href="https://hachyderm.io/tags/lua" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>lua</span></a> ( <a href="https://hachyderm.io/tags/NeoVim" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NeoVim</span></a>, many games, <a href="https://hachyderm.io/tags/pandoc" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pandoc</span></a>, <a href="https://hachyderm.io/tags/redis" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>redis</span></a>, this list goes on).</p><p>I used to think there were really two reasonable mainstream languages you could use here: <a href="https://hachyderm.io/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> or <a href="https://hachyderm.io/tags/javascript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>javascript</span></a>. Between those two, for a long time I felt that JavaScript was the winner. I think that has changed as Python has gotten faster, more powerful, and better known. But also, I think the answer might actually not be either of these two. It might be Lua. Lua is simpler and faster than either JavaScript or Python. It’s more embeddable. It’s designed specifically for this purpose. It’s in much wider use as an embedded scripting language. I don’t want Lua to be the answer. I like Python better. But I think Lua actually is the right answer.</p>
Beej 💾<p>Need a new C compiler? Here's one written in VimScript.</p><p><a href="https://github.com/rhysd/8cc.vim" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="">github.com/rhysd/8cc.vim</span><span class="invisible"></span></a></p><p><a href="https://mastodon.sdf.org/tags/c" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>c</span></a> <a href="https://mastodon.sdf.org/tags/compilers" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>compilers</span></a> <a href="https://mastodon.sdf.org/tags/vimscript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>vimscript</span></a> <a href="https://mastodon.sdf.org/tags/clang" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>clang</span></a></p>
Kevin Karhan :verified:<p><span class="h-card" translate="no"><a href="https://hachyderm.io/@Brahn" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>Brahn</span></a></span> <span class="h-card" translate="no"><a href="https://wandering.shop/@xgranade" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>xgranade</span></a></span> <span class="h-card" translate="no"><a href="https://wandering.shop/@Canageek" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>Canageek</span></a></span> I recommend <a href="https://infosec.space/tags/neovim" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>neovim</span></a> because it's a drop-in replacement and allows for way more customization without having to learn esotheric <a href="https://infosec.space/tags/VimScript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>VimScript</span></a> but allowing one to use <a href="https://infosec.space/tags/Lua" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Lua</span></a>... </p><p>So it doesn't take away stuff for <a href="https://infosec.space/tags/vim" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>vim</span></a> users but adds options down the line...<br><a href="https://www.youtube.com/watch?v=c4OyfL5o7DU" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">youtube.com/watch?v=c4OyfL5o7D</span><span class="invisible">U</span></a></p><p>Kinda like how every AR-15 &amp; AR-18 nowadays has a flat-top upper and maybe some flip-up iron sights instead of that carry-handle + gas block stuff...</p>
scy 🔜 WHY<p>Yes, <a href="https://chaos.social/tags/VimScript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>VimScript</span></a> sucks, and <a href="https://chaos.social/tags/Lua" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Lua</span></a> is clearly better.</p><p>But: Not being able to use your config (hand-crafted and containing years of experience) on a remote machine that just has <a href="https://chaos.social/tags/Vim" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Vim</span></a> installed, not <a href="https://chaos.social/tags/Neovim" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Neovim</span></a>, sucks too.</p><p>Just saying.</p>
Alejandro Baez<p><span class="h-card"><a href="https://infosec.exchange/@brk" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>brk</span></a></span> <span class="h-card"><a href="https://fosstodon.org/@hq1" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>hq1</span></a></span> completely my sentiment. I have literal decades fine tuning my <a href="https://fosstodon.org/tags/vimscript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>vimscript</span></a> and then eventually my <a href="https://fosstodon.org/tags/lua" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>lua</span></a> files to be able to work like I want it to. And it definitely does. And I should probably write a blog post about it. 😅</p><p>But with helix, my settings right now is at 82 lines and that's covering: </p><p><a href="https://fosstodon.org/tags/elixir" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>elixir</span></a> with credo LSP and elixirLS<br><a href="https://fosstodon.org/tags/nix" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>nix</span></a> with nixfmt override<br><a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> with ruff <br><a href="https://fosstodon.org/tags/lua" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>lua</span></a> with formating<br><a href="https://fosstodon.org/tags/sql" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>sql</span></a> with sqlfluff</p><p>Not to mention other stuff that just works without anything else. 😎</p>
Matthias Schmidt<p>In case you ever want to configure <a href="https://cybervillains.com/tags/neovim" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>neovim</span></a> with <a href="https://cybervillains.com/tags/lua" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>lua</span></a> instead of classic <a href="https://cybervillains.com/tags/vimscript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>vimscript</span></a> this is the definitive resource you should have at hand</p><p><a href="https://github.com/nanotee/nvim-lua-guide" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/nanotee/nvim-lua-gu</span><span class="invisible">ide</span></a></p>
Lukas Galke<p>Want to clean up your paper's source from <a href="https://sigmoid.social/tags/latex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>latex</span></a> comments, \eg, before submitting to <a href="https://sigmoid.social/tags/arXiv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>arXiv</span></a> or just to get rid of some commented-out legacy text? </p><p>Here's my <a href="https://sigmoid.social/tags/vimscript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>vimscript</span></a> function that properly purges your <a href="https://sigmoid.social/tags/tex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>tex</span></a> source from comments:</p><p><a href="https://gist.github.com/lgalke/8d2a69ee7b69c5c7b34291e005e10965" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="ellipsis">gist.github.com/lgalke/8d2a69e</span><span class="invisible">e7b69c5c7b34291e005e10965</span></a></p><p><a href="https://sigmoid.social/tags/nlproc" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>nlproc</span></a> <a href="https://sigmoid.social/tags/ml" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ml</span></a></p>