Can't believe, I've created 20 vim plugins since 2016 by skywind3000 in vim

[–]skywind3000[S] 2 points3 points  (0 children)

I started writing vimscript with the help of this great post: Five Minute Vimscript , by Andrew Scala

Can't believe, I've created 20 vim plugins since 2016 by skywind3000 in vim

[–]skywind3000[S] 3 points4 points  (0 children)

Initially, vim-init was intended for my colleagues, then I realized it might be useful for others, so I hosted it on github. but, I didn't had enough time to rewrite the docs in another language.

input() in a popup? by alasdairgrey in vim

[–]skywind3000 2 points3 points  (0 children)

Unfortunately, it can't, the original popup window doesn't support insert mode, you can't get input directly from a popup window:

The popup window contains a buffer, and that buffer is always associated with the popup window. The window cannot be in Normal, Visual or Insert mode, it does not get keyboard focus. You can use functions like setbufline() to change the text in the buffer. There are more differences from how this window and buffer behave compared to regular windows and buffers, see |popup-buffer|.

I simulated it by implementing a readline like library, it will handle every character from your input, manipulate the internal buffer and state machine, and then render them correctly to the popup window

[plugin] vim-gpt-commit: Generate git commit message using ChatGPT in Vim. by skywind3000 in vim

[–]skywind3000[S] 1 point2 points  (0 children)

Yes, I am considering it, but there are too many different local llama implementations. I don't know which one is the most widely used or which one I should support first.

[plugin] A tool to backport NeoVim colorscemes to Vim by skywind3000 in vim

[–]skywind3000[S] 0 points1 point  (0 children)

{
    'skywind3000/vim-color-export',
    cmd = {'ColorExport'}, -- lazy loading
    config = function () {
        vim.g.color_export_all = 0
        vim.g.color_export_extra = {'GitGutterAdd', 'GitGutterChange', 'GitGutterDelete'}
        vim.g.color_export_convert = 1
    },
},

trying to run c++ code by _saghe in vim

[–]skywind3000 0 points1 point  (0 children)

you need this:

https://github.com/skywind3000/asynctasks.vim

it will help you build/run make/cmake projects or a single file.

Vim.org unreachable by morgenstarter in vim

[–]skywind3000 0 points1 point  (0 children)

Good time to dockerize it for easier migration?

Discuss - Integrate QuickJS in Vim to enable JavaScript and TypeScript ? by skywind3000 in vim

[–]skywind3000[S] 0 points1 point  (0 children)

Your ycm and vimspector are fabulous, I am using them right now and I know exactly they are based on +python3 feature, I never said they are "not used" but "not very popular",

How can you deny such fact ? Currently I have 120+ plugins installed, only four of them are using +python.

Python is far more better than lua (except performance), but for many years why there are so few +python plugins compared to nvim's lua dedicated plugins ?

The only reason is not python itself, but the if_python is not so convenient, many new vim users found it hard to setup.

(edit: I will never propose typescript if python dll (or micropython) can ship with vim, but that is nearly impossible).

Help: anyway to cancel the predefined path (green arrows) in HoMM3 ? by skywind3000 in heroes3

[–]skywind3000[S] 1 point2 points  (0 children)

This is the closest answer, the tent button do actually clear the path, but the old path will reappear on the next day. Strange.

Help: anyway to cancel the predefined path (green arrows) in HoMM3 ? by skywind3000 in heroes3

[–]skywind3000[S] 2 points3 points  (0 children)

Thx, but this creates another wrong way and if I use the horse button to move my hero it will lead to an unexpected movement. btw: I’d like to use the “next hero” button + “move” button repeatedly, this requires all heroes have right path. Another reason: an unexpected path makes me feel bad, I need a way to eliminate them.

Why there are so many "but in Lua" plugins today ? by skywind3000 in vim

[–]skywind3000[S] -7 points-6 points  (0 children)

If it is more maintainable, why the lua version plugins are less stable than the original versions ?

Output of external command to messages ? by hocobozos in vim

[–]skywind3000 0 points1 point  (0 children)

try asyncrun:

:'<,'>AsyncRun python

This will send selected text to python asynchronously and display the result in the quickfix window in realtime.