Saturday, November 25, 2023

Re: Rely on ‘runtimeparh’ in import autoload

> On Nov 25, 2023, at 08:20, Lifepillar <lifepillar@lifepillar.me> wrote:
>
> What is the use case for an autoload mechanism when plugins have been
> turned off? Are you talking about `import autoload` statements in
> a vimrc file?

I have a makefile that tests Vim plugins, each test in a dedicated vim --clean. I don't need autoload per se here, I can explicitly source the autoload scripts, but a plugin script would fail if its import fails. So a plugin's import autoload has to work even if the plugin isn't loaded at Vim startup.

>> , when is it a good time to use it?
>
> It's just a matter of personal preference. In most cases the difference
> won't be noticeable. I'd stick with relative paths to avoid potential,
> although probably rare, name conflicts.

Thank you, that helps.


Matan

--
--
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/14B2DEF4-FAAD-48D3-B104-4BE14C0058C1%40gmail.com.

Re: Rely on ‘runtimeparh’ in import autoload

On Sat, Nov 25, 2023 at 2:20 PM Lifepillar <lifepillar@lifepillar.me> wrote:
>
> On 2023-11-24, Matan Nassau <matan.nassau@gmail.com> wrote:
> > When is it good practice to use the import autoload form that relies
> > on 'runtimepath'?
> >
> > import autoload 'foo.vim'
> >
> > I think plugins generally know where their autoload stuff is, and can
> > gain a few milliseconds by pointing the import directly at it with
> > a relative path.
> >
> > And, the runtimepath form generally won't work when 'loadplugins'
> > isn't set (when starting Vim with --clean for example).
>
> What is the use case for an autoload mechanism when plugins have been
> turned off? Are you talking about `import autoload` statements in
> a vimrc file?
>
> > So what is the feature for
>
> Vim 9 script inherits the autoload mechanism from Vim legacy script,
> where runtimepath is used. I think that is the main reason for that
> behaviour.
>
> >, when is it a good time to use it?
>
> It's just a matter of personal preference. In most cases the difference
> won't be noticeable. I'd stick with relative paths to avoid potential,
> although probably rare, name conflicts.
>
> Life.

The advantage of using 'runtimepath' (not 'runtimeparh') is that the
sysadmin and the user can to some extent customize the plugin by
adding their own scripts in other directories than those located under
$VIMRUNTIME (which is reserved for scripts distributed together with
Vim). For instance, if a sysadmin loads a set of scripts for all users
of a given system under $VIM/vimfiles/… a user who knows what (s)he's
doing can customize it by means of additional scripts of the same name
and path below (on Unix) $HOME/.vim/after/… or (on Windows but in Vim
notation) $HOME/vimfiles/after/…

Also, if a third-party plugin (installed under $VIM/vimfiles/… or
$HOME/.vim/… etc.) becomes an "official plugin" distributed with Vim
(as happened in the past for matchit, netrw, VimBall, and others), its
scripts will change location and come under $VIMRUNTIME/… By using
'runtimepath' the plugin will continue functioning in exactly the same
way regardless of under which of the 'runtimepath' directories its
scripts are installed.

Best regards,
Tony.

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

Re: Rely on ‘runtimeparh’ in import autoload

On 2023-11-24, Matan Nassau <matan.nassau@gmail.com> wrote:
> When is it good practice to use the import autoload form that relies
> on 'runtimepath'?
>
> import autoload 'foo.vim'
>
> I think plugins generally know where their autoload stuff is, and can
> gain a few milliseconds by pointing the import directly at it with
> a relative path.
>
> And, the runtimepath form generally won't work when 'loadplugins'
> isn't set (when starting Vim with --clean for example).

What is the use case for an autoload mechanism when plugins have been
turned off? Are you talking about `import autoload` statements in
a vimrc file?

> So what is the feature for

Vim 9 script inherits the autoload mechanism from Vim legacy script,
where runtimepath is used. I think that is the main reason for that
behaviour.

>, when is it a good time to use it?

It's just a matter of personal preference. In most cases the difference
won't be noticeable. I'd stick with relative paths to avoid potential,
although probably rare, name conflicts.

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/ujssak%24157a%241%40ciao.gmane.io.

Thursday, November 23, 2023

Rely on ‘runtimeparh’ in import autoload

Hello.

When is it good practice to use the import autoload form that relies on 'runtimepath'?

import autoload 'foo.vim'

I think plugins generally know where their autoload stuff is, and can gain a few milliseconds by pointing the import directly at it with a relative path.

And, the runtimepath form generally won't work when 'loadplugins' isn't set (when starting Vim with --clean for example).

So what is the feature for, when is it a good time to use it?


Matan

--
--
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/FF19CA0E-D69B-4BFB-B37A-5CB50A43421E%40gmail.com.

Wednesday, November 22, 2023

Re: How do you set options in the _vimrc file?

On 2023-11-22 19:53, Christian Castro wrote:
> Weird thing, Windows doesn???t show that it's write protected
> and there is no Windows service for VIM nor is there a VIM
> program running as per Task Manager, so I have no idea why
> Windows is saying it's not editable, unless VIM has done
> something fancy in the registry somehow.
>
> Any advice on how to unlock the _vimrc file in C:\Program Files (x86)\Vim\ ?

That sounds like a suspect location, as a system-install location.
Usually it should be something like

C:\Users\ccastro\_vimrc

-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/ZV5mAYfhWQGkPBcR%40thechases.com.

RE: How do you set options in the _vimrc file?

Silly question but when I try to edit the file it comes back that it's not editable.
Weird thing, Windows doesn't show that it's write protected and there is no Windows service for VIM nor is there a VIM program running as per Task Manager, so I have no idea why Windows is saying it's not editable, unless VIM has done something fancy in the registry somehow.

Any advice on how to unlock the _vimrc file in C:\Program Files (x86)\Vim\ ?


Thanks


-----Original Message-----
From: vim_use@googlegroups.com <vim_use@googlegroups.com> On Behalf Of Tony Mechelynck
Sent: Monday, November 20, 2023 8:21 PM
To: vim_use@googlegroups.com
Subject: Re: How do you set options in the _vimrc file?

On Tue, Nov 21, 2023 at 2:03 AM Tim Chase <vim@tim.thechases.com> wrote:
>
> On 2023-11-21 00:37, Christian Castro wrote:
> > How do you change the options in the _vimrc file?
>
> It's just a text-file, so you can put in the settings you want.
> So you can just put these commands in that file:
>
> set nohlo
> set ts=4
> set sw=4
>
> > Please let me know if the _vimrc file is editable from gVim or am I
> > going about this the wrong way (and what the right way is).
>
> So yes, you should be able to edit it like any other file. It even
> comes with a handy built-in variable, so within vim you can
>
> :e $MYVIMRC
>
> and it will open the appropriate file.
>
> Alternatively, you can use the
>
> :mkvimrc
>
> command to take whatever your current settings are and write them to
> your vimrc file.
>
> -tim
>
> :help $MYVIMRC
> :help :mkvimrc

IIUC, :mkvimrc can create a vimrc but not modify an existing one.

The vimrc (i.e. the .vimrc or _vimrc) is a plain text file: it is made to be editable, typically with Vim. I recommend to start with a vimrc containing

:runtime vimrc_example.vim

and then add below that (or rarely above it) whatever suits your fancy to add settings not set by the vimrc_example.vim (and the defauts.vim which it sources) or to override those they do set.

Best regards,
Tony.

--
--
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/CAJkCKXsYEEzPgLQjeLh%2BtWzZBVd1zLku4x2t0m0KqzG46Ov%2BLA%40mail.gmail.com.

****WARNING**** This email message (including any attachments) are to be treated as confidential/proprietary and may contain copyrighted or other legally protected information. It is intended only for the addressee(s) identified above. If you are not the addressee(s), or an employee or agent of the addressee(s), please note that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this information in error, please destroy the information and notify the sender of the error. Thank you.

--
--
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/MN2PR13MB3326366B037350BFCDB63F679CBAA%40MN2PR13MB3326.namprd13.prod.outlook.com.

Re: Can virtual text overwrite existing text?

On Wed, Nov 22, 2023 at 7:29 PM Girish <girishji@gmail.com> wrote:
>
> When I add 1 letter of virtual text through prop_add() it shifts the remaining text on the line by one character. Is it possible to make it overwrite existing text so there is no shifting of characters?
> Thank you
> girish
>
This is documented at ":help virtual-text". Depending on how you call
prop_add() your virtual text, which IIUC can be more than one
character long, pushes whatever is after it either horizontally or
vertically. If you want no shifting of characters it is possible to
display the virtual text "in column zero" and in that case "it will be
displayed above, below or after the actual text" depending on the
"text_align" and "text_wrap" arguments. Since the virtual text is not
editable it is not possible to place the cursor on it.

Best regards,
Tony.

--
--
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/CAJkCKXv_Tvs2-Cu8RXMVd9NxPphPRhd6ucr-F814gaCR67Au0g%40mail.gmail.com.

Can virtual text overwrite existing text?

When I add 1 letter of virtual text through prop_add() it shifts the remaining text on the line by one character. Is it possible to make it overwrite existing text so there is no shifting of characters?
Thank you
girish

--
--
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/9236aa54-f7b1-49a0-9398-c476b6fe4d9an%40googlegroups.com.

Monday, November 20, 2023

Re: How do you set options in the _vimrc file?

On Tue, Nov 21, 2023 at 2:03 AM Tim Chase <vim@tim.thechases.com> wrote:
>
> On 2023-11-21 00:37, Christian Castro wrote:
> > How do you change the options in the _vimrc file?
>
> It's just a text-file, so you can put in the settings you want.
> So you can just put these commands in that file:
>
> set nohlo
> set ts=4
> set sw=4
>
> > Please let me know if the _vimrc file is editable from gVim or
> > am I going about this the wrong way (and what the right way is).
>
> So yes, you should be able to edit it like any other file. It even
> comes with a handy built-in variable, so within vim you can
>
> :e $MYVIMRC
>
> and it will open the appropriate file.
>
> Alternatively, you can use the
>
> :mkvimrc
>
> command to take whatever your current settings are and write them
> to your vimrc file.
>
> -tim
>
> :help $MYVIMRC
> :help :mkvimrc

IIUC, :mkvimrc can create a vimrc but not modify an existing one.

The vimrc (i.e. the .vimrc or _vimrc) is a plain text file: it is made
to be editable, typically with Vim. I recommend to start with a vimrc
containing

:runtime vimrc_example.vim

and then add below that (or rarely above it) whatever suits your fancy
to add settings not set by the vimrc_example.vim (and the defauts.vim
which it sources) or to override those they do set.

Best regards,
Tony.

--
--
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/CAJkCKXsYEEzPgLQjeLh%2BtWzZBVd1zLku4x2t0m0KqzG46Ov%2BLA%40mail.gmail.com.

Re: How do you set options in the _vimrc file?

On 2023-11-21 00:37, Christian Castro wrote:
> How do you change the options in the _vimrc file?

It's just a text-file, so you can put in the settings you want.
So you can just put these commands in that file:

set nohlo
set ts=4
set sw=4

> Please let me know if the _vimrc file is editable from gVim or
> am I going about this the wrong way (and what the right way is).

So yes, you should be able to edit it like any other file. It even
comes with a handy built-in variable, so within vim you can

:e $MYVIMRC

and it will open the appropriate file.

Alternatively, you can use the

:mkvimrc

command to take whatever your current settings are and write them
to your vimrc file.

-tim

:help $MYVIMRC
:help :mkvimrc




--
--
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/ZVwB3R6pRsQzFWSs%40thechases.com.

How do you set options in the _vimrc file?

Hello,

How do you change the options in the _vimrc file?
I'm using a newer version of gVim 9.0 and when I launch gVim, there are options under File -> Towards the bottom -> I've tried all of them but the _vimrc file doesn't get modified and when I open gVim again, my options (background color, etc) are gone.

I'd like to set these:
set nohlo
set ts=4
set sw=4

Please let me know if the _vimrc file is editable from gVim or am I going about this the wrong way (and what the right way is).


Thank you

****WARNING**** This email message (including any attachments) are to be treated as confidential/proprietary and may contain copyrighted or other legally protected information. It is intended only for the addressee(s) identified above. If you are not the addressee(s), or an employee or agent of the addressee(s), please note that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this information in error, please destroy the information and notify the sender of the error. Thank you.

--
--
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/MN2PR13MB332603A3D9CC739A1932452A9CBBA%40MN2PR13MB3326.namprd13.prod.outlook.com.

Saturday, November 18, 2023

Re: Vim explained in 6 Kbyte - Translation

Hello,


Thank you for your message.

As explained by Salman, there is no V sound in the Arabic language.

There is however this one: https://en.wiktionary.org/wiki/%DA%A4#Arabic (which is a modified version of the letter ف). It is pronounced as "V". The problem is that this is not used in many Arab countries.

Furthermore, the Arabic Wikipedia page for Vim spells the word "Vim" in the same way as the one I have written: https://ar.wikipedia.org/wiki/%D9%81%D9%8A%D9%85_(%D9%85%D8%AD%D8%B1%D8%B1_%D9%86%D8%B5%D9%88%D8%B5)

I hope that clears up the confusion.



Harvey

On Sunday, November 12, 2023 at 4:13:36 PM UTC Tom M wrote:
Hi,

Just our of curiosity I have put the text

>                              "ما هو فيم؟"
>                         شرح في ستة كيلوبايت.

> فيم (بالإنجليزية: Vim) هو نسخة محسّنة من محرر نصوص أقدم
> يُعرف بإسم في آي (بالإنجليزية: Vi).

 into Google Translate to get English translation and this is what I've got:

> "What is Wim?"
>                          Explanation in six kilobytes.

> Vim is an improved version of an older text editor
> Known as Vi.

Not the "Wim" in the first line. I expected this to be "Vim". All the rest has "Vim".

Is it an problem of the translation to Arabic or did Google do incorrect translation to English?
Or am I missing something?

Tom

On Monday, October 2, 2023 at 6:35:04 PM UTC+2 Christian Brabandt wrote:

On Mo, 02 Okt 2023, Harvey R wrote:

> Hello,
>
>
> I hope all is well.
>
> First of all, I am deeply saddened to hear about the loss of Mr. Moolenaar.
> Please accept my heartfelt condolences.
>
> Unfortunately, I am not a good programmer, and so I decided that it may be
> better to spread the word about Vim by translating the "Vim explained in 6
> Kbyte" into Arabic (my Arabic friends have helped me with the translation).
>
> So, I am writing to inform you that I have successfully completed the
> translation of the "Vim explained in 6 Kbyte" into Arabic. Throughout the
> translation process, I made sure to maintain the accuracy and integrity of the
> original documents while adapting them to cater to an Arabic-speaking audience.
> Please find the translated content, which is now ready for your review.
>
> I have followed the steps on https://vimonline.sourceforge.net/, but I am not
> sure if my emails get through to Sourceforge. So, I decided to post it here in
> the hopes that someone can advise me.
>
> Thank you for your hard work, as always.
>
> Wishing you the best.
>
>
> Harvey

Thanks, I can place it here: https://www.vim.org/6kbyte.php

Best,
Christian
--
Since when has the purpose of debian been to appease the interests of the
mass of unskilled consumers? -- Steve Shorter

--
--
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/3e893c0e-0ab5-4865-b54e-7af914f2878an%40googlegroups.com.

Re: Track changes to readonly

@Christan

Thanks! "OptionSet" was the event I had been looking for. I actually failed to recognize it...

On Friday, November 17, 2023 at 12:53:16 PM UTC+1 Christian Brabandt wrote:

On Do, 16 Nov 2023, 'Aaron Heifetz' via vim_use wrote:

> I wonder how it is possible to react to changes to a buffer's readonly flag
> both,
> - after starting vi, e.g. with gvim -c "set ro" (not gvim -R), and
> - when changing the flag via the command line.

I don't understand the difference between those two checks. For the
first one, you can call a function on VimEnter, check the flag and set
your background color, see also the 'wincolor' setting. But how do you
change the flag via the command line, if not during startup?

You may also trigger a function on an OptionSet autocommand, that reacts
to setting those option values after startup.

Thanks,
Christian
--
Hell is empty and all the devils are here.
-- Wm. Shakespeare, "The Tempest"

--
--
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/9909ad14-93b3-4a05-b19e-460f581b2708n%40googlegroups.com.

Friday, November 17, 2023

Re: Track changes to readonly

On Do, 16 Nov 2023, 'Aaron Heifetz' via vim_use wrote:

> I wonder how it is possible to react to changes to a buffer's readonly flag
> both,
> - after starting vi, e.g. with gvim -c "set ro" (not gvim -R), and
> - when changing the flag via the command line.

I don't understand the difference between those two checks. For the
first one, you can call a function on VimEnter, check the flag and set
your background color, see also the 'wincolor' setting. But how do you
change the flag via the command line, if not during startup?

You may also trigger a function on an OptionSet autocommand, that reacts
to setting those option values after startup.

Thanks,
Christian
--
Hell is empty and all the devils are here.
-- Wm. Shakespeare, "The Tempest"

--
--
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/ZVdUIe6%2BOcRjjXrZ%40256bit.org.

Thursday, November 16, 2023

Track changes to readonly

I wonder how it is possible to react to changes to a buffer's readonly flag both,
- after starting vi, e.g. with gvim -c "set ro" (not gvim -R), and
- when changing the flag via the command line.
So far I haven't found an event covering these cases.
I want to change the background ("highlight Normal") dynamically based on the buffer's state.

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/e1f8f397-f7c4-4d8f-83bf-91fa36666e19n%40googlegroups.com.

Tuesday, November 14, 2023

Re: How to make Vim having a little better mouse support

On 2023-11-13, Gary Johnson wrote:
> On 2023-11-13, Igor Lerinc wrote:
> > > This works as you want it to, right?  Double- and triple- clicks work that
> > way for me.
> >
> > Double click, should select word. Doesn't work.
>
> That's odd. I've tried gvim, vim in an xterm, vim in a GNOME
> Terminal, and vim in an xfce4-terminal (version 0.8.9.1) and
> double-clicking always selects one word. I started each one with
> "-N -u NONE -i NONE" arguments to make sure I didn't include
> anything from my vimrc or plugins.

P.S.

You'll also have to

:set mouse=a

in those terminal vims to check whether double clicking works.
Otherwise, you'll just be seeing the behavior of the terminal, not
vim.

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/20231114182820.GC4044%40phoenix.

Monday, November 13, 2023

Re: How to make Vim having a little better mouse support

On 2023-11-13, Igor Lerinc wrote:
> > This works as you want it to, right?  Double- and triple- clicks work that
> way for me.
>
> Double click, should select word. Doesn't work.

That's odd. I've tried gvim, vim in an xterm, vim in a GNOME
Terminal, and vim in an xfce4-terminal (version 0.8.9.1) and
double-clicking always selects one word. I started each one with
"-N -u NONE -i NONE" arguments to make sure I didn't include
anything from my vimrc or plugins.

> > vnoremap <ScrollWheelUp> k
> > vnoremap <ScrollWheelDown> j
>
> this works, but is there way that it goes UP, like it does when going DOWN,
> that it automatically expands toward UP. I don't know if it's because of my
> xfce4 terminal, and terminal doesn't send some stuff ? Which terminal you use ?

To make those two mappings move in the opposite direction, just swap
the j and k, like this:

vnoremap <ScrollWheelUp> j
vnoremap <ScrollWheelDown> k

I almost always use an xterm, although I tried the others above to
see if they would behave any differently. It turned out that
mapping the scroll wheel worked in all cases, but it worked
differently depending on the terminal and the window manager.

You can determine the escape sequence received by Vim in response to
using the scroll wheel by opening a new line, typing Ctrl-K, the
moving the scroll wheel once up or down. You should see the key
code, like this:

<ScrollWheelUp>

or

<ScrollWheelDown>

That's what I see when using xterm or GNOME Terminal in a GNOME 42
desktop on Ubuntu 22.04. However, on my Ubuntu 20.04 system running
the xfce4 desktop, xfce4-terminal shows

<2-ScrollWheelUp>

and

<2-ScrollWheelDown>

while xterm shows

<3-ScrollWheelUp>

and

<3-ScrollWheelDown>

Very odd. It's a simple matter to change the mapping to match those
key codes, but I don't understand why they're different. You don't
seem to see those, but I thought I should mention it in case you had
problems with those mappings.

Since you said that you wanted Vim to behave as other GUI editors
do, I assumed at the time that you were using gvim. The 'guicursor'
option works in the GUI but not in a terminal. To change the cursor
shape or color when using vim in a terminal, see:

:help termcap-cursor-shape

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/20231114005602.GB4044%40phoenix.

Re: How to make Vim having a little better mouse support

> This works as you want it to, right?  Double- and triple- clicks work that way for me.

Double click, should select word. Doesn't work.


> vnoremap <ScrollWheelUp> k
> vnoremap <ScrollWheelDown> j

this works, but is there way that it goes UP, like it does when going DOWN, that it automatically expands toward UP. I don't know if it's because of my xfce4 terminal, and terminal doesn't send some stuff ? Which terminal you use ? 





On Mon, Nov 13, 2023 at 11:06 PM Gary Johnson <garyjohn@spocom.com> wrote:
On 2023-11-13, Igor Lerinc wrote:
> Yes, I did all tips I could apply about enabling mouse support in `.vimrc`, but
> I just want to have mouse support like in every other GUI editor.
>
>
>
> 1. I just need it to be able scroll with mouse selection (when I select, and go
> UP, it wont scroll to up like in every GUI editor does) (it can go DOWN though)
> .

vnoremap <ScrollWheelUp> k
vnoremap <ScrollWheelDown> j

> 2. When I click two times, that it do usual thing GUI editors would do, to
> select that word, or even whole line on three clicks. (currently, just works,
> on selecting whole line on three clicks)

This works as you want it to, right?  Double- and triple- clicks
work that way for me.

> 3. And could that cursor be as line always, and not in block when it's normal
> mode ? it would be nice, if there's some plugin, to change color of cursor, so
> I could know I'm in normal/insert mode.

See

    :help 'guicursor'

That covers both shape and color.

HTH,
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/fj_QrzAydfw/unsubscribe.
To unsubscribe from this group and all its topics, 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/20231113220511.GA4044%40phoenix.

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

Re: How to make Vim having a little better mouse support

On 2023-11-13, Igor Lerinc wrote:
> Yes, I did all tips I could apply about enabling mouse support in `.vimrc`, but
> I just want to have mouse support like in every other GUI editor.
>
>
>
> 1. I just need it to be able scroll with mouse selection (when I select, and go
> UP, it wont scroll to up like in every GUI editor does) (it can go DOWN though)
> .

vnoremap <ScrollWheelUp> k
vnoremap <ScrollWheelDown> j

> 2. When I click two times, that it do usual thing GUI editors would do, to
> select that word, or even whole line on three clicks. (currently, just works,
> on selecting whole line on three clicks)

This works as you want it to, right? Double- and triple- clicks
work that way for me.

> 3. And could that cursor be as line always, and not in block when it's normal
> mode ? it would be nice, if there's some plugin, to change color of cursor, so
> I could know I'm in normal/insert mode.

See

:help 'guicursor'

That covers both shape and color.

HTH,
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/20231113220511.GA4044%40phoenix.

How to make Vim having a little better mouse support

Yes, I did all tips I could apply about enabling mouse support in `.vimrc`, but I just want to have mouse support like in every other GUI editor.



1. I just need it to be able scroll with mouse selection (when I select, and go UP, it wont scroll to up like in every GUI editor does) (it can go DOWN though) .

2. When I click two times, that it do usual thing GUI editors would do, to select that word, or even whole line on three clicks. (currently, just works, on selecting whole line on three clicks)

3. And could that cursor be as line always, and not in block when it's normal mode ? it would be nice, if there's some plugin, to change color of cursor, so I could know I'm in normal/insert mode.


Here is init.vim , I enabled those things but it's not enough as GUI editors do mouse support better.

I'm mainly using vim (neovim plugin) in VSCode, so that's why I need it more mouse friendly.  


P.S. this is actually neovim, but same would apply, it doesn't have support for mouse good enough

--
--
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/97b7a54f-563f-4a03-91a0-6ea639a88cddn%40googlegroups.com.

How to make Vim having a little better mouse support

Yes, I did all tips I could apply about enabling mouse support in `.vimrc`, but I just want to have mouse support like in every other GUI editor.



1. I just need it to be able scroll with mouse selection (when I select, and go UP, it wont scroll to up like in every GUI editor does) (it can go DOWN though) .

2. When I click two times, that it do usual thing GUI editors would do, to select that word, or even whole line on three clicks. (currently, just works, on selecting whole line on three clicks)

3. And could that cursor be as line always, and not in block when it's normal mode ? it would be nice, if there's some plugin, to change color of cursor, so I could know I'm in normal/insert mode.


Here is init.vim , I enabled those things but it's not enough as GUI editors do mouse support better.

I'm mainly using vim (neovim plugin) in VSCode, so that's why I need it more mouse friendly.  


P.S. this is actually neovim, but same would apply, it doesn't have support for mouse good enough

--
--
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/a344c4df-4eeb-400a-b593-8505250f7875n%40googlegroups.com.

How to make Vim having a little better mouse support

Yes, I did all tips I could apply about enabling mouse support in `.vimrc`, but I just want to have mouse support like in every other GUI editor.



1. I just need it to be able scroll with mouse selection (when I select, and go UP, it wont scroll to up like in every GUI editor does) (it can go DOWN though) .

2. When I click two times, that it do usual thing GUI editors would do, to select that word, or even whole line on three clicks. (currently, just works, on selecting whole line on three clicks)

3. And could that cursor be as line always, and not in block when it's normal mode ? it would be nice, if there's some plugin, to change color of cursor, so I could know I'm in normal/insert mode.


Here is .vimrc , I enabled those things but it's not enough as GUI editors do mouse support better. 





--
--
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/b90b7aec-e9ba-4561-8a22-a2cc6e97937an%40googlegroups.com.

Sunday, November 12, 2023

Re: Vim explained in 6 Kbyte - Translation

Quick summary: it's a quirk of transliterating a word into a language that doesn't actually have the corresponding consonant sound.

Long version:

Technically, Arabic only has a single letter that does the work of both V and W. You see this in people starting from the Middle East and going all the way into India where they often mix the two together when speaking, especially when first learning a European language that does distinguish between the two sounds. 'Vorld Var II' and 'wolleyball', etc. So, V is often written as a F and what you see below is technically 'Fim'.

(I know most Indian languages don't use the same writing scripts, but they share that V/W ambiguity, all the same.)

You see a version of that F (ف) with three dots over it in Saudi Arabia that they pronounce like a proper V, but it's not a formal part of the language, so Vim ends up being Fim when written in Arabic (I would've chosen [VW]im, personally, so it would get pronounced as Vim or Wim) and risks getting transliterated incorrectly when brought back into English. 

Salman

On Sun, Nov 12, 2023, 11:13 Tom M <7tommm@gmail.com> wrote:
Hi,

Just our of curiosity I have put the text

>                              "ما هو فيم؟"
>                         شرح في ستة كيلوبايت.

> فيم (بالإنجليزية: Vim) هو نسخة محسّنة من محرر نصوص أقدم
> يُعرف بإسم في آي (بالإنجليزية: Vi).

 into Google Translate to get English translation and this is what I've got:

> "What is Wim?"
>                          Explanation in six kilobytes.

> Vim is an improved version of an older text editor
> Known as Vi.

Not the "Wim" in the first line. I expected this to be "Vim". All the rest has "Vim".

Is it an problem of the translation to Arabic or did Google do incorrect translation to English?
Or am I missing something?

Tom

On Monday, October 2, 2023 at 6:35:04 PM UTC+2 Christian Brabandt wrote:

On Mo, 02 Okt 2023, Harvey R wrote:

> Hello,
>
>
> I hope all is well.
>
> First of all, I am deeply saddened to hear about the loss of Mr. Moolenaar.
> Please accept my heartfelt condolences.
>
> Unfortunately, I am not a good programmer, and so I decided that it may be
> better to spread the word about Vim by translating the "Vim explained in 6
> Kbyte" into Arabic (my Arabic friends have helped me with the translation).
>
> So, I am writing to inform you that I have successfully completed the
> translation of the "Vim explained in 6 Kbyte" into Arabic. Throughout the
> translation process, I made sure to maintain the accuracy and integrity of the
> original documents while adapting them to cater to an Arabic-speaking audience.
> Please find the translated content, which is now ready for your review.
>
> I have followed the steps on https://vimonline.sourceforge.net/, but I am not
> sure if my emails get through to Sourceforge. So, I decided to post it here in
> the hopes that someone can advise me.
>
> Thank you for your hard work, as always.
>
> Wishing you the best.
>
>
> Harvey

Thanks, I can place it here: https://www.vim.org/6kbyte.php

Best,
Christian
--
Since when has the purpose of debian been to appease the interests of the
mass of unskilled consumers? -- Steve Shorter

--
--
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/33e8fb46-99d4-43a0-b93e-006feae04615n%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/CANuxnEd2J8PCffe5ngex4jDTy6jbka3XMN%2B56zRjQakQrri0Eg%40mail.gmail.com.

Re: Vim explained in 6 Kbyte - Translation

For what it's worth, if you input the same text to ChatGPT (I used both GPT-4 and GPT-3.5 to test) and ask to translate to English, it correctly says "Vim". Bing's translator (which, to be fair, may actually just use ChatGPT's engine behind the scenes) also gets it correct.

Dan

On Sun, Nov 12, 2023, at 11:13 AM, Tom M wrote:
Hi,

Just our of curiosity I have put the text

>                              "ما هو فيم؟"
>                         شرح في ستة كيلوبايت.

> فيم (بالإنجليزية: Vim) هو نسخة محسّنة من محرر نصوص أقدم
> يُعرف بإسم في آي (بالإنجليزية: Vi).

 into Google Translate to get English translation and this is what I've got:

> "What is Wim?"
>                          Explanation in six kilobytes.

> Vim is an improved version of an older text editor
> Known as Vi.
Not the "Wim" in the first line. I expected this to be "Vim". All the rest has "Vim".

Is it an problem of the translation to Arabic or did Google do incorrect translation to English?
Or am I missing something?

Tom

On Monday, October 2, 2023 at 6:35:04 PM UTC+2 Christian Brabandt wrote:

On Mo, 02 Okt 2023, Harvey R wrote:

> Hello,
>
>
> I hope all is well.
>
> First of all, I am deeply saddened to hear about the loss of Mr. Moolenaar.
> Please accept my heartfelt condolences.
>
> Unfortunately, I am not a good programmer, and so I decided that it may be
> better to spread the word about Vim by translating the "Vim explained in 6
> Kbyte" into Arabic (my Arabic friends have helped me with the translation).
>
> So, I am writing to inform you that I have successfully completed the
> translation of the "Vim explained in 6 Kbyte" into Arabic. Throughout the
> translation process, I made sure to maintain the accuracy and integrity of the
> original documents while adapting them to cater to an Arabic-speaking audience.
> Please find the translated content, which is now ready for your review.
>
> I have followed the steps on https://vimonline.sourceforge.net/, but I am not
> sure if my emails get through to Sourceforge. So, I decided to post it here in
> the hopes that someone can advise me.
>
> Thank you for your hard work, as always.
>
> Wishing you the best.
>
>
> Harvey

Thanks, I can place it here: https://www.vim.org/6kbyte.php

Best,
Christian
--
Since when has the purpose of debian been to appease the interests of the
mass of unskilled consumers? -- Steve Shorter


--
--
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.

Re: Vim explained in 6 Kbyte - Translation

Hi,

Just our of curiosity I have put the text

>                              "ما هو فيم؟"
>                         شرح في ستة كيلوبايت.

> فيم (بالإنجليزية: Vim) هو نسخة محسّنة من محرر نصوص أقدم
> يُعرف بإسم في آي (بالإنجليزية: Vi).

 into Google Translate to get English translation and this is what I've got:

> "What is Wim?"
>                          Explanation in six kilobytes.

> Vim is an improved version of an older text editor
> Known as Vi.

Not the "Wim" in the first line. I expected this to be "Vim". All the rest has "Vim".

Is it an problem of the translation to Arabic or did Google do incorrect translation to English?
Or am I missing something?

Tom

On Monday, October 2, 2023 at 6:35:04 PM UTC+2 Christian Brabandt wrote:

On Mo, 02 Okt 2023, Harvey R wrote:

> Hello,
>
>
> I hope all is well.
>
> First of all, I am deeply saddened to hear about the loss of Mr. Moolenaar.
> Please accept my heartfelt condolences.
>
> Unfortunately, I am not a good programmer, and so I decided that it may be
> better to spread the word about Vim by translating the "Vim explained in 6
> Kbyte" into Arabic (my Arabic friends have helped me with the translation).
>
> So, I am writing to inform you that I have successfully completed the
> translation of the "Vim explained in 6 Kbyte" into Arabic. Throughout the
> translation process, I made sure to maintain the accuracy and integrity of the
> original documents while adapting them to cater to an Arabic-speaking audience.
> Please find the translated content, which is now ready for your review.
>
> I have followed the steps on https://vimonline.sourceforge.net/, but I am not
> sure if my emails get through to Sourceforge. So, I decided to post it here in
> the hopes that someone can advise me.
>
> Thank you for your hard work, as always.
>
> Wishing you the best.
>
>
> Harvey

Thanks, I can place it here: https://www.vim.org/6kbyte.php

Best,
Christian
--
Since when has the purpose of debian been to appease the interests of the
mass of unskilled consumers? -- Steve Shorter

--
--
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/33e8fb46-99d4-43a0-b93e-006feae04615n%40googlegroups.com.