Friday, May 17, 2024

Re: Using vim9 script in cmd-line without vim9cmd

As also wrote on github, I second this. However:

1. vim9 variables are script-scoped. If you declare from the command line, e.g. `:var a = 0` what shall be the scope of `a`?
2. Having an option set vim9cmdline (false as default) to switch the command line interpreter between legacy and vim9 script looks a viable idea to me

My 2 cents,
/Ubaldo
 

On Wednesday 15 May 2024 at 10:57:01 UTC+2 Girish wrote:
Can this feature be added without major upheaval? Basically, I want to execute vim9 script without typing 'vim9cmd' in command line. Turn off legacy script in command line, and only use vim9 script. Today, we cannot even declare a vim9 variable in command line.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/fd62e037-5dd9-4cb4-a074-21dc05b048afn%40googlegroups.com.

Thursday, May 16, 2024

Python or Powershell library for Vim-Server functionality?

All,

Are there any libs for Python3 or Powershell to utilize the vim-server functionality in Windows?

I'm asking because I'm trying to find one that's safe to install.

Thank you,
  helpdeskaleer

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAEJF0%2B3Yn94GLSq4fUS7fiKV--sh5XS8rQwhhg4s_-DXNMtVkA%40mail.gmail.com.

Wednesday, May 15, 2024

Using vim9 script in cmd-line without vim9cmd

Can this feature be added without major upheaval? Basically, I want to execute vim9 script without typing 'vim9cmd' in command line. Turn off legacy script in command line, and only use vim9 script. Today, we cannot even declare a vim9 variable in command line.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ab9b59bb-aff5-4912-b44f-fba5f492bd76n%40googlegroups.com.

Tuesday, May 14, 2024

Termdebug in vim9?

Hi all,

I was in need of a debugger for embedded systems and I built all a machinery around Termdebug. I eventually made it work in satisfactory manner, or., let's say, it met my needs. However, I wanted to make some other changes and I figured that I had to change the Termdebug source code. However, given that I cannot script with the legacy language, and given that I had a surgery ten days ago that keep me locked at home (all good and all fine if you were asking) I took the freedom of converting Termdebug in Vim9 language. I tested it a bit and it seems to work fine.

If you want to give it a shot and give some feedback, here is where it is stored:


There is also the original plugin in legacy scripting language. If you open both the versions in a vertical split, then you can compare them back-to-back fairly easily. There is also a changes.txt so you can see my intentions on what I wish to do with it. :) 

If you believe that the work is well-done I can issue a PR towards Vim repo. Or I can make some changes reported in changes.txt file and make a PR. You let me know :)   
Otherwise if you think it's a bad porting (and I would be perfectly fine with that given that I am an applied mathematician, not a programmer :D) I will hack the current version by throwing away all the things that I don't need and use the "leftovers" it as basis for a plugin that I actually kinda need. :) 

Cheers,
/Ubaldo 

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CA%2BnhgoNCY668Q%2BGfrGFwjF7_0XFyF3visnGgtkzOaCmRu3eEew%40mail.gmail.com.

Monday, May 13, 2024

Re: vim cannot write a file being saved by OneDrive but Notepad++ can

I found a reference to whitelisting a program with Windows, here:

https://answers.microsoft.com/en-us/windows/forum/all/ransomeware-protection-adding-applications-to-the/842850e6-4312-49b6-9c10-09bf3ba1804a

Sadly I followed the instructions and it didn't fix the problem.

My IT guy came by and suggested I go to "Windows Security > Virus & threat protection > Protection history", and click on a recent item.

Sure enough, it showed

App or process blocked: gvim.exe
...
Blocked by: Controlled folder access

There was a link, "Controlled folder access settings" > "Allow an app through Controlled folder access" which shows "Allow an app through Controlled folder access".

There's a list there of allowed apps, and a button, "+ Add an allowed app".  I used that to allow gvim and away I went. No more problems.


On Monday, May 13, 2024 at 4:07:46 PM UTC-4 Richard Pennenga wrote:
Has anyone else seen this?

I have an existing text file (foo.py) in a folder backed up by OneDrive.  I created the file using Notepad++.  I opened the file using vim, modified the text and tried to write it (":w<cr>").  I get the following:

"foo.py" E514: Write error (file system full?)
WARNING: Original file may be lost or damaged
don't quit the editor until the file is successfully written!

Notepad++ can read and write the file just fine.

Any ideas?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/b2b5431c-6d7d-4a3f-96ab-8284bfa86042n%40googlegroups.com.

vim cannot write a file being saved by OneDrive but Notepad++ can

Has anyone else seen this?

I have an existing text file (foo.py) in a folder backed up by OneDrive.  I created the file using Notepad++.  I opened the file using vim, modified the text and tried to write it (":w<cr>").  I get the following:

"foo.py" E514: Write error (file system full?)
WARNING: Original file may be lost or damaged
don't quit the editor until the file is successfully written!

Notepad++ can read and write the file just fine.

Any ideas?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/721af91f-cb89-4085-af35-0dc4802e8671n%40googlegroups.com.

Friday, May 10, 2024

Re: Access class member from command line

On 2024-05-10, Yegappan Lakshmanan <yegappanl@gmail.com> wrote:
>> Right now, the only issue I have is with autoload scripts in my vimrc,
>> but I see that it's being tracked as #13313 in GitHub. Other than that,
>> I must say that Vim 9 script has been rock solid for me (no more
>> crashes), and very pleasant to use!
>>
>
> I have opened the PR https://github.com/vim/vim/pull/14740 to address
> this issue.

I've just tried that, and it works like a charm! For older versions of
Vim, I've found that I can create a symlink in ~/.vim/autoload, e.g.:

cd ~/.vim/autoload
ln -s ../pack/plugins/foo/autoload/foo.vim

Then foo.vim is found by `import autoload` in my vimrc.

Thanks,
Life.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/v1lu3p%24ead%243%40ciao.gmane.io.