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.
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.
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.
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.
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:
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! Well, sorry for the lengthy message but I am very happy about the outcome. Enjoy!
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:
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:
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:
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.
Which one do you use (more)?
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! :)
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:
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!
I am getting modern, and I decided to use AI tools from Vim.
However, I only found these two plugins. Any experience?
In my opinion:
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.
A Native Vim9 DAP. There is vim-spector but that is mostly Python,
Plugins: for example, I got copilot from work and the Vim9 and Neovim copilot-chat plugin are not even comparable,
What else?
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?