home.social

#vimscript — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #vimscript, aggregated by home.social.

  1. С Vim удобно программировать (часть III)

    Это окончание статьи о REPL на Vim. Содержит пару простых примеров применения разработки автора - работа на Ruby с Sinatra и работа с Git.

    habr.com/ru/articles/1026138/

    #Vim #vimscript #bashскрипт

  2. С Vim удобно программировать (часть III)

    Это окончание статьи о REPL на Vim. Содержит пару простых примеров применения разработки автора - работа на Ruby с Sinatra и работа с Git.

    habr.com/ru/articles/1026138/

    #Vim #vimscript #bashскрипт

  3. С Vim удобно программировать (часть III)

    Это окончание статьи о REPL на Vim. Содержит пару простых примеров применения разработки автора - работа на Ruby с Sinatra и работа с Git.

    habr.com/ru/articles/1026138/

    #Vim #vimscript #bashскрипт

  4. С Vim удобно программировать (часть III)

    Это окончание статьи о REPL на Vim. Содержит пару простых примеров применения разработки автора - работа на Ruby с Sinatra и работа с Git.

    habr.com/ru/articles/1026138/

    #Vim #vimscript #bashскрипт

  5. С Vim удобно программировать (часть I)

    Статья о том, как своими руками в Vim сделать универсальный (т.е. работающий для разных языков программирования) REPL (от англ. read-eval-print loop — цикл “чтение — вычисление — вывод”), да и просто сделать этот редактор более удобным.

    habr.com/ru/articles/1022400/

    #vim #vimscript #bashскрипт #bash #linux #git

  6. С Vim удобно программировать (часть I)

    Статья о том, как своими руками в Vim сделать универсальный (т.е. работающий для разных языков программирования) REPL (от англ. read-eval-print loop — цикл “чтение — вычисление — вывод”), да и просто сделать этот редактор более удобным.

    habr.com/ru/articles/1022400/

    #vim #vimscript #bashскрипт #bash #linux #git

  7. С Vim удобно программировать (часть I)

    Статья о том, как своими руками в Vim сделать универсальный (т.е. работающий для разных языков программирования) REPL (от англ. read-eval-print loop — цикл “чтение — вычисление — вывод”), да и просто сделать этот редактор более удобным.

    habr.com/ru/articles/1022400/

    #vim #vimscript #bashскрипт #bash #linux #git

  8. С Vim удобно программировать (часть I)

    Статья о том, как своими руками в Vim сделать универсальный (т.е. работающий для разных языков программирования) REPL (от англ. read-eval-print loop — цикл “чтение — вычисление — вывод”), да и просто сделать этот редактор более удобным.

    habr.com/ru/articles/1022400/

    #vim #vimscript #bashскрипт #bash #linux #git

  9. Getting NeoVIM to not read anything VIM finds seems impossible, but it is easy to make the vimscript a noop with `if has('nvim') | finish | endif`. The similar Lua versions don't get read by VIM, so that direction isn't a problem.

    I implemented Decasify in a single repo as a #vimscript plugin that loads in #vim and a #lua plugin that leads in #neovim, the former depending on the CLI and the latter depending on the Lua Rock. Also there is now an override so NeoVIM can go the other way too.

  10. So, hier hat der Regen jetzt Scheinbar aufgehört. Den Rest #refactoring mache ich morgen. Interessanterweise ist jetzt passiert, was wir alle schon lange befürchtet haben: ich will morgen mein erstes eigenes #vimscript für #vim und #neovim #nvim versuchen zu schreiben!

  11. 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.

    In #Vim, that embedded language is #VimScript. In #emacs, that’s #elisp (which in fact, I think the whole thing is written in). In a #smalltalk environment, you control the entire environment with Smalltalk, just as elisp applies to Emacs. For many, many things, that language is #lua ( #NeoVim, many games, #pandoc, #redis, this list goes on).

    I used to think there were really two reasonable mainstream languages you could use here: #Python or #javascript. 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.

  12. Ok, I admit that writing a syntax file in Vimscript is a pain.

    #Vim #Vimscript

  13. #Vim #NeoVim I found what was replacing all my argument lists with underscores: argtextobj.vim. This is one of my favorite plugins. It hasn’t been touched in 15 years, though. Probably something changed in the editor itself that broke it. I could abandon it; I could fix it; or I could rewrite it. I asked my friend what language it should be rewritten in. He said #vim9script of course! I disagreed. That would only work in Vim. #lua would only work in NeoVim. Maybe #vimscript from just before 9. Maybe #Python. Maybe #rustlang. All three of those would run in both. I kinda don’t want to use VimScript, but that’s technically the correct choice.

    Of course it would be waaay easier if it used the #lsp. Otherwise you’re parsing patterns and brackets and strings. Not sure such a solution works in plain old Vim.

    What does the #fediverse say?

  14. Has anybody seen an effective way to use the same repository for both a native #Lua based plugin for #neovim and legacy #vimscript based plugin targeting plain #vim? In my case the best implementations for each is going to be completely different but it would be nice to do it from one code base.

    Also and VIM users have thoughts on a plugin with a shell dependency vs. one that has to either detect, download, or build a Python module?

    github.com/alerque/decasify

  15. @seanhood You could try solving the #AdventOfCode with #VimScript ;-) Nah, better not. AoC should be about having fun.

  16. @breakerandahalf @simontatham @b0rk yeah, every time I have to even read , let alone write it, I get a little bit ragey.

  17. Я сегодня потратил весь день на переписывание моего конфига для #Nvim (#NeoVim) с #VimScript на #Lua.

    https://codeberg.org/RaZZlom/dotfiles/src/branch/master/config/nvim

    В свзи с этим заменил все плагины на новые, добавил
    #TreeSitter и #LSP сервер.

    Можете смело сказать где сделано круто, а где я всё испортил.

  18. Going through my #neovim config for below toot reminded me what a messed up mix of #vimscript and #lua it is. So I finally took the plunge and converted it to proper lua.

    Turns out, #LLMs are pretty good at this. #Mixtral converted every vimscript snippet I threw at it to a correct lua statement!

    indieweb.social/@data0/1118186

  19. @polyote @landley #Lua is definitely an upgrade in some cases tho.

    Like #neovim using it instead of #VimScript...
    youtube.com/watch?v=c4OyfL5o7D

    Granted I use #nano and have to get used to #kilo for #OS1337 but still...

  20. Switching between #GStreamer logs, pipeline dot graphs and Wireshark packet capture, SSRC values for RTP can be in decimal or hexadecimal. Quickly wrote some #vimscript (I know, I know, I can write Lua too) to scratch this itch of converting quickly when required.

    https://git.sanchayanmaity.net/sanchayanmaity/dotfiles/src/branch/master/nvim/.config/nvim/plugin/shell.vim#L34

  21. @codemonkeymike it gives you a modern #vim experience out of the box and sane defaults, without feeling bloated. Reminds me a bit of #doomemacs .
    Also using #lua instead of relying on #vimscript was a good decision from the #neovim devs, IMO.

    Definitely not as easy to configure as #HelixEditor , but an improvement over configuring vanilla neovim from scratch.

  22. Spent some time over the holiday break migrating my #neovim config from #vimscript to #lua and updating my plugin-list; wrote up a blogpost at roguelazer.com/blog/2024-01-ed

  23. Currently delving into Vimscript to enhance my daily plugins. 💻✨ Learning to contribute and improve the tools we rely on. Any seasoned Vimscript devs with tips or favorite resources? #Vim #Vimscript #LearningJourney

  24. Mainframe assembly, BASIC, Pascal, Fortran ... I come from the world where '=' means 'is equal to' and not 'left becomes right'. No, this isn't a #getoffmylawn post. The programming world is what it is.

    Fortunately for me, #Vim can help catch when my fingers type what should be instead of what is.

    autocmd BufReadPost,BufNewFile *.vim match error '\v\c<(if|while).*\s\=\s'

    #programming #habits #editors #vim #vimscript

  25. Aaargh! Ik probeer Vimscript te leren, de programmeertaal waarmee je de editor Vim naar je hand kunt zetten. Wat een ellende... 😂
    Een simpele functie is (met veel moeite) gelukt, maar nu wil ik iets een klein beetje ingewikkelder en alles stort inelkaar. Een variabele heeft opeens een heel andere waarde dan ik er in stopte en een simpele zoek-en-vervang vindt niets, zelfs niet als ik zoek op '.', oftewel: whatever.
    Steeds iets nieuws proberen, dan blijf je eeuwig beginner.
    #vim #vimscript

  26. I'm looking to do a certain thing in #vim, automatically decoding/encoding #Kubernetes secrets when using kubectl edit.

    These files seem to be always opened at
    /tmp/kubectl-edit-*.yaml, and always contain the line kind: Secret. If the path is correct, and this string is found, I want the file to be piped through kubectl secret decode before it shows in vim. When I save this file, I want it to be piped through kubectl secret encode.

    Are there any
    #vimscript aficionados around who can give me some advice on how to achieve this (seemingly) simple goal?

  27. Yes, #VimScript sucks, and #Lua is clearly better.

    But: Not being able to use your config (hand-crafted and containing years of experience) on a remote machine that just has #Vim installed, not #Neovim, sucks too.

    Just saying.

  28. @polyote @landley #Lua is definitely an upgrade in some cases tho.

    Like #neovim using it instead of #VimScript...
    youtube.com/watch?v=c4OyfL5o7D

    Granted I use #nano and have to get used to #kilo for #OS1337 but still...

  29. @polyote @landley #Lua is definitely an upgrade in some cases tho.

    Like #neovim using it instead of #VimScript...
    youtube.com/watch?v=c4OyfL5o7D

    Granted I use #nano and have to get used to #kilo for #OS1337 but still...

  30. @polyote @landley #Lua is definitely an upgrade in some cases tho.

    Like #neovim using it instead of #VimScript...
    youtube.com/watch?v=c4OyfL5o7D

    Granted I use #nano and have to get used to #kilo for #OS1337 but still...