Friday, January 31, 2020

Re: How about dropping the MzScheme interface?

> Sorry Jesus! I meant what do people use Vim or notepad for?
>

We might find it easier to understand if you explain how you use
computers, and for what? What programs do you use as tools?

--
--
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/30f46725073f03ef64ef9c443dffee52.squirrel%40webmail.vybenetworks.com.

Re: How about dropping the MzScheme interface?

>
> On Mi, 29 Jan 2020, Jesus Arocho wrote:
>
>> I have been reading this thread and I am not sure I understand the
>> question: "why would anyone need to alter text"
>

From the point of view of a programmer, system administrator, or even a
user entering data, this does sound as strange as "why would anyone need
to breathe?"


--
--
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/3aa20497978356a812c0fe62c410ca02.squirrel%40webmail.vybenetworks.com.

Thursday, January 30, 2020

Re: How about dropping the MzScheme interface?

Please let me apologize to Dominque and Gabriele for wasting the group's time. I somehow got signed up to this list and sorry I didn't mean alter text I meant edit text.I'm not a troll! Let me thank Tony and Jesus for their answers and sorry for wasting the group's time!

On Thu, Jan 30, 2020 at 12:05 PM Dominique Pellé <dominique.pelle@gmail.com> wrote:
Gabriele Fava <gbfv@tiscali.it> wrote:

> So you were really not just playing along?
> You guys need to add a troll detector to your vimrc (I think Emacs has
> one built-in)

The discussion about the troll as derailed this thread which
was originally about the MzScheme interface. Let's only
reply to discuss the MzScheme interface from now on.

MzScheme vim interface does not look like it's used a lot.
So far, Ionly tux. (zeug@tuxproject.de) has said that he
uses the MzScheme interface, and for personal scripts only.

Perhaps the original author of the mzscheme interface
i.e Brent Fulgham or Sergey Khorev who added dynamic
binding according to :help if_mzsch.txt use the mzscheme interface?

Regards
Dominique

--
--
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/CAON-T_g2so29DKXJDqyVCmauD_A-%3D7Ct1PhTvmVifd7bwygZaw%40mail.gmail.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/CAHOpw6xpC9TG4CAJK3WuhPdW45ZNmhYP1Cg3VGvi4sWk4vJOkg%40mail.gmail.com.

Re: how can I configure plugins managed by vim's package manager?

On 2020-01-30, Aaron Bohannon wrote:
> Hi,
>
> I am running into a problem when trying to use vim's built-in package
> management system: since vim doesn't look for and run the plugins until after
> the .vimrc is executed, where am I supposed to put my configuration code that
> depends upon the functionality defined in my plugins?
>
> For instance, the vim-operator-user plugin (https://github.com/kana/
> vim-operator-user/) defines a function "operator#user#define()". If I try to
> call the function in my .vimrc, vim will, at start-up, generate an error
> telling me that the function doesn't exist. However, I know that I have
> installed the plug-in properly because, if I re-run my .vimrc immediately after
> start-up (using the ":source" command), vim will find the function, call it,
> and not generate any errors. So, where am I supposed to put my code that calls
> "operator#user#define()"?

What I usually do is put a VimEnter autocommand in my vimrc that
tests for the existence of the plugin function or command I want to
use before calling or executing it. For example, I have this for
configuring the Align plugin:

autocmd VimEnter * if exists(":AlignCtrl") | AlignCtrl p0P0 | endif

Your code would look something like this:

autocmd VimEnter * if exists("*operator#user#define)
\ | call operator#user#define()
\ | endif

See also:

:help VimEnter
:help exists()

Alternatively, I have put code that requires a particular plugin in
~/.vim/after/plugin/<pluginname>.vim. For example,
~/.vim/after/plugin/EnhancedDiff.vim contains this:

if !exists(":PatienceDiff")
finish
endif

PatienceDiff

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/20200130193139.GC4379%40phoenix.

how can I configure plugins managed by vim's package manager?

Hi,

I am running into a problem when trying to use vim's built-in package management system: since vim doesn't look for and run the plugins until after the .vimrc is executed, where am I supposed to put my configuration code that depends upon the functionality defined in my plugins?

For instance, the vim-operator-user plugin (https://github.com/kana/vim-operator-user/) defines a function "operator#user#define()". If I try to call the function in my .vimrc, vim will, at start-up, generate an error telling me that the function doesn't exist. However, I know that I have installed the plug-in properly because, if I re-run my .vimrc immediately after start-up (using the ":source" command), vim will find the function, call it, and not generate any errors. So, where am I supposed to put my code that calls "operator#user#define()"?

- Aaron

--
--
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/88a53227-bb3a-43f1-8ac2-ffe05616dbcd%40googlegroups.com.

Re: How about dropping the MzScheme interface?

Gabriele Fava <gbfv@tiscali.it> wrote:

> So you were really not just playing along?
> You guys need to add a troll detector to your vimrc (I think Emacs has
> one built-in)

The discussion about the troll as derailed this thread which
was originally about the MzScheme interface. Let's only
reply to discuss the MzScheme interface from now on.

MzScheme vim interface does not look like it's used a lot.
So far, Ionly tux. (zeug@tuxproject.de) has said that he
uses the MzScheme interface, and for personal scripts only.

Perhaps the original author of the mzscheme interface
i.e Brent Fulgham or Sergey Khorev who added dynamic
binding according to :help if_mzsch.txt use the mzscheme interface?

Regards
Dominique

--
--
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/CAON-T_g2so29DKXJDqyVCmauD_A-%3D7Ct1PhTvmVifd7bwygZaw%40mail.gmail.com.

Re: How about dropping the MzScheme interface?

So you were really not just playing along?
You guys need to add a troll detector to your vimrc (I think Emacs has
one built-in)

--
--
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/608b3688-8d25-b076-7b3e-ad543961d7aa%40tiscali.it.

Re: How about dropping the MzScheme interface?

If you have those kinds of questions, I still wonder how you came to be on this list, but regardless here are my thoughts.  Notepad is a fairly simple text editor designed to work only within the Windows environment.  I used it no occasion for either editing simple text files or capturing simple notes (the company I worked for was all Windows based, with the exception of servers.  Vim is used mostly by programmers to edit source files.  It is much more capable than Notepad in its functionality to edit within a file as well as the management of multiple files.  It can be used also for other purposes such as note taking, journaling, etc., but always with text files.

Hope this helps and I log off this thread.

On Wed, Jan 29, 2020 at 5:55 PM John Mon <john82654@gmail.com> wrote:
Sorry Jesus! I meant what do people use Vim or notepad for? 

On Wed, Jan 29, 2020 at 7:56 AM Jesus Arocho <un.yuquiyu@gmail.com> wrote:
I have been reading this thread and I am not sure I understand the question: "why would anyone need to alter text"

On Wed, Jan 29, 2020 at 12:01 AM John Mon <john82654@gmail.com> wrote:
Thanks for your time Tony! I've often wondered about why people ever need to alter text? If you have time I would love to know the answer. Thanks in advance!

On Tue, Jan 28, 2020 at 11:49 AM Tony Mechelynck <antoine.mechelynck@gmail.com> wrote:
On Mon, Jan 27, 2020 at 2:58 PM John Mon <john82654@gmail.com> wrote:
>
> Thanks Tony you mean like notepad in W10?

IMHO, Vim is to Notepad what a Rolls-Royce is to a bicycle (except on
the matter of price). But that's just my own opinion, after I've veen
using Notepad, then Vim, for a number of years.

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/CAJkCKXt4oG4R39y0A00DLmg%2B9zQmhePLm24Kzmi-Btr3hrz0bA%40mail.gmail.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/CAHOpw6z5C0kyK3AgMCs9_ctDa9KLgffrYARebuHg8KK1XOnXKw%40mail.gmail.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/CACacrc237ERXTGJAjTGK5cdNZjbGt7trT0y51a8Fw1MeuPgDpA%40mail.gmail.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/CAHOpw6zPoHNxT%2B8y_oVXcF7dZVaVK7m%3D%3DpVquQXB%3D0ibK%3DohMg%40mail.gmail.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/CACacrc2%3DPbkNK8mhJpTZkdXNNWPVk17Q7cK%3DFuv6eGdtvSqr7w%40mail.gmail.com.

Re: How to get the folder from a full file path?

On 2020-01-29, Zhe Lee wrote:
>
>
> On Tuesday, January 28, 2020 at 1:16:41 AM UTC+8, Gary Johnson wrote:
>
> On 2020-01-27, Zhe Lee wrote:
> > I know %:p %:t thes things. But What I need now is not
> > current folder I get a full file path from a regex match. 
> >
> > And now I need to get the folder from this full path. 
> >
> > I already Google a lot but can't find useful things all
> > related about "%:t :p" things so how to make it. 
> >
> > This is the code I use in the vimrc file. 
> >
> > function! HandleURL()
> >   let s:uri = matchstr(getline("."), '[a-zA-Z]*:\/[^ >,;]*')
> >   echo s:uri
> >   if s:uri != ""
> >     if s:uri =~ '^http'
> >         silent exec "AsyncRun chrome ".s:uri.""
> >     else
> >         """"""""""""""
> >         "I want to use the totalcmd64 to run the folder of the s:uri here.
> >         """"""""""""""
> >         silent exec "AsyncRun TOTALCMD64 ".s:uri.""
> >     endif
> >   else
> >     echo "No URI found in line."
> >   endif
> > endfunction
>
> I'm not sure I understand.  I think you're looking for fnamemodify()
> and the ":h" modifier, perhaps this:
>
>     silent exec "AsyncRun TOTALCMD64 ".fnamemodify(s:uri, ":h")
>
> See
>
>     :help fnamemodify()
>     :help filename-modifiers
>
> Regards,
> Gary
>
>  
>
>  Thank you. It worked.  But after checking the  manual,  I think  `  silent
> exec "AsyncRun TOTALCMD64 ".fnamemodify(s:uri, ":p:h") `  It's a better
> way.  Am I right? 

You're welcome. I'm glad to hear that it worked.

If s:uri is a path name relative to the current directory, you would
be right. However, if s:uri is a URI naming a file on your local
computer, then I would expect it to begin with "file:", for example:

file:///path/to/file

The part after "file://" is already a full path name, so using ":p"
is not going to help. It is not needed.

>  Thanks a lot for your help, I already find fnamemodify() before
> but seems my English is not good enough. 

You're welcome. I think that ":help expand()" may have a better
explanation of file name expansion, but I don't know whether its
English is any easier to understand.

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/20200130081044.GB4379%40phoenix.

Wednesday, January 29, 2020

Re: How to get the folder from a full file path?



On Tuesday, January 28, 2020 at 1:16:41 AM UTC+8, Gary Johnson wrote:
On 2020-01-27, Zhe Lee wrote:
> I know %:p %:t thes things. But What I need now is not current folder I get a
> full file path from a regex match. 
>
> And now I need to get the folder from this full path. 
>
> I already Google a lot but can't find useful things all related about "%:t :p"
> things so how to make it. 
>
> This is the code I use in the vimrc file. 
>
> function! HandleURL()
>   let s:uri = matchstr(getline("."), '[a-zA-Z]*:\/[^ >,;]*')
>   echo s:uri
>   if s:uri != ""
>     if s:uri =~ '^http'
>         silent exec "AsyncRun chrome ".s:uri.""
>     else
>         """"""""""""""
>         "I want to use the totalcmd64 to run the folder of the s:uri here.
>         """"""""""""""
>         silent exec "AsyncRun TOTALCMD64 ".s:uri.""
>     endif
>   else
>     echo "No URI found in line."
>   endif
> endfunction

I'm not sure I understand.  I think you're looking for fnamemodify()
and the ":h" modifier, perhaps this:

    silent exec "AsyncRun TOTALCMD64 ".fnamemodify(s:uri, ":h")

See

    :help fnamemodify()
    :help filename-modifiers

Regards,
Gary
 
 Thank you. It worked.  But after checking the  manual,  I think  `  silent exec "AsyncRun TOTALCMD64 ".fnamemodify(s:uri, ":p:h") `  It's a better way.  Am I right? 
 Thanks a lot for your help, I already find fnamemodify() before but seems my English is not 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/8d90c146-f1b8-4401-8b5b-f15046b1a761%40googlegroups.com.

Re: How about dropping the MzScheme interface?

On Wed, Jan 29, 2020 at 11:55 PM John Mon <john82654@gmail.com> wrote:
>
> Sorry Jesus! I meant what do people use Vim or notepad for?

And the answer was: to write text, including but not limited to
program code, and to modify it after it has been written, e.g. by
correcting spelling errors in plaintext or fixing bugs in program
code. Even web pages are "text" (their MIME type is "text/html") and
though there exist WISIWYG (i.e. "what-you-see-is-what-you-get")
editors for them, some webpage writers, including me, prefer writing
HTML in a plaintext editor such as Vim or even Notepad because this
way we have full control over exactly what the webpage would display
(in a well-behaved browser).

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

Re: How about dropping the MzScheme interface?

Sorry Jesus! I meant what do people use Vim or notepad for? 

On Wed, Jan 29, 2020 at 7:56 AM Jesus Arocho <un.yuquiyu@gmail.com> wrote:
I have been reading this thread and I am not sure I understand the question: "why would anyone need to alter text"

On Wed, Jan 29, 2020 at 12:01 AM John Mon <john82654@gmail.com> wrote:
Thanks for your time Tony! I've often wondered about why people ever need to alter text? If you have time I would love to know the answer. Thanks in advance!

On Tue, Jan 28, 2020 at 11:49 AM Tony Mechelynck <antoine.mechelynck@gmail.com> wrote:
On Mon, Jan 27, 2020 at 2:58 PM John Mon <john82654@gmail.com> wrote:
>
> Thanks Tony you mean like notepad in W10?

IMHO, Vim is to Notepad what a Rolls-Royce is to a bicycle (except on
the matter of price). But that's just my own opinion, after I've veen
using Notepad, then Vim, for a number of years.

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/CAJkCKXt4oG4R39y0A00DLmg%2B9zQmhePLm24Kzmi-Btr3hrz0bA%40mail.gmail.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/CAHOpw6z5C0kyK3AgMCs9_ctDa9KLgffrYARebuHg8KK1XOnXKw%40mail.gmail.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/CACacrc237ERXTGJAjTGK5cdNZjbGt7trT0y51a8Fw1MeuPgDpA%40mail.gmail.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/CAHOpw6zPoHNxT%2B8y_oVXcF7dZVaVK7m%3D%3DpVquQXB%3D0ibK%3DohMg%40mail.gmail.com.

Re: How about dropping the MzScheme interface?

On Wed, 29 Jan 2020 at 22:19, Tony Mechelynck
<antoine.mechelynck@gmail.com> wrote:
> Could be trolling; that user started a side-thread with a post "What
> the f*** is Vim?" and I decided to answer "seriously and friendly",
> giving him the benefit of the doubt. I'm still wondering whether or
> not I've been unduly "feeding the animals". In some other mailing
> lists he might have been the object of bad language and/or insults but
> I decided to uphold the Vim lists' reputation of friendliness — on
> hindsight, maybe in this case it was above and beyond the call of duty
> but I still think I did "the right thing".

Tony, I admire the way you have dealt with the situation. Being
cool-headed and polite is always a winning policy and a good thing,
and has nothing to do with feeding a troll, if there is one.

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

Re: How about dropping the MzScheme interface?

On Wed, Jan 29, 2020 at 1:56 PM Jesus Arocho <un.yuquiyu@gmail.com> wrote:
>
> I have been reading this thread and I am not sure I understand the question: "why would anyone need to alter text"

Could be trolling; that user started a side-thread with a post "What
the f*** is Vim?" and I decided to answer "seriously and friendly",
giving him the benefit of the doubt. I'm still wondering whether or
not I've been unduly "feeding the animals". In some other mailing
lists he might have been the object of bad language and/or insults but
I decided to uphold the Vim lists' reputation of friendliness — on
hindsight, maybe in this case it was above and beyond the call of duty
but I still think I did "the right thing".
>
> On Wed, Jan 29, 2020 at 12:01 AM John Mon <john82654@gmail.com> wrote:
>>
>> Thanks for your time Tony! I've often wondered about why people ever need to alter text? If you have time I would love to know the answer. Thanks in advance!
>>
>> On Tue, Jan 28, 2020 at 11:49 AM Tony Mechelynck <antoine.mechelynck@gmail.com> wrote:
>>>
>>> On Mon, Jan 27, 2020 at 2:58 PM John Mon <john82654@gmail.com> wrote:
>>> >
>>> > Thanks Tony you mean like notepad in W10?
>>>
>>> IMHO, Vim is to Notepad what a Rolls-Royce is to a bicycle (except on
>>> the matter of price). But that's just my own opinion, after I've veen
>>> using Notepad, then Vim, for a number of years.
>>>
>>> Best regards,
>>> Tony.

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

Re: How about dropping the MzScheme interface?

That's what I was thinking, but Tony has been indulging the inquiries pretty well. 

--

Salman

On Wed, Jan 29, 2020, 07:57 Christian Brabandt <cblists@256bit.org> wrote:

On Mi, 29 Jan 2020, Jesus Arocho wrote:

> I have been reading this thread and I am not sure I understand the question:
> "why would anyone need to alter text"

I have actually been wondering, if he has been trolling successfully.

Best,
Christian
--
10E12  Mikrophone = 1 Megaphon
10E-6 Fisch = 1 Mikrofiche
10E21 Picolos = 1 Gigolo
10 Rationen = 1 Dekoration
3 1/3 Tridents = 1 Dekadent
10 Monologe = 5 Dialoge
2 Monogramme = 1 Diagramm

--
--
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/20200129125716.GA803%40256bit.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/CANuxnEexwc15PA14yEbBnBmLcPLmCzorFOMxqzkMrFcBahg68g%40mail.gmail.com.

Re: How about dropping the MzScheme interface?

Probably so.

On Wed, Jan 29, 2020 at 7:57 AM Christian Brabandt <cblists@256bit.org> wrote:

On Mi, 29 Jan 2020, Jesus Arocho wrote:

> I have been reading this thread and I am not sure I understand the question:
> "why would anyone need to alter text"

I have actually been wondering, if he has been trolling successfully.

Best,
Christian
--
10E12  Mikrophone = 1 Megaphon
10E-6 Fisch = 1 Mikrofiche
10E21 Picolos = 1 Gigolo
10 Rationen = 1 Dekoration
3 1/3 Tridents = 1 Dekadent
10 Monologe = 5 Dialoge
2 Monogramme = 1 Diagramm

--
--
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/20200129125716.GA803%40256bit.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/CACacrc0KbJsRb0%2BXK5vA639-zhuDdwS26zzCOUCpi2KAcoaM-A%40mail.gmail.com.

Re: How about dropping the MzScheme interface?

On Mi, 29 Jan 2020, Jesus Arocho wrote:

> I have been reading this thread and I am not sure I understand the question:
> "why would anyone need to alter text"

I have actually been wondering, if he has been trolling successfully.

Best,
Christian
--
10E12 Mikrophone = 1 Megaphon
10E-6 Fisch = 1 Mikrofiche
10E21 Picolos = 1 Gigolo
10 Rationen = 1 Dekoration
3 1/3 Tridents = 1 Dekadent
10 Monologe = 5 Dialoge
2 Monogramme = 1 Diagramm

--
--
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/20200129125716.GA803%40256bit.org.

Re: How about dropping the MzScheme interface?

I have been reading this thread and I am not sure I understand the question: "why would anyone need to alter text"

On Wed, Jan 29, 2020 at 12:01 AM John Mon <john82654@gmail.com> wrote:
Thanks for your time Tony! I've often wondered about why people ever need to alter text? If you have time I would love to know the answer. Thanks in advance!

On Tue, Jan 28, 2020 at 11:49 AM Tony Mechelynck <antoine.mechelynck@gmail.com> wrote:
On Mon, Jan 27, 2020 at 2:58 PM John Mon <john82654@gmail.com> wrote:
>
> Thanks Tony you mean like notepad in W10?

IMHO, Vim is to Notepad what a Rolls-Royce is to a bicycle (except on
the matter of price). But that's just my own opinion, after I've veen
using Notepad, then Vim, for a number of years.

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/CAJkCKXt4oG4R39y0A00DLmg%2B9zQmhePLm24Kzmi-Btr3hrz0bA%40mail.gmail.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/CAHOpw6z5C0kyK3AgMCs9_ctDa9KLgffrYARebuHg8KK1XOnXKw%40mail.gmail.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/CACacrc237ERXTGJAjTGK5cdNZjbGt7trT0y51a8Fw1MeuPgDpA%40mail.gmail.com.

Tuesday, January 28, 2020

Re: How about dropping the MzScheme interface?

On Wed, Jan 29, 2020 at 6:01 AM John Mon <john82654@gmail.com> wrote:
>
> Thanks for your time Tony! I've often wondered about why people ever need to alter text? If you have time I would love to know the answer. Thanks in advance!

Have you ever wondered how text gets written? Or how program bugs get
fixed? Well, here's your answer.

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/CAJkCKXsutWebZKy%2B9EA88-%3DWW%3DkMUG-KAbBeFO_Y_x0Gsj%2BpeQ%40mail.gmail.com.

Re: How about dropping the MzScheme interface?

Thanks for your time Tony! I've often wondered about why people ever need to alter text? If you have time I would love to know the answer. Thanks in advance!

On Tue, Jan 28, 2020 at 11:49 AM Tony Mechelynck <antoine.mechelynck@gmail.com> wrote:
On Mon, Jan 27, 2020 at 2:58 PM John Mon <john82654@gmail.com> wrote:
>
> Thanks Tony you mean like notepad in W10?

IMHO, Vim is to Notepad what a Rolls-Royce is to a bicycle (except on
the matter of price). But that's just my own opinion, after I've veen
using Notepad, then Vim, for a number of years.

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/CAJkCKXt4oG4R39y0A00DLmg%2B9zQmhePLm24Kzmi-Btr3hrz0bA%40mail.gmail.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/CAHOpw6z5C0kyK3AgMCs9_ctDa9KLgffrYARebuHg8KK1XOnXKw%40mail.gmail.com.

Re: How about dropping the MzScheme interface?

On Mon, Jan 27, 2020 at 2:58 PM John Mon <john82654@gmail.com> wrote:
>
> Thanks Tony you mean like notepad in W10?

IMHO, Vim is to Notepad what a Rolls-Royce is to a bicycle (except on
the matter of price). But that's just my own opinion, after I've veen
using Notepad, then Vim, for a number of years.

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/CAJkCKXt4oG4R39y0A00DLmg%2B9zQmhePLm24Kzmi-Btr3hrz0bA%40mail.gmail.com.

Monday, January 27, 2020

Re: Conditional configuration based upon filenames

Gary:
Thanks for all the useful tips.  I'll look into each of them in turn.



On Saturday, January 25, 2020 at 3:31:01 PM UTC-8, Gary Johnson wrote:
On 2020-01-25, cjsmall wrote:
> I want to do some conditional setup and key assignments based upon the
> name of the file currently being edited.  Here is what I've got so far as the
> .vimrc file in the target directory:
>
> so /u/jeff/lib/vi/vimrc.html
> so /u/jeff/lib/vi/vimrc.tab4
> " =============================================
> :if (@% == ".vimrc")
>     " Alt-F1: Insert contents from hidden file .vim_01
>     nnoremap  <Esc>[29;3~ :read .vim_01<CR>
>     inoremap  <Esc>[29;3~ <ESC>:read .vim_01<CR>
> :elseif (@% == "editor.html")
>     " Alt-F1: Insert contents from hidden file .edit_01
>     nnoremap  <Esc>[29;3~ :read .edit_01<CR>
>     inoremap  <Esc>[29;3~ <ESC>:read .edit_01<CR>
> :elseif (@% == "gimp.html")
>     " Alt-F1: Insert contents from hidden file .gimp_01
>     nnoremap  <Esc>[29;3~ :read .gimp_01<CR>
>     inoremap  <Esc>[29;3~ <ESC>:read .gimp_01<CR>
>     "
>     " Alt-F2: Insert contents from hidden file .gimp_02
>     nnoremap  <Esc>[1;3Q :read .gimp_02<CR>
>     inoremap  <Esc>[1;3Q <ESC>:read .gimp_02<CR>
>     "
>     " Alt-F3: Insert contents from hidden file .gimp_03
>     nnoremap  <Esc>[1;3R :read .gimp_03<CR>
>     inoremap  <Esc>[1;3R <ESC>:read .gimp_03<CR>
> :endif
> " =============================================
>
> This allows me to remap my Alt-function keys on a file-by-file basis to
> insert snippets of file-dependent code.  This works fine when editing
> a single file, for example:
>
> vim gimp.html
>
> but it does not work when multiple files are specified as in:
>
> vim editor.html gimp.html
>
> The conditional assignments are made upon entering  the first file,
> but do not automatically update when moving on to the second file.
>
> Three questions:
>
> 1) How can I make this update automatically as I switch between files?

You can use autocommands, for example:

    " Alt-F1: Insert contents from hidden file .vim_01
    au BufNewFile,BufRead .vimrc nnoremap <buffer> <Esc>[29;3~ :read .vim_01<CR>
    au BufNewFile,BufRead .vimrc inoremap <buffer> <Esc>[29;3~ <ESC>:read .vim_01<CR>

Note the use of <buffer> which restricts the mapping to the buffer
that was current when the mapping was defined.

See

    :help autocommands
    :help 40.3
    :help :map-<buffer>

> 2) I could do this by forcing every file to resource the .vimrc file upon
> entry.  However, the vim: modeline only works for set options.  Is there
> a similar method of executing a command (e.g., :source .vimrc) upon
> entering a file?

You can use an autocommand to source a file as well, but I wouldn't
source your .vimrc.  That generally causes headaches and there are
better solutions.

> 3) Some files have symbolic links and may be accessed through
> alternate names.  Is there a variable that vim has that can produce
> the "real" filename?

Take a look at

    :help resolve()

> Assuming that cannot be done, how do I write a vim logical OR
> conditional; something like:
>
> :if ((condition 1) || (condition 2))
>
> I know this must be in the :help documentation, but so far I haven't
> stumbled upon it.

Expressions are documented in eval.txt.  For a logical or, see

    :help expr-||

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/f127866e-2861-41ff-9555-eae2cfe99303%40googlegroups.com.

Re: How to get the folder from a full file path?

On 2020-01-27, Zhe Lee wrote:
> I know %:p %:t thes things. But What I need now is not current folder I get a
> full file path from a regex match. 
>
> And now I need to get the folder from this full path. 
>
> I already Google a lot but can't find useful things all related about "%:t :p"
> things so how to make it. 
>
> This is the code I use in the vimrc file. 
>
> function! HandleURL()
>   let s:uri = matchstr(getline("."), '[a-zA-Z]*:\/[^ >,;]*')
>   echo s:uri
>   if s:uri != ""
>     if s:uri =~ '^http'
>         silent exec "AsyncRun chrome ".s:uri.""
>     else
>         """"""""""""""
>         "I want to use the totalcmd64 to run the folder of the s:uri here.
>         """"""""""""""
>         silent exec "AsyncRun TOTALCMD64 ".s:uri.""
>     endif
>   else
>     echo "No URI found in line."
>   endif
> endfunction

I'm not sure I understand. I think you're looking for fnamemodify()
and the ":h" modifier, perhaps this:

silent exec "AsyncRun TOTALCMD64 ".fnamemodify(s:uri, ":h")

See

:help fnamemodify()
:help filename-modifiers

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/20200127171546.GD23965%40phoenix.

Re: How about dropping the MzScheme interface?

On So, 26 Jan 2020, tux. wrote:

> I rarely publish my scripts for anything - the only script which made
> it to Vim's scripts repository is Logpad.vim which was in VimL. 😃
> It's only my personal preference, honestly.

May I ask, what the reason is for using the mzscheme interface instead
of any of the others (or VimScript)? Is it just personal preference?

Best,
Christian
--
Sprich leise und höflich, aber trage stets einen dicken Knüppel bei
dir.
-- Theodor Roosevelt

--
--
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/20200127140214.GA21023%40256bit.org.

Re: How about dropping the MzScheme interface?

Thanks Tony you mean like notepad in W10?

On Sat, Jan 25, 2020 at 7:23 PM Tony Mechelynck <antoine.mechelynck@gmail.com> wrote:
On Sun, Jan 26, 2020 at 1:09 AM John Mon <john82654@gmail.com> wrote:
>
> What the h*** is vim?

Vim is a text editor (I think it is the best one, but that is opinion,
not fact) and this mailing list or Google group is its support site.
You've been subscribed to it since 15 August 2019.

If you aren't interested in it anymore, go to
https://groups.google.com/forum/#!myforums (you may have to log in to
Google if you aren't already) then find the "vim_use" group and use
the two widgets at far right of that line: either turn the rolldown
widget to some different setting if you prefer the messages to be sent
in summary blocks, or not sent to you at all, while still being able
to post; or else click "Leave the group" if you don't even want to be
able to post to this group anymore.

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/CAJkCKXuJx1A4CVC6mK%2BHqr3b3kMZEYL42hFvOx%3DeXQMN01x6AQ%40mail.gmail.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/CAHOpw6y_86modLHYpS58A8iPr-Ay-MM3e_tkdtVns_faSKvD_A%40mail.gmail.com.

How to get the folder from a full file path?

I know %:p %:t thes things. But What I need now is not current folder I get a full file path from a regex match. 

And now I need to get the folder from this full path. 

I already Google a lot but can't find useful things all related about "%:t :p" things so how to make it. 

This is the code I use in the vimrc file. 

function! HandleURL()
  let s
:uri = matchstr(getline("."), '[a-zA-Z]*:\/[^ >,;]*')
  echo s
:uri
 
if s:uri != ""
   
if s:uri =~ '^http'
        silent
exec "AsyncRun chrome ".s:uri.""
   
else
       
""""""""""""""
       
"I want to use the totalcmd64 to run the folder of the s:uri here.
        """"""""""""""
        silent exec "
AsyncRun TOTALCMD64 ".s:uri.""
    endif
  else
    echo "
No URI found in line."
  endif
endfunction

Tnx in advance

--
--
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/db445162-2afa-4304-bb7b-6669c942a84c%40googlegroups.com.

Sunday, January 26, 2020

Re:How about dropping the MzScheme interface?

> >So, who would complain if we drop the MzScheme interface?
> >Please reply to the vim-use and/or vim-dev maillist.
>
> I would. It is the only interface I use myself.

OK, that is good to know. Is this with scripts you only write for
yourself, or something you publish?

--
For humans, honesty is a matter of degree. Engineers are always honest in
matters of technology and human relationships. That's why it's a good idea
to keep engineers away from customers, romantic interests, and other people
who can't handle the truth.
(Scott Adams - The Dilbert principle)

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ 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/202001261757.00QHvNWp019746%40masaka.moolenaar.net.

Saturday, January 25, 2020

Re: How about dropping the MzScheme interface?

On Sun, Jan 26, 2020 at 1:09 AM John Mon <john82654@gmail.com> wrote:
>
> What the h*** is vim?

Vim is a text editor (I think it is the best one, but that is opinion,
not fact) and this mailing list or Google group is its support site.
You've been subscribed to it since 15 August 2019.

If you aren't interested in it anymore, go to
https://groups.google.com/forum/#!myforums (you may have to log in to
Google if you aren't already) then find the "vim_use" group and use
the two widgets at far right of that line: either turn the rolldown
widget to some different setting if you prefer the messages to be sent
in summary blocks, or not sent to you at all, while still being able
to post; or else click "Leave the group" if you don't even want to be
able to post to this group anymore.

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/CAJkCKXuJx1A4CVC6mK%2BHqr3b3kMZEYL42hFvOx%3DeXQMN01x6AQ%40mail.gmail.com.

Re: Conditional configuration based upon filenames

On 2020-01-25, cjsmall wrote:
> I want to do some conditional setup and key assignments based upon the
> name of the file currently being edited.  Here is what I've got so far as the
> .vimrc file in the target directory:
>
> so /u/jeff/lib/vi/vimrc.html
> so /u/jeff/lib/vi/vimrc.tab4
> " =============================================
> :if (@% == ".vimrc")
>     " Alt-F1: Insert contents from hidden file .vim_01
>     nnoremap  <Esc>[29;3~ :read .vim_01<CR>
>     inoremap  <Esc>[29;3~ <ESC>:read .vim_01<CR>
> :elseif (@% == "editor.html")
>     " Alt-F1: Insert contents from hidden file .edit_01
>     nnoremap  <Esc>[29;3~ :read .edit_01<CR>
>     inoremap  <Esc>[29;3~ <ESC>:read .edit_01<CR>
> :elseif (@% == "gimp.html")
>     " Alt-F1: Insert contents from hidden file .gimp_01
>     nnoremap  <Esc>[29;3~ :read .gimp_01<CR>
>     inoremap  <Esc>[29;3~ <ESC>:read .gimp_01<CR>
>     "
>     " Alt-F2: Insert contents from hidden file .gimp_02
>     nnoremap  <Esc>[1;3Q :read .gimp_02<CR>
>     inoremap  <Esc>[1;3Q <ESC>:read .gimp_02<CR>
>     "
>     " Alt-F3: Insert contents from hidden file .gimp_03
>     nnoremap  <Esc>[1;3R :read .gimp_03<CR>
>     inoremap  <Esc>[1;3R <ESC>:read .gimp_03<CR>
> :endif
> " =============================================
>
> This allows me to remap my Alt-function keys on a file-by-file basis to
> insert snippets of file-dependent code.  This works fine when editing
> a single file, for example:
>
> vim gimp.html
>
> but it does not work when multiple files are specified as in:
>
> vim editor.html gimp.html
>
> The conditional assignments are made upon entering  the first file,
> but do not automatically update when moving on to the second file.
>
> Three questions:
>
> 1) How can I make this update automatically as I switch between files?

You can use autocommands, for example:

" Alt-F1: Insert contents from hidden file .vim_01
au BufNewFile,BufRead .vimrc nnoremap <buffer> <Esc>[29;3~ :read .vim_01<CR>
au BufNewFile,BufRead .vimrc inoremap <buffer> <Esc>[29;3~ <ESC>:read .vim_01<CR>

Note the use of <buffer> which restricts the mapping to the buffer
that was current when the mapping was defined.

See

:help autocommands
:help 40.3
:help :map-<buffer>

> 2) I could do this by forcing every file to resource the .vimrc file upon
> entry.  However, the vim: modeline only works for set options.  Is there
> a similar method of executing a command (e.g., :source .vimrc) upon
> entering a file?

You can use an autocommand to source a file as well, but I wouldn't
source your .vimrc. That generally causes headaches and there are
better solutions.

> 3) Some files have symbolic links and may be accessed through
> alternate names.  Is there a variable that vim has that can produce
> the "real" filename?

Take a look at

:help resolve()

> Assuming that cannot be done, how do I write a vim logical OR
> conditional; something like:
>
> :if ((condition 1) || (condition 2))
>
> I know this must be in the :help documentation, but so far I haven't
> stumbled upon it.

Expressions are documented in eval.txt. For a logical or, see

:help expr-||

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/20200125233009.GC23965%40phoenix.

Conditional configuration based upon filenames

I want to do some conditional setup and key assignments based upon the
name of the file currently being edited.  Here is what I've got so far as the
.vimrc file in the target directory:

so /u/jeff/lib/vi/vimrc.html
so /u/jeff/lib/vi/vimrc.tab4
" =============================================
:if (@% == ".vimrc")
    " Alt-F1: Insert contents from hidden file .vim_01
    nnoremap  <Esc>[29;3~ :read .vim_01<CR>
    inoremap  <Esc>[29;3~ <ESC>:read .vim_01<CR>
:elseif (@% == "editor.html")
    " Alt-F1: Insert contents from hidden file .edit_01
    nnoremap  <Esc>[29;3~ :read .edit_01<CR>
    inoremap  <Esc>[29;3~ <ESC>:read .edit_01<CR>
:elseif (@% == "gimp.html")
    " Alt-F1: Insert contents from hidden file .gimp_01
    nnoremap  <Esc>[29;3~ :read .gimp_01<CR>
    inoremap  <Esc>[29;3~ <ESC>:read .gimp_01<CR>
    "
    " Alt-F2: Insert contents from hidden file .gimp_02
    nnoremap  <Esc>[1;3Q :read .gimp_02<CR>
    inoremap  <Esc>[1;3Q <ESC>:read .gimp_02<CR>
    "
    " Alt-F3: Insert contents from hidden file .gimp_03
    nnoremap  <Esc>[1;3R :read .gimp_03<CR>
    inoremap  <Esc>[1;3R <ESC>:read .gimp_03<CR>
:endif
" =============================================

This allows me to remap my Alt-function keys on a file-by-file basis to
insert snippets of file-dependent code.  This works fine when editing
a single file, for example:

vim gimp.html

but it does not work when multiple files are specified as in:

vim editor.html gimp.html

The conditional assignments are made upon entering  the first file,
but do not automatically update when moving on to the second file.

Three questions:

1) How can I make this update automatically as I switch between files?

2) I could do this by forcing every file to resource the .vimrc file upon
entry.  However, the vim: modeline only works for set options.  Is there
a similar method of executing a command (e.g., :source .vimrc) upon
entering a file?

3) Some files have symbolic links and may be accessed through
alternate names.  Is there a variable that vim has that can produce
the "real" filename?  Assuming that cannot be done, how do I write
a vim logical OR conditional; something like:

:if ((condition 1) || (condition 2))

I know this must be in the :help documentation, but so far I haven't
stumbled upon it.

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/dcffb6ae-286c-4507-ad24-31b956f2f7d5%40googlegroups.com.

Re: automatization with VIM, avoid flickering

avoided flickering with:

Start-Process with the options
        -wait    -WindowStyle Hidden

Erhy

--
--
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/a82c6af2-6720-4f1a-8d2e-2cc072480248%40googlegroups.com.

Re: automatization with powershell Start-Process

and now a better Start-Process which don't flicker:

    $argRead = '"e ' + $filename + '"'
    $argwrite
= '"w! ' + $tmpFilepath + '"'
   
Start-Process -FilePath $vimPath -wait -WindowStyle Hidden -ArgumentList ( `
        '-c', '"set noswapfile"', '-c', $argRead, `

       
'-c', '"set fileencoding=utf-8"', '-c', '"set bomb"', `
        '-c', $argwrite, '-c', '"q!"' )



--
--
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/5acb20fb-7fe9-4cac-b970-97e826f18c54%40googlegroups.com.

Re: set all - each option one line

how I can get  Vim 8.2.0128
Few days before I have installed Vim
and gvim.exe has the version 8.2.0.0 
... with this :set! doesn't work

Erhy


Am Samstag, 18. Januar 2020 16:14:46 UTC+1 schrieb Andy Wokula:
Am 17.01.2020 um 22:48 schrieb Erhy:
> don't see the simple solution?
> please tell me
> Erhy

Get Vim 8.2.0128 and then use
     :set!

--
Andy

--
--
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/0693d794-cc09-4484-b6e3-ab42261d4d68%40googlegroups.com.

Re: Why must I be the owner of a file I???m editing in order for persistent undo to work?

On Sun, Jan 19, 2020 at 08:11:32AM -0800, DwigtArmyOfChampions wrote:
> I???m using Vim 7.4. I can???t see my old changes on a file because I???m not the owner of the file. Why does this requirement exist and there a way to work around it?

in Vim, the persistent undo and with it all changes to a file are
personal setting. the information is AFAIK not stored in the file
itself. when the ownership of the file changed from you to someone else,
the meta information of that file probably changed as well.

did you try to make you owner of the file, if that resolves the issue? I
don't know if this can be done in Vim, but any file manager will make it
possible.

//meine

--
--
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/20200125115358.GA4951%40trackstand.

Friday, January 24, 2020

re: How about dropping the MzScheme interface?

I won't complain for I'm a clumsy user and won't use it

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