Sunday, February 26, 2023

Re: Augmenting filetype detection for supplemental types

On Sun, 26 Feb 2023, Bram Moolenaar wrote:

> One way would be to not change 'filetype' directly but set a timer with
> a very short timeout to do it later. This can already be done now, you
> can try it out. Obvious disadvantage is that all the
> indent/syntax/ftplugin files will be sourced twice.

Yeah, this works:

autocmd FileType foo if ... | call timer_start(0, {_ -> execute('set filetype=foo.bar', '')}) | endif

...assuming one can live with the double inclusion, which had tripped me
up the first time I'd tried this. Also attempted were various hacks
in {,after/}ftplugin/foo/, with mixed results.

(Aside: a time of 0 isn't explicitly documented, but seems to work as
expected, i.e. meaning something like "next tick"...)

> A specific way to handle this would be to add a FileTypePre event, which
> would be triggered first and allow for changing 'filetype'. Hmm,
> perhaps we would also need this for the Syntax event?
> This would be a very specific solution, do we really need it?

That'd be cleaner... Whether it's really needed, I'm not sure. I'm
pretty far down the rabbit hole of trying to mix syntaxes in particular --
see other thread on extend causing trouble -- but not far enough to have a
solid grasp on whether there's a better way, or what that would be.

I've found a lot of existing workarounds -- the @htmlPreproc cluster, the
near-copy of HTML in PHP, the dynamic inclusions in Markdown/RST/others --
and having hacked up another, none seem all that satisfying.

-Rob

--
--
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/efc5d122-bf33-762f-369b-f3b4e55d312f%40loonybin.net.

Re: Syntax keepend/oneline vs. extend

On Sat, 11 Feb 2023, Rob Foehl wrote:

> (Context: including portions of one syntax in another, where the former's use
> of extend doesn't anticipate the latter. I haven't found any obviously right
> way to do this in either the help or the runtime files that ship with Vim,
> only workarounds for specific cases.)

Toying with this a bit more, I managed to work around the issues with
extend by mechanically collecting :syn list output and replacing the
offending bits of the existing syntax, which is... ugly.

The seeming inability to do this otherwise had me wondering why this
problem wasn't more commonplace, and how often extend is actually used in
the syntax files shipped with Vim (as of 9.0.1307):

99 syntax/perl.vim
23 syntax/plsql.vim
22 syntax/php.vim
18 syntax/rpl.vim
14 syntax/fortran.vim
11 syntax/raku.vim
10 syntax/c.vim
8 syntax/rhelp.vim
7 syntax/baan.vim syntax/rib.vim syntax/tt2.vim
6 syntax/cs.vim
4 syntax/ada.vim syntax/pike.vim syntax/xml.vim
3 syntax/obse.vim syntax/typescriptreact.vim
2 [12 files]
1 [14 files]
0 [636 files]

Oh. Of course the one I'm trying to embed is the outlier... Jokes about
only Perl being able to parse Perl aside, am I wrong to presume that at
least a few of those 99 instances might be gratuitous?

Among the dozen or so that I've tripped over thus far, I can't tell what
any of them were actually intended to accomplish. For example:

syn match perlComment "#.*" contains=perlTodo,@Spell extend

Huh? EOL is also end-of-comment, so what's that supposed to do?

-Rob

--
--
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/bb8db435-c23a-4e55-4820-76a1d1547a25%40loonybin.net.

Re: Augmenting filetype detection for supplemental types

> Attempting to set multiple filetypes based on something like
>
> autocmd FileType foo if ... | set filetype=foo.bar | endif
>
> seems to have an ordering problem with the FileType autocmd that sets
> 'syntax' -- the "foo.bar" filetype is set, requisite files for "bar" are
> loaded, and then the autocmd waiting on the original expansion of <afile>
> to "foo" runs and effectively resets the syntax.
>
> Is there a way to tack on a supplemental filetype without running into
> this problem? The obvious approach of setting the whole string at once
> works, but that requires duplicating everything that could otherwise
> determine the initial filetype...

It's hard to think of an elegant way to deal with this. Once the
FileType event is triggered, it would normally find all matching
autocommands and execute them. Changing the value halfway makes it
unpredictable, easily leading to weird errors.

One way would be to not change 'filetype' directly but set a timer with
a very short timeout to do it later. This can already be done now, you
can try it out. Obvious disadvantage is that all the
indent/syntax/ftplugin files will be sourced twice.

A specific way to handle this would be to add a FileTypePre event, which
would be triggered first and allow for changing 'filetype'. Hmm,
perhaps we would also need this for the Syntax event?
This would be a very specific solution, do we really need it?

--
hundred-and-one symptoms of being an internet addict:
182. You may not know what is happening in the world, but you know
every bit of net-gossip there is.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
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/20230226144757.A0DCA1C0B1F%40moolenaar.net.

Saturday, February 25, 2023

Augmenting filetype detection for supplemental types

Attempting to set multiple filetypes based on something like

autocmd FileType foo if ... | set filetype=foo.bar | endif

seems to have an ordering problem with the FileType autocmd that sets
'syntax' -- the "foo.bar" filetype is set, requisite files for "bar" are
loaded, and then the autocmd waiting on the original expansion of <afile>
to "foo" runs and effectively resets the syntax.

Is there a way to tack on a supplemental filetype without running into
this problem? The obvious approach of setting the whole string at once
works, but that requires duplicating everything that could otherwise
determine the initial filetype...

-Rob

--
--
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/d09426b9-d1d1-d70c-00b5-21b77a348618%40loonybin.net.

Friday, February 24, 2023

Vimdiff editing text

I'm having trouble moving text from file2 line1 to file1 line8.
How do I do that please?

--
--
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/8fe3aa5b-29fb-40fb-b170-de4f16531552n%40googlegroups.com.

Re: Windows 9.0.1341 colorscheme or syntax bug?

Ken,

Thank you for the detailed reply.

--
--
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/84b5618f-70e9-de49-439b-077a2343b721%40fourbarlinkage.net.

Thursday, February 23, 2023

Re: Windows 9.0.1341 colorscheme or syntax bug?

Hi Chainsaw,

It has been changed recently. If you want to use :: as comment, add the following line in your .vimrc:
let dosbatch_colons_comment = 1

See `:help ft-dosbatch-syntax` for detail.

Regards,
Ken Takata

2023年2月24日金曜日 1:36:19 UTC+9 Chainsaw:
Hello,

I reported this on vim/colorschemes github last night, but it may be a
problem with Vim syntax files starting with 9.0.1341.

For .cmd and .bat files, the latest colorschemes (02-22-2023) with the
latest Windows nightly build of Vim, now displays any lines starting
with :: (two colons used for comment lines) using a white foreground and
red background.

Thanks

--
--
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/ed8e8dff-ac2f-4c3d-b6bd-b0f9ea38181en%40googlegroups.com.

Windows 9.0.1341 colorscheme or syntax bug?

Hello,

I reported this on vim/colorschemes github last night, but it may be a
problem with Vim syntax files starting with 9.0.1341.

For .cmd and .bat files, the latest colorschemes (02-22-2023) with the
latest Windows nightly build of Vim, now displays any lines starting
with :: (two colons used for comment lines) using a white foreground and
red background.

Thanks

--
--
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/eb85505d-d377-9920-12e7-e926bf30e3a3%40fourbarlinkage.net.

Saturday, February 18, 2023

Cannot delete eol arounded by multibyte characters when auto-format is set

Hi,

I have trouble in using auto-format in vim to format Chinese characters. The eol in a formatted paragraph can not be deleted in insert mode when formatoptions is set to "tcqmBa".

To reproduce the trouble:

1. vim --clean
2. insert the following text.

你好,你是谁?你从哪里来?你要到哪里去?
你好,你是谁?你从哪里来?你要到哪里去?
你好,你是谁?你从哪里来?你要到哪里去?
你好,你是谁?你从哪里来?你要到哪里去?

3. :set formatoptions=tcqmBa
4. visual select the four-lines text and press "gq" to format.
5. then the formatted text is supposed to have 2 lines.
6. move the cursor to the beginning of the second line and press i to insert
7. press backspace or <c-w> <c-h>. the eol in front of the cursor can not be deleted.

Expected behavior:

the eol  would be deleted so that the characters in the first line is able to be deleted.

vim version: v9.0.1321
OS: Debian GNU/Linux 11 (bullseye)

Is this problem a bug or could someone give me some suggestions to achieve the goal? Thanks a lot!

--
--
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/cf3dbdea-0666-4123-be52-cea2205f04c9n%40googlegroups.com.

Re: vim9 exported func badly indented


Thanks but this is a workaround.  
Since when do you need semicolons in a vim script to indicate the end of a statement?
Le lundi 13 février 2023 à 19:28:41 UTC+1, Owajigbanam Ogbuluijah a écrit :
FYI this modification indents properly

export def ProfileVimStartup(): void
  profile start $tmp/vimprofiler.log
  profile file *;
  profile func *;
enddef


On Thu, Feb 2, 2023 at 4:13 PM N i c o l a s <niva...@gmail.com> wrote:
Hi,

Got this vim9 func, visual select all lines, type =, it is indenting badly. 

export def ProfileVimStartup(): void
  profile start $tmp/vimprofiler.log
  profile file *
    profile func *
    enddef


Thank you
N i co las

--
--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ec6b990a-9196-4089-ae4a-fd043c9e8749n%40googlegroups.com.

--
--
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/b3b0d1e2-3896-4b60-98c6-7f533a5a0231n%40googlegroups.com.

Monday, February 13, 2023

Re: vim9 exported func badly indented

FYI this modification indents properly

export def ProfileVimStartup(): void
  profile start $tmp/vimprofiler.log
  profile file *;
  profile func *;
enddef


On Thu, Feb 2, 2023 at 4:13 PM N i c o l a s <nivaemail@gmail.com> wrote:
Hi,

Got this vim9 func, visual select all lines, type =, it is indenting badly. 

export def ProfileVimStartup(): void
  profile start $tmp/vimprofiler.log
  profile file *
    profile func *
    enddef


Thank you
N i co las

--
--
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/ec6b990a-9196-4089-ae4a-fd043c9e8749n%40googlegroups.com.

--
--
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/CAOmRJrd-Q-B4wcieMWm_2Xrwh_kvVL-p2eWLnki_%3D0HuuEufCg%40mail.gmail.com.

Saturday, February 11, 2023

Syntax keepend/oneline vs. extend

Quoting the help for :syn-extend :

The "keepend" behavior can be changed by using the "extend" argument.
When an item with "extend" is contained in an item that uses
"keepend", the "keepend" is ignored and the containing region will be
extended.

Fair enough, but how does one get the opposite behavior? I.e. what I want
is "keepend-but-seriously-stop-here" regardless of whether contained items
use extend, or match the newlines, etc.

(Context: including portions of one syntax in another, where the former's
use of extend doesn't anticipate the latter. I haven't found any
obviously right way to do this in either the help or the runtime files
that ship with Vim, only workarounds for specific cases.)

-Rob

--
--
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/2ce85c8e-55f3-4cab-6583-6897e2ee330b%40loonybin.net.

Friday, February 10, 2023

Re: Passing python3 file arguments seems failing py3f

> Following vim's python help,
>
>
> *"To pass arguments you need to set sys.argv[] explicitly. Example: > *
> :python sys.argv = ["foo", "bar"]
> :pyfile myscript.py
> *"*
>
>
> I tried to pass argues to python file as this
>
> export def PyLinter(): void
> py3 import sys
> py3 sys.argv = ["--version"]
> exe 'py3f ' .. "path/to/somepythonfile.py"
> enddef
>
> It's like as if it had no effect : py3 sys.argv = ["--version"]
>
> Is it due to python3 file?

It works for me. Typing these commands in sequence:

py3 sys.argv = ["argument"]
py3file /tmp/test.py

With /tmp/test.py:

print("testing pyfile")
print(sys.argv)
print("testing end")

Output:

testing pyfile
['argument']
testing end

This is on Ubuntu, Python 3.10.


--
hundred-and-one symptoms of being an internet addict:
107. When using your phone you forget that you don't have to use your
keyboard.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
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/20230210145102.C532B1C247D%40moolenaar.net.

Re: Passing python3 file arguments seems failing py3f

On Thu, Feb 09, 2023 at 11:50:19AM -0800, N i c o l a s wrote:
> Following vim's python help, 
>
> "To pass arguments you need to set sys.argv[] explicitly.  Example: >
>
>     :python sys.argv = ["foo", "bar"]
>     :pyfile myscript.py
> "

That is not a very good example, since sys.argv[0] contains the name of
the script. It would be less confusing if the example said

:python sys.argv = ["myscript.py", "foo", "bar"]
:pyfile myscript.py

> I tried to pass argues to python file as this 
>
> export def PyLinter(): void
>   py3 import sys
>   py3 sys.argv = ["--version"]
>   exe 'py3f ' .. "path/to/somepythonfile.py"
> enddef
>
> It's like as if it had no effect :   py3 sys.argv = ["--version"]

Try

py3 sys.argv = ["somepythonfile.py", "--version"]

Marius Gedminas
--
We have enough youth, how about a fountain of SMART?

--
--
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/20230210090139.7m5eo2zku5ynnllo%40blynas.

Re: vim_runtime: does someone use this...



Am Fr., 10. Feb. 2023 um 00:09 Uhr schrieb Gary Johnson <garyjohn@spocom.com>:
On 2023-02-09, 'Sebastian Gödecke' via vim_use wrote:
> Hi Gary, yes you're right, my explanation wasn't as good as it had to be. 
> I'm "trying" to use vim_runtime from here: 
> https://github.com/amix/vimrc
> so this adds the hole vim-files to ~/.vim_runtime/ and under this folder there
> are ALL-vimrelated files. There are plugins like the jedi-plug-in, ther
> NERDtree and many more are in ~/.vim_runtime/. Also there is a my_config.vim
> and in this there are my settings. So there is an option "set relativenumber"
> and other settings, but when i'm starting vim, the relativenumbers aren't
> shown, so i have to "set nu" and again "set rnu" than my rel-numbers are there.
> Closing vim, and starting it again my numbers are gone away. 
> Further there is my jedi-vim and opening a python file there will be shown this
> message:
> jedi-vim: Error when loading the jedi python module (module 'jedi' has no
> attribute '__version__'). Please ensure that Jedi is installed correctly (see
> Installation in the README.
>
> But some words were highlighted and i don't know, why this were shown and where
> i have to search for solving this message. 
>
> This is my vim"problem. I don't know, if my own ~/.vim-runtime/ related stuff
> would be used. the "regular" ~/.vimrc is linked to ~/.vim-runtime ....

Hi Sebastian,

Got it.  Thanks for the explanation.  I skimmed the README.md at
https://github.com/amix/vimrc, which included these commands under
"Install for your own user only":

    git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime
    sh ~/.vim_runtime/install_awesome_vimrc.sh

I also read that script.  Did you run the script?  I see that it
overwrites your ~/.vimrc, which is a dumb thing for it to do without
warning the user.  If you have your own ~/.vimrc, make sure you save
it before running that script.

The script creates a ~/.vimrc which adds the ~/.vim_runtime
directory to the end of your 'runtimepath', which will cause Vim to
source plugins from ~/.vim_runtime after it sources all the other
plugins in 'runtimepath'.  That should be okay.  The script also
causes Vim to source a number of Vim scripts before any others at
startup, including my_configs.vim, if it exists.

According to ":help vimrc", Vim will source $HOME/.vimrc before
$HOME/.vim/vimrc, so the ~/.vimrc that the install_awesome_vimrc.sh
created should indeed be the one that Vim sources at startup.

So, the first thing I would check would be to open your ~/.vimrc
file and verify that it is the one that the installation script
created.

Next, I would start Vim and execute :scriptnames to see what files
are actually being sourced.  The files at the top of the list will
depend on which Linux distribution you're running (I am assuming
that you're running Linux) and whether you built Vim yourself.  Near
or at the top of the list, you should see

    ~/.vimrc

followed immediately by

    ~/.vim_runtime/vimrcs/basic.vim
    ~/.vim_runtime/vimrcs/filetypes.vim
    ~/.vim_runtime/vimrcs/plugins_config.vim
    ~/.vim_runtime/vimrcs/extended.vim
    ~/.vim_runtime/my_configs.vim

and then by more files from the ~/.vim_runtime and /usr/share/vim or
perhaps /usr/local/share/vim directories.

Notice that your personal customizations should go into
my_configs.vim, spelled with an 's', not my_config.vim as you wrote
earlier.

Good luck, and let us know what you find out.

Hi, 
i read the README, but i didn't notice the s behind my_config.vim. I changend it now and when opening the python file, the Jedi message wasn't shown as big as befor, it were shown in the "footer", near statusbar.
But nevertheless when opening, it doesn't show me the linenumbers as configured...
i try to figure out ....
Regards Sebastian


 

Regards,
Gary

--
--
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/20230209230949.GI6446%40phoenix.


--
Mit freundlichen Grüßen
Sebastian Gödecke

--
--
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/CAJRNCbYjqOMeu2Yus1P2o2eFdK081Nm7HqUwQpL5gsviL88O9g%40mail.gmail.com.

Thursday, February 9, 2023

Re: vim_runtime: does someone use this...



Am Fr., 10. Feb. 2023 um 06:43 Uhr schrieb Enan Ajmain <3nan.ajmain@gmail.com>:
On Thu, 9 Feb 2023 22:36:37 +0100
'Sebastian Gödecke' via vim_use <vim_use@googlegroups.com> wrote:
> Hi Gary, yes you're right, my explanation wasn't as good as it had to
> be. I'm "trying" to use vim_runtime from here:
> https://github.com/amix/vimrc

Better ask amix about amix's vimrc, no?

For sure, i did it for about 3 Weeks? with no answer....


 

--
Enan
3nan.ajmain@gmail.com
https://git.sr.ht/~enan/
https://www.github.com/3N4N

--
--
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/20230210114328.2f7d2e15%40cirdan.


--
Mit freundlichen Grüßen
Sebastian Gödecke

--
--
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/CAJRNCbZS9YE%3DEBcNUE6RHmhRHvQRtZAmm1D590jt2L5%3DC5gYhw%40mail.gmail.com.

Re: vim_runtime: does someone use this...

On Thu, 9 Feb 2023 22:36:37 +0100
'Sebastian Gödecke' via vim_use <vim_use@googlegroups.com> wrote:
> Hi Gary, yes you're right, my explanation wasn't as good as it had to
> be. I'm "trying" to use vim_runtime from here:
> https://github.com/amix/vimrc

Better ask amix about amix's vimrc, no?

--
Enan
3nan.ajmain@gmail.com
https://git.sr.ht/~enan/
https://www.github.com/3N4N

--
--
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/20230210114328.2f7d2e15%40cirdan.

Re: vim_runtime: does someone use this...

On 2023-02-09, Gary Johnson wrote:

> Next, I would start Vim and execute :scriptnames to see what files
> are actually being sourced. The files at the top of the list will
> depend on which Linux distribution you're running (I am assuming
> that you're running Linux) and whether you built Vim yourself. Near
> or at the top of the list, you should see
>
> ~/.vimrc
>
> followed immediately by
>
> ~/.vim_runtime/vimrcs/basic.vim
> ~/.vim_runtime/vimrcs/filetypes.vim
> ~/.vim_runtime/vimrcs/plugins_config.vim
> ~/.vim_runtime/vimrcs/extended.vim
> ~/.vim_runtime/my_configs.vim
>
> and then by more files from the ~/.vim_runtime and /usr/share/vim or
> perhaps /usr/local/share/vim directories.

I didn't notice when I wrote that that the :scriptnames list may
also include plugins from your ~/.vim directory.

Regards,
Gary

--
--
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/20230209231528.GJ6446%40phoenix.

Re: vim_runtime: does someone use this...

On 2023-02-09, 'Sebastian Gödecke' via vim_use wrote:
> Hi Gary, yes you're right, my explanation wasn't as good as it had to be. 
> I'm "trying" to use vim_runtime from here: 
> https://github.com/amix/vimrc
> so this adds the hole vim-files to ~/.vim_runtime/ and under this folder there
> are ALL-vimrelated files. There are plugins like the jedi-plug-in, ther
> NERDtree and many more are in ~/.vim_runtime/. Also there is a my_config.vim
> and in this there are my settings. So there is an option "set relativenumber"
> and other settings, but when i'm starting vim, the relativenumbers aren't
> shown, so i have to "set nu" and again "set rnu" than my rel-numbers are there.
> Closing vim, and starting it again my numbers are gone away. 
> Further there is my jedi-vim and opening a python file there will be shown this
> message:
> jedi-vim: Error when loading the jedi python module (module 'jedi' has no
> attribute '__version__'). Please ensure that Jedi is installed correctly (see
> Installation in the README.
>
> But some words were highlighted and i don't know, why this were shown and where
> i have to search for solving this message. 
>
> This is my vim"problem. I don't know, if my own ~/.vim-runtime/ related stuff
> would be used. the "regular" ~/.vimrc is linked to ~/.vim-runtime ....

Hi Sebastian,

Got it. Thanks for the explanation. I skimmed the README.md at
https://github.com/amix/vimrc, which included these commands under
"Install for your own user only":

git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime
sh ~/.vim_runtime/install_awesome_vimrc.sh

I also read that script. Did you run the script? I see that it
overwrites your ~/.vimrc, which is a dumb thing for it to do without
warning the user. If you have your own ~/.vimrc, make sure you save
it before running that script.

The script creates a ~/.vimrc which adds the ~/.vim_runtime
directory to the end of your 'runtimepath', which will cause Vim to
source plugins from ~/.vim_runtime after it sources all the other
plugins in 'runtimepath'. That should be okay. The script also
causes Vim to source a number of Vim scripts before any others at
startup, including my_configs.vim, if it exists.

According to ":help vimrc", Vim will source $HOME/.vimrc before
$HOME/.vim/vimrc, so the ~/.vimrc that the install_awesome_vimrc.sh
created should indeed be the one that Vim sources at startup.

So, the first thing I would check would be to open your ~/.vimrc
file and verify that it is the one that the installation script
created.

Next, I would start Vim and execute :scriptnames to see what files
are actually being sourced. The files at the top of the list will
depend on which Linux distribution you're running (I am assuming
that you're running Linux) and whether you built Vim yourself. Near
or at the top of the list, you should see

~/.vimrc

followed immediately by

~/.vim_runtime/vimrcs/basic.vim
~/.vim_runtime/vimrcs/filetypes.vim
~/.vim_runtime/vimrcs/plugins_config.vim
~/.vim_runtime/vimrcs/extended.vim
~/.vim_runtime/my_configs.vim

and then by more files from the ~/.vim_runtime and /usr/share/vim or
perhaps /usr/local/share/vim directories.

Notice that your personal customizations should go into
my_configs.vim, spelled with an 's', not my_config.vim as you wrote
earlier.

Good luck, and let us know what you find out.

Regards,
Gary

--
--
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/20230209230949.GI6446%40phoenix.

Re: vim_runtime: does someone use this...

Hi Gary, yes you're right, my explanation wasn't as good as it had to be. 
I'm "trying" to use vim_runtime from here: 
so this adds the hole vim-files to ~/.vim_runtime/ and under this folder there are ALL-vimrelated files. There are plugins like the jedi-plug-in, ther NERDtree and many more are in ~/.vim_runtime/. Also there is a my_config.vim and in this there are my settings. So there is an option "set relativenumber" and other settings, but when i'm starting vim, the relativenumbers aren't shown, so i have to "set nu" and again "set rnu" than my rel-numbers are there. Closing vim, and starting it again my numbers are gone away. 
Further there is my jedi-vim and opening a python file there will be shown this message:
jedi-vim: Error when loading the jedi python module (module 'jedi' has no attribute '__version__'). Please ensure that Jedi is installed correctly (see Installation in the README.

But some words were highlighted and i don't know, why this were shown and where i have to search for solving this message. 

This is my vim"problem. I don't know, if my own ~/.vim-runtime/ related stuff would be used. the "regular" ~/.vimrc is linked to ~/.vim-runtime ....

Thanks Gary and regards Sebastian

Am Do., 9. Feb. 2023 um 22:17 Uhr schrieb Gary Johnson <garyjohn@spocom.com>:
On 2023-02-09, 'Sebastian Gödecke' via vim_use wrote:
> Hi, 
> nobody there?
> I checked this twice, in my_config.vim are my default settings, but the
> settings wouldn't load. Additional in in the file i "set rnu" but this also
> wouldn't be set up. 
> So how to start to "debug" this?
>
>
> Am Di., 7. Feb. 2023 um 16:27 Uhr schrieb Sebastian Gödecke:
>
>     Hi, 
>     and could help me in clearify: i should have jedi.vim in the "plugins"
>     folder "sourced_non_forked". so i think it should be running, but how could
>     i check this? 
>     I get an error when opening e.g python files:
>     jedi-vim: Error when loading the jedi python module (module 'jedi' has no
>     attribute '__version__'). Please ensure that Jedi is installed correctly
>     (see Installation in the README.
>
>     How to handle with this?
>     regards Sebastian

I'm glad to help, but there's a lot in your explanation I don't
understand.

In my installation of Vim, there are no folders named "plugings" or
"sourced_non_forked".  I don't know what folders you are referring
to.

What "config.vim" file are you referring to?  The only files named
"config.vim" that I find in my Vim installation are these:

    /usr/local/share/vim/vim90/ftplugin/config.vim
    /usr/local/share/vim/vim90/indent/config.vim
    /usr/local/share/vim/vim90/syntax/config.vim

Those are used to aid with editing files for configure scripts--they
are not used for configuring Vim.  Vim's primary configuration file
is one of these:

    On Unix:
        ~/.vimrc
        ~/.vim/vimrc

    On Windows:
        ~/_vimrc
        ~/vimfiles/vimrc

See:

    :help vimrc

Where exactly did you put jedi.vim?  The traditional location for
plugins is the folder ~/.vim/plugin on Unix or ~/vimfiles/plugin on
Windows.  See:

    :help plugin

Recent versions of Vim and Vim plugin managers put plugins in
different directories, but I am not familiar with any of those.  You
can find out more about Vim packages here:

    :help packages

You can determine whether Vim has loaded your plugin by executing
the ":scriptnames" command and looking for config.vim and  jedi.vim
in that list.  See:

    :help :scriptnames

That should get us started in figuring out what went wrong.

Regards,
Gary

--
--
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/20230209211717.GH6446%40phoenix.


--
Mit freundlichen Grüßen
Sebastian Gödecke

--
--
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/CAJRNCbaAHmQxcM5%3Dr7KDGaEP7%3D26QprZUmOkWZJT82XjHe7KNw%40mail.gmail.com.

Re: vim_runtime: does someone use this...

On 2023-02-09, 'Sebastian Gödecke' via vim_use wrote:
> Hi, 
> nobody there?
> I checked this twice, in my_config.vim are my default settings, but the
> settings wouldn't load. Additional in in the file i "set rnu" but this also
> wouldn't be set up. 
> So how to start to "debug" this?
>
>
> Am Di., 7. Feb. 2023 um 16:27 Uhr schrieb Sebastian Gödecke:
>
> Hi, 
> and could help me in clearify: i should have jedi.vim in the "plugins"
> folder "sourced_non_forked". so i think it should be running, but how could
> i check this? 
> I get an error when opening e.g python files:
> jedi-vim: Error when loading the jedi python module (module 'jedi' has no
> attribute '__version__'). Please ensure that Jedi is installed correctly
> (see Installation in the README.
>
> How to handle with this?
> regards Sebastian

I'm glad to help, but there's a lot in your explanation I don't
understand.

In my installation of Vim, there are no folders named "plugings" or
"sourced_non_forked". I don't know what folders you are referring
to.

What "config.vim" file are you referring to? The only files named
"config.vim" that I find in my Vim installation are these:

/usr/local/share/vim/vim90/ftplugin/config.vim
/usr/local/share/vim/vim90/indent/config.vim
/usr/local/share/vim/vim90/syntax/config.vim

Those are used to aid with editing files for configure scripts--they
are not used for configuring Vim. Vim's primary configuration file
is one of these:

On Unix:
~/.vimrc
~/.vim/vimrc

On Windows:
~/_vimrc
~/vimfiles/vimrc

See:

:help vimrc

Where exactly did you put jedi.vim? The traditional location for
plugins is the folder ~/.vim/plugin on Unix or ~/vimfiles/plugin on
Windows. See:

:help plugin

Recent versions of Vim and Vim plugin managers put plugins in
different directories, but I am not familiar with any of those. You
can find out more about Vim packages here:

:help packages

You can determine whether Vim has loaded your plugin by executing
the ":scriptnames" command and looking for config.vim and jedi.vim
in that list. See:

:help :scriptnames

That should get us started in figuring out what went wrong.

Regards,
Gary

--
--
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/20230209211717.GH6446%40phoenix.

Passing python3 file arguments seems failing py3f

Hi,


Following vim's python help, 


"To pass arguments you need to set sys.argv[] explicitly.  Example: >

   
:python sys.argv = ["foo", "bar"]
    :pyfile myscript.py
"


I tried to pass argues to python file as this 

export def PyLinter(): void
  py3 import sys
  py3 sys.argv = ["--version"]
  exe 'py3f ' .. "path/to/somepythonfile.py"
enddef

It's like as if it had no effect :   py3 sys.argv = ["--version"]

Is it due to python3 file?
Tahnk you 
N i c  o las

--
--
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/fa00e6ca-d800-4127-b910-0abb558cabddn%40googlegroups.com.

Re: vim_runtime: does someone use this...

Hi, 
nobody there?
I checked this twice, in my_config.vim are my default settings, but the settings wouldn't load. Additional in in the file i "set rnu" but this also wouldn't be set up. 
So how to start to "debug" this?


Am Di., 7. Feb. 2023 um 16:27 Uhr schrieb Sebastian Gödecke <simpsonetti@googlemail.com>:
Hi, 
and could help me in clearify: i should have jedi.vim in the "plugins" folder "sourced_non_forked". so i think it should be running, but how could i check this? 
I get an error when opening e.g python files:
jedi-vim: Error when loading the jedi python module (module 'jedi' has no attribute '__version__'). Please ensure that Jedi is installed correctly (see Installation in the README.

How to handle with this?
regards Sebastian

--
Mit freundlichen Grüßen
Sebastian Gödecke


--
Mit freundlichen Grüßen
Sebastian Gödecke

--
--
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/CAJRNCbbFRnnsbzYfntRnvQWgmP_pRCS6OzrMCiWow6%3Dz5oyU5Q%40mail.gmail.com.

Wednesday, February 8, 2023

Re: Small doc omission: :tabdo in :help :bar

Tim Chase wrote:

> The help for :bar
>
> > These commands see the '|' as their argument, and can therefore
> > not be followed by another Vim command:
> > ...
>
> has list of commands that can't be followed by a "|" but it appears
> to be missing :tabdo from the list of commands.

I'll add it. Let me know if any other is missing.

--
hundred-and-one symptoms of being an internet addict:
99. The hum of a cooling fan and the click of keys is comforting to you.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
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/20230208205556.8E7A51C247D%40moolenaar.net.

Small doc omission: :tabdo in :help :bar

The help for :bar

> These commands see the '|' as their argument, and can therefore
> not be followed by another Vim command:
> ...

has list of commands that can't be followed by a "|" but it appears
to be missing :tabdo from the list of commands.

-tim





--
--
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/Y%2BOcn5mamVuc3Eu0%40thechases.com.

Tuesday, February 7, 2023

vim_runtime: does someone use this...

Hi, 
and could help me in clearify: i should have jedi.vim in the "plugins" folder "sourced_non_forked". so i think it should be running, but how could i check this? 
I get an error when opening e.g python files:
jedi-vim: Error when loading the jedi python module (module 'jedi' has no attribute '__version__'). Please ensure that Jedi is installed correctly (see Installation in the README.

How to handle with this?
regards Sebastian

--
Mit freundlichen Grüßen
Sebastian Gödecke

--
--
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/CAJRNCbae7S3CoxAc-AnJ_-TozWzxy2Ny-_y28xcER8KCMyz8aQ%40mail.gmail.com.

Friday, February 3, 2023

netrw on mobile device doesn’t doesn’t read files in iCloud Drive

I am using the iVim port of Vim for iOS/iPadOS to create and edit files. When the working directory is a directory in iCloud Drive netrw will not read directories.

This puzzling since Apples own apps for its mobile devices have no difficulty reading directories in iCloud Drive. It also makes working in directories in iCloud Drive a bit cumbersome.

Help appreciated.

Thanks,
———————————
Eric Weir
Atlanta, GA USA

"It has all been combustion."

- W.G. Sebald

--
--
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/49D2C9E0-2D17-4087-B8F6-40756E570E9B%40gmail.com.

Thursday, February 2, 2023

vim9 exported func badly indented

Hi,

Got this vim9 func, visual select all lines, type =, it is indenting badly. 

export def ProfileVimStartup(): void
  profile start $tmp/vimprofiler.log
  profile file *
    profile func *
    enddef


Thank you
N i co las

--
--
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/ec6b990a-9196-4089-ae4a-fd043c9e8749n%40googlegroups.com.

Wednesday, February 1, 2023

Re: Why does (my) Vim leave the cursor to the last mark even if I don't save the file?

Hi Tony,
I'm sending you a link, where probably there's the original French from
the quote:
https://athena.unige.ch/athena/rousseau/confessions/rousseau-confessions.html
Look for the paragraph which begins with "Je crois que voilà de quoi faire".

--
Cesar

--
--
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/bffd0b1a-0c00-2fda-e9c6-4eb36949c087%40gmail.com.