u/Desperate_Cold6274

github copilot app VS github copilot CLI

Is copilot app just a wrapper around the CLI or am I missing something?

I am asking because I have both, and the app looks a bit buggy. If they are the same, then I will stick to the CLI. Thanks.

reddit.com
u/Desperate_Cold6274 — 8 days ago
▲ 0 r/vim

What AI agent harness for vim?

I discovered ai agents lately, and I am wondering if there is any good harness for Vim. I have tried to run copilot CLI in a terminal window but it was a bad experience due to that copilot cli is a full tui program that cannot be replicated satisfactorily in a vim terminal.

Any hints?

Preferably in Vim9.

reddit.com
u/Desperate_Cold6274 — 11 days ago
▲ 0 r/iphone

How to open images in separate tabs?

When I google something with Safari and I tap on Images, I get a bunch of results and sometimes I just want to see only the image I select in a mew tab.

However, when I tap only once, I get “Search inside image”, and if I hold tap I get a menu with share, save to photo, copy, copy subject, look up and show text.

The only way I found is to tap on Copy, manually open a new tab and paste the link, but that is very tedious.

reddit.com
u/Desperate_Cold6274 — 15 days ago
▲ 17 r/vim

Vim-replica finally has a variable explorer

One thing that I always loved about Spyder (the notorious python IDE) is its beautiful variable explorer. I have never found a handy and well-done variable explorer like Spyder's.

Now, I finally managed to recreate something very similar in vim-replica!

ubaldot/vim-replica: The ultimate REPL!

Some history:

Vim-replica was the first plugin that I have ever written and it evolved as I learned new stuff. The motivation was due to vim-slime didn't work well on Windows and other REPL plugins didn't fit my need. But also because I wanted to learn more about Vim. So, I stared its development back in years.

During last Xmas vacation, while in the Philippines, I had some idea on how I could have made a variable explorer. And I learned few lessons the hard way, that many of you can spot as I explain next:

  • For a simple variable explorer, I though to use term_sendkeys() and then capture and parse what the terminal spit out. I was thinking that at the end all I have to do is to pick and parse everything from the term_sendkeys() command until the next prompt and I should be set. How difficult can it be? But then I noticed that what a terminal emulator spit out include lot of rubbish (escape sequences, etc). I start to parse char-by-char and bloat the plugin with a plethora of regex. I created a monster! I spent huge amount of time chasing something that you should absolutely never do: try to parse raw terminal strings. Never ever!
  • Sad for all the time wasted, I started to study an alternative way to make the processes Vim and the program running in the REPL to talk one each other, and I was thinking to make some magics through pipes and tee:s, a bit like it is donne with Termdebug. But no. That is not possible in this case.
  • At the end the easiest was to simply exploit sockets. Vim support it and the programs to run in the REPL (mostly Python, Julia and R) do so. That was the key to success.
  • However, I learned many things during this journey, despite it costed many headaches: for example I learned base64 encoding and that jupyter-console is pretty much an abandoned project, just to cite some. In-fact, I ditched jupyter-console but now REPLica uses native programs.
  • I also started to use some AI for the first time for coding, especially for the init scripts used for Julia and R that are not really my languages. The Vim part was done pretty much and the addition was not huge, so I fixed it by myself. However, for Julia the AI entered in a loop of hallucinations and the end I had to fix the issue by myself anyway, but, generally speaking, the help of an AI is undeniable.

Well, sorry for the lengthy message but I am very happy about the outcome. Enjoy!

u/Desperate_Cold6274 — 15 days ago
▲ 31 r/vim

I finally found some time to improve Vim experience in Windows Terminal

I always use gvim on Windows, even after they provided us with Windows Terminal which is, in my opinion, very nice. However, I found two very annoying problems that I promised myself, sooner or later to solve. Such problems are:

  1. Cursor shape not replaced back when exiting Vim,
  2. Colors completely messed up.

I solved the first point with the following snippet:

# Set cursor
# Needed for Windows terminal
if g:os == "Windows" && !has("gui_running")

  set guicursor=

  &t_SI = "\e[6 q" # beam in Insert mode
  &t_EI = "\e[2 q" # block in Normal mode

  # Restore cursor shape when leavig Vim
  def RestoreCursorWindowsTerminal()
    &t_EI = "\e[6 q"
    execute "normal! i\<Esc>"
  enddef

  augroup CURSOR_SHAPE_WINDOWS
    autocmd!
    autocmd VimEnter * silent! execute "normal! i\<Esc>"
    autocmd VimLeave * RestoreCursorWindowsTerminal()
  augroup END
else
  &t_SI = "\e[6 q"
  &t_EI = "\e[2 q"
endif

When Entering Vim, set the cursor with a certain shape. For some arcane reason, I had to set guicursos=. To secure that the changes take effect, there is a switch insert-normal mode. Then, before exiting Vim, you change the cursor shape so that Windows terminal inherits it.

Next, the colors. I use everforest scheme and look here:

https://preview.redd.it/za9di9rg97fh1.png?width=1433&format=png&auto=webp&s=0d9f20486538366aae0772bce4dddb7befe5a8b2

That is just not acceptable. I debugged what could be possibly the reason and I found that `set spell` messes up the colors. Most likely, its syntax definition fight against the colorscheme and here is it the mess. However, after having disabled the option, I got a way better result:

https://preview.redd.it/zph5evcu97fh1.png?width=1445&format=png&auto=webp&s=2b4c5c478fc0765f1394f01cf61379f3fdfd5f31

Now I keep the spelling check only in some selected filetypes:

# Set spell only in selected filetypes

augroup SPELLLANG_OPTION

autocmd!

# autocmd FileType markdown setlocal spell spelllang=en_us

autocmd FileType text,tex,gitcommit setlocal spell spelllang=en_us

autocmd FileType gitcommit setlocal spell spelllang=en_us

augroup END

Yet, I found gvim more snappy than the terminal version through Windows Terminal.

Hopefully someone will find these findings useful.

reddit.com
u/Desperate_Cold6274 — 27 days ago
▲ 5 r/vim

A tiny Vim plugin for everyday git operations, inspired by lazygit

Hi all,

A couple of years ago I started to write a plugin based on the hype (and beauty I must say) of lazygit, and I was wondering whenever it would be possible to replicate something similar through Vim9.

Then, due to lack of time I parked the project but the architecture I had in mind was clear: use `systemlist()` to call git commands and write the returned values in some scratch buffer inside of Vim, and add some buffer local keybindings for the various git operations. Nothing esoteric.
Moreover, the ambition was small: just "code" the most common git commands that I use daily and use a sort of "lazygit" UI, though the architecture is such that any extension should be easy.

These days I have some time to spend in Vim9 coding and I finally finished this plugin, also with the help of an AI agent, which is something that I never used before, though I had to manually correct it many times - I believe that AI agents are not very good in Vim9 scripting yet!

Well, regardless, I hope you enjoy it! :)

github.com
u/Desperate_Cold6274 — 1 month ago
▲ 19 r/vim

GitHub - ubaldot/vim-markdown-extras: Modern note taking plugin with markdown focus

Hi all!

I have updated this plugin that I use on daily basis, given that I switched career and I am no longer a software developer - but my love for Vim never faded and it is my go-to tool <3.

The added feature is about table handling: it is now easy to create, format, modify cells and in tables.

The next features that I plan to add are the following:

  1. Multi-row/multi-column tables,
  2. Links sanitizer, copy/paste links,

Unfortunately, I don't have the same time I had before, but I am open to receive good PR:s. :)

Check it out and let me know what you think!

github.com
u/Desperate_Cold6274 — 1 month ago
▲ 0 r/vim

vim-ai VS denseanalysis Neural: which one?

I am getting modern, and I decided to use AI tools from Vim.
However, I only found these two plugins. Any experience?

reddit.com
u/Desperate_Cold6274 — 1 month ago
▲ 32 r/vim

What is missing in Vim compared to Neovim?

In my opinion:

  1. Tools for helping scripts/plugin development. Lua has LSP, linters, etc. Vim9 has... nothing. It seems to be back to the beginning of the 90:s when it comes to develop in Vim9 language, in-spite it is very nice.

  2. A Native Vim9 DAP. There is vim-spector but that is mostly Python,

  3. Plugins: for example, I got copilot from work and the Vim9 and Neovim copilot-chat plugin are not even comparable,

What else?

reddit.com
u/Desperate_Cold6274 — 1 month ago
▲ 54 r/Python

Will python ever have a chaining operator?

In other languages I use map() and filter() through piping and my code usually looks readable as I can clearly see a data-stream transformation.

As it is today, users cannot do map() |> filter() |> list(), but they need to do list(filter(map())) which makes things unreadable. Lists of comprehension work fine for very simple use-case becoming unreadable very quickly as complexity increases.

However, in python there has always been some resistance, especially 15-20 years ago, but times are evolving. Also, by considering the wide adoption in data-science, it is worth noticing that numbers-crunchers are more familiar with the concept of “data transformation flow” than “function calls”. On the packages dimension , libraries like 🐼s support methods chaining which from an external viewpoint, it’s semantically similar.

Do you know if there is any indication that python core team may allow operator piping (and/or chaining) in the not-too-long-term?

reddit.com
u/Desperate_Cold6274 — 3 months ago