Friday, March 30, 2018

shtags.pl

I discovered the shtags.pl script today and wondered is it's
compatible with Getopt:Std or could it be adapted to use it?

I've installed Perl4::Corelibs anyway and I'm thinking about making a
slackware build script for it to submit to slackbuilds.org, but if it
will work with Getopt::Std I won't spend time on it.

Dave

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: Open fold when using vim +N file.ext

On Friday 30 March 2018 16:32,
Dave Woodfall <dave@dawoodfall.net> put forth the proposition:
>I'm using an autocmd to unfold lines under the cursor when I open a
>file:
>
>autocmd BufReadPost * normal zv
>
>But it doesn't work when opening a file via a line number (vim +N). Is
>there a way to get that to work?
>
>My foldopen is:
>
>block,hor,mark,percent,quickfix,search,tag,undo,jump

Well I've kind of found a hacky workaround:

vim() {
/usr/bin/vim $@ +"normal zv"
}

in my zshrc. I'd like to know if there's a proper way though.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Open fold when using vim +N file.ext

I'm using an autocmd to unfold lines under the cursor when I open a
file:

autocmd BufReadPost * normal zv

But it doesn't work when opening a file via a line number (vim +N). Is
there a way to get that to work?

My foldopen is:

block,hor,mark,percent,quickfix,search,tag,undo,jump

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Thursday, March 29, 2018

Re: Mapping for one handed touch typing

I'm also disabled having cerebral palsy with reduced mobility in both hands and arms. While most of my remappings probably won't help you one of the things I've done might: I've remapped most of the <C-{key}> commands to <F5>{key} because it's hard for me to hold down two keys simultanously and because I find it easier to hit <F5> with either index finger than reaching for the ctrl keys with my little fingers which are almost useless. I also find a longish timeout value very helpful, but that may be different when you have full mobility in one hand.

Den fre 23 mar 2018 22:05Robert Bower <frrobert2@gmail.com> skrev:
I am a occasional Vim user.  It is my default rescue editor and I use it for a few tasks but not many.  I would like to use it for more because it is so customizable.  What holds me back is I am a one handed left handed touch typist.  I only have use of my left arm.

The problem I have with Vim is while the key maps are natural for a two handed touch typist, they are awkward for for a one handed typist.  The home row for one handed typing is fghj. That makes the direction keys of hjkl  somewhat unnatural.

Before, I create my own map, I was wondering has anyone found a remapping for one handed typing?

Thanks 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.
For more options, visit https://groups.google.com/d/optout.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: Comparing values of two consequent lines

On 2018-03-29 20:34, tuxic@posteo.de wrote:
> On 03/29 06:55, Tim Chase wrote:
> > On 2018-03-29 06:21, Tim Chase wrote:
> > > > I want to check, whether all paired lines have attached
> > > > the same value.
> > >
> > > /^command a-\(\w\+\) \+\(\d\+\) *\ncommand b-\1 \+\2\@!
> >
> > ^command a-\(\w\+\) \+\(\d\+\) *\ncommand b-\1 \+\2$
>
> Hi Tim,
>
> simply amazing! Thanks a lot for your help! THIS will easy my work a
> lot!

Another edge-case occurred to me where they differ after a common
subset. E.g.

command a-parameter 1
command b-parameter 11

which might consider them a match/mismatch in one or the other of
those cases so it might require anchoring with either a "\>" or "$" to
ensure the match ends where expected.

-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.
For more options, visit https://groups.google.com/d/optout.

Re: Comparing values of two consequent lines

On 03/29 06:55, Tim Chase wrote:
> On 2018-03-29 06:21, Tim Chase wrote:
> > > I want to check, whether all paired lines have attached
> > > the same value.
> >
> > You can find them with
> >
> > /^command a-\(\w\+\) \+\(\d\+\) *\ncommand b-\1 \+\2\@!
>
> I suppose I should have offered both alternatives...finding those
> that *don't* match, use my previous email. If you want those that
> *do* match, use the regex
>
> ^command a-\(\w\+\) \+\(\d\+\) *\ncommand b-\1 \+\2$
>
> (change the "\@!" at the end which asserts that the number DOESN'T
> match to a "$")
>
> -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.
> For more options, visit https://groups.google.com/d/optout.
>

Hi Tim,

simply amazing! Thanks a lot for your help! THIS will easy my work a
lot!

Cheers!
Meino


--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: Comparing values of two consequent lines

On 2018-03-29 06:21, Tim Chase wrote:
> > I want to check, whether all paired lines have attached
> > the same value.
>
> You can find them with
>
> /^command a-\(\w\+\) \+\(\d\+\) *\ncommand b-\1 \+\2\@!

I suppose I should have offered both alternatives...finding those
that *don't* match, use my previous email. If you want those that
*do* match, use the regex

^command a-\(\w\+\) \+\(\d\+\) *\ncommand b-\1 \+\2$

(change the "\@!" at the end which asserts that the number DOESN'T
match to a "$")

-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.
For more options, visit https://groups.google.com/d/optout.

Re: Comparing values of two consequent lines

On 2018-03-29 08:51, tuxic@posteo.de wrote:
> I have a textfile with lot of lines.
> These lines have the following format
>
> <command> a-<name of parameter> <value>
> <command> b-<name of parameter> <value>
[snip]
> I want to check, whether all paired lines have attached
> the same value.

You can find them with

/^command a-\(\w\+\) \+\(\d\+\) *\ncommand b-\1 \+\2\@!

or you can mark them with

:%s/^command a-\(\w\+\) \+\(\d\+\) *\ncommand b-\1 \+\2\@!/& THIS ONE

or indent them with

:g/^command a-\(\w\+\) \+\(\d\+\) *\ncommand b-\1 \+\2\@!/sil .,+>


These assume that "<name of parameter>" can be found by the regex
"\w\+", so modify accordingly if needed.

-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.
For more options, visit https://groups.google.com/d/optout.

Re: Comparing values of two consequent lines

Sounds like a job for awk, but I'm sure someone here will have a more detailed idea.

On Thu, Mar 29, 2018 at 9:51 AM, <tuxic@posteo.de> wrote:
Hi,

I have a textfile with lot of lines.
These lines have the following format

<command> a-<name of parameter> <value>
<command> b-<name of parameter> <value>

where
<command> is a command identical for all lines
<name of parameter> are different commands.
<value> is a numeric value.

The commands are paired. A certain command exist in
the form 'a-command' and 'b-command'.

The lines are sorted in way that lines with a certain
command ("a-" and "b-" form) are always paired and
grouped together.

I want to check, whether all paired lines have attached
the same value.

There are way too many lines to do this manually and doing
so would be much too error prone.

Can this done with vim automagically and how?
Or: Is there already a unix tool (I am on Linux), which
could do this check?

Thanks a lot for any help in advance!
Cheers!
Meino



--
--
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.
For more options, visit https://groups.google.com/d/optout.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Wednesday, March 28, 2018

Comparing values of two consequent lines

Hi,

I have a textfile with lot of lines.
These lines have the following format

<command> a-<name of parameter> <value>
<command> b-<name of parameter> <value>

where
<command> is a command identical for all lines
<name of parameter> are different commands.
<value> is a numeric value.

The commands are paired. A certain command exist in
the form 'a-command' and 'b-command'.

The lines are sorted in way that lines with a certain
command ("a-" and "b-" form) are always paired and
grouped together.

I want to check, whether all paired lines have attached
the same value.

There are way too many lines to do this manually and doing
so would be much too error prone.

Can this done with vim automagically and how?
Or: Is there already a unix tool (I am on Linux), which
could do this check?

Thanks a lot for any help in advance!
Cheers!
Meino



--
--
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.
For more options, visit https://groups.google.com/d/optout.

Talk about Vim in Krakow April 6

Hello Vimmers,

I will do a presentation about Vim on the SFI Academic IT Festival in
Krakow. This is a three day free conference, 5 to 7 April.
My talk is on Friday, April 6, at 12:30.

You can find information on the website: http://sfi.org.pl/
The English version is currently not available, you can use Google
Translate: https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fsfi.org.pl%2F&edit-text=&act=url
(Messes up some style though, using translate in Chrome on the actual
site works better).

Info about the talk: http://sfi.org.pl/prelegenci/170-2/

--
hundred-and-one symptoms of being an internet addict:
84. Books in your bookcase bear the names Bongo, WinSock and Inside OLE

/// 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.
For more options, visit https://groups.google.com/d/optout.

Re: NERDTree opens half of screen instead of NERDTreeWinSize

Oliver,

When you run ":wincmd =" you tell Vim to equalize window sizes to the best of its ability.

This is definitely the cause of your problem.  I would rethink both of those autocommands.
They would likely break a number of different plugins.

Best,
Jason

----------------------------------------
Jason R. Franklin
Associate Systems Software Developer
Enterprise Technology Solutions


Georgia Southern University
P.O. Box 8088
Statesboro, GA 30460
912.478.5639


On Wed, Mar 28, 2018 at 2:30 PM, Oliver Graute <oliver.graute@gmail.com> wrote:
On 28/03/18, Jason Franklin wrote:
> On Tuesday, March 27, 2018 at 1:51:12 PM UTC-4, Oliver Graute wrote:
> > On 24/03/18, Oliver Graute wrote:
> > > my NERDTree seems to ignore my NERDTreeWinSize setting and opens instead
> > > at half of the screen. Some ideas how to fix this?
>
> NERDTree maintainer here (@lifecrisis on Github).
> This probably hasn't been fixed because no one has given us specific steps to replicate the bug.  Is there a specific sequence of steps that will always lead to this problem?  I can't fix it if I can't observe the issue.  I've also never seen this happen while using the NERDTree.
>
> Can you give explicit instructions on how to replicate this behavior?

These lines in my vimrc are the cause for this behavior of NERDTree:

:au WinEnter * :set winfixheight
:au WinEnter * :wincmd =

after removing them NERDTree opens at NERDTreeWinSize

is this some resizing of vertical splits?

Best Regards,

Oliver

--
--
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/ckDvFxa4UZQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: NERDTree opens half of screen instead of NERDTreeWinSize

On 28/03/18, Jason Franklin wrote:
> On Tuesday, March 27, 2018 at 1:51:12 PM UTC-4, Oliver Graute wrote:
> > On 24/03/18, Oliver Graute wrote:
> > > my NERDTree seems to ignore my NERDTreeWinSize setting and opens instead
> > > at half of the screen. Some ideas how to fix this?
>
> NERDTree maintainer here (@lifecrisis on Github).
> This probably hasn't been fixed because no one has given us specific steps to replicate the bug. Is there a specific sequence of steps that will always lead to this problem? I can't fix it if I can't observe the issue. I've also never seen this happen while using the NERDTree.
>
> Can you give explicit instructions on how to replicate this behavior?

These lines in my vimrc are the cause for this behavior of NERDTree:

:au WinEnter * :set winfixheight
:au WinEnter * :wincmd =

after removing them NERDTree opens at NERDTreeWinSize

is this some resizing of vertical splits?

Best Regards,

Oliver

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: if &diff only true in first file ?

("Enter" got hit too fast)

On Wed, Mar 28, 2018 at 8:18 PM, Tony Mechelynck
<antoine.mechelynck@gmail.com> wrote:
> On Wed, Mar 28, 2018 at 4:36 AM, M Kelly <mckelly2833@gmail.com> wrote:
>> Hi,
>>
>> In my .vimrc I have
>>
>> if &diff
>> let b:mckgitstatus = "diff"
>> else
>> autocmd BufReadPost,BufNewFile,FileReadPost * call MyGitStatus()
>> autocmd BufUnload * call MyGitLeave()
>> endif
>>
>> And in the first file window I do see "diff" status as expected.
>> But the second file window does not have the "diff" status, but my git stuff.
>>
>> Any idea why if &diff does not work for the second file window ?
>>
>> thx always for vim and your support,
>> -mark
>
> Simple: Your vimrc is run only once, at startup. At that point,
> buffers have already been created (but not yet loaded) for all files
> mentioned on the vim (or vimdiff or gvimdiff or...) command-line.
> "b:mckgitstatus", a buffer-local variable, is only seen from the
> buffer which was current while sourcing the vimrc, probably the first
> one.
>
> If you want your :if .. :else .. :endif construct to apply to all
> buffers mentioned on the command-line, it should be wrapped in a
> function called from an :argdo statement. OTOH, if you want your
> autocommands to apply to all non-diff buffers whenever created, your
> MyGitStatus and MyGitPost functions should test &l:diff directly
> rather than b:mckgitstatus. CAUTION: 'diff' is a window-local setting and it is possible to have several windows, with 'diff' set differently, displaying the same buffer. If you only display each diff buffer in one window it ought to work.

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.
For more options, visit https://groups.google.com/d/optout.

Re: if &diff only true in first file ?

On Wed, Mar 28, 2018 at 4:36 AM, M Kelly <mckelly2833@gmail.com> wrote:
> Hi,
>
> In my .vimrc I have
>
> if &diff
> let b:mckgitstatus = "diff"
> else
> autocmd BufReadPost,BufNewFile,FileReadPost * call MyGitStatus()
> autocmd BufUnload * call MyGitLeave()
> endif
>
> And in the first file window I do see "diff" status as expected.
> But the second file window does not have the "diff" status, but my git stuff.
>
> Any idea why if &diff does not work for the second file window ?
>
> thx always for vim and your support,
> -mark

Simple: Your vimrc is run only once, at startup. At that point,
buffers have already been created (but not yet loaded) for all files
mentioned on the vim (or vimdiff or gvimdiff or...) command-line.
"b:mckgitstatus", a buffer-local variable, is only seen from the
buffer which was current while sourcing the vimrc, probably the first
one.

If you want your :if .. :else .. :endif construct to apply to all
buffers mentioned on the command-line, it should be wrapped in a
function called from an :argdo statement. OTOH, if you want your
autocommands to apply to all non-diff buffers whenever created, your
MyGitStatus and MyGitPost functions should test &l:diff directly
rather than b:mckgitstatus. CAUTION:

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: Vim website hosting

You're right of course. I also agree with the "vendor lock-in" argument.

Regards

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: Vim website hosting

On Mi, 28 Mär 2018, Bram Moolenaar wrote:

> > What is actually needed? Couldn't the vim homepage to without the
> > plugins directory. Github supports labels (e.g. vim-plugin) to mark a
> > repo as a vim plugin. What else do you need dynamic scripts for?

I am not sure I understand the remark about marking/labeling a plugin
and how that is helping us here. Remember there are still many plugins
available, that are not hosted at github.

But for once, it would be a shame to lose all the old uploaded scripts,
karma rating, etc. and currently at least the news items besides the
scripts are stored in a database and probably a bunch of other stuff is
as well.

Third, who is going to translate the current information that is stored
in php files into markdown/static html files? That will be a whole bunch
of work.

Next, I am sure, everybody has his favorite website hosting vendor. But
such a topic has so much bike shedding value, that we can discuss this
for months without even reaching a consensus. So in the end it comes to
Bram to make the final decision and then someone has to do the actual
work.

And finally I am not sure, that making us rely on another single vendor
again is such a clever move now. Github is the sf.net from today. Once
we depend on it, it will make moving to somewhere else even harder. And
who thought that sf.net would become so bad 20 years ago?

> There is no point in having this discussion, since overhauling the
> website is out of scope. As in: it may happen some day, but not now.

Having said all that, I am sure it would be appreciated if someone would
step up and volunteer to redesign the website. But as implied above it
will be a whole bunch of work (without anything to gain anything
personally except some fame) and a redesign will be even more
controversial.

I remember there was discussion about it in the past, but I don't think
anything actually happened.

Best,
Christian
--
Alte Narren sind närrischer als junge.
-- François de La Rochefoucault

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: Vim website hosting

> > > What about Github pages?
> > >
> > > https://pages.github.com/
>
> This also was my first though.
>
> > Sorry, we don't want to discuss other hosting services now and github
> > pages does not allow to run dynamic scripting pages which is what we
> > need.
>
> What is actually needed? Couldn't the vim homepage to without the
> plugins directory. Github supports labels (e.g. vim-plugin) to mark a
> repo as a vim plugin. What else do you need dynamic scripts for?

There is no point in having this discussion, since overhauling the
website is out of scope. As in: it may happen some day, but not now.

--
hundred-and-one symptoms of being an internet addict:
79. All of your most erotic dreams have a scrollbar at the right side.

/// 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.
For more options, visit https://groups.google.com/d/optout.

Re: Vim website hosting

SourceForge used to be great, but that was so long ago we can barely
remember.

Github would be my preference, too.
--
"Never, never, never give up" - Winston Churchill

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: Vim website hosting

> > What about Github pages?
> >
> > https://pages.github.com/

This also was my first though.

> Sorry, we don't want to discuss other hosting services now and github
> pages does not allow to run dynamic scripting pages which is what we
> need.

What is actually needed? Couldn't the vim homepage to without the plugins directory. Github supports labels (e.g. vim-plugin) to mark a repo as a vim plugin. What else do you need dynamic scripts for?

Regards

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: Vim website hosting

On Mi, 28 Mär 2018, Eustáquio Rangel wrote:

> What about Github pages?
>
> https://pages.github.com/
>
> As the Vim repository is hosted also there, maybe it's a good choice.

Sorry, we don't want to discuss other hosting services now and github
pages does not allow to run dynamic scripting pages which is what we
need.

Best,
Christian
--
Geographie ist Schwerkraft mit Bäumen drauf
-- P. Terry

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: NERDTree opens half of screen instead of NERDTreeWinSize

On Tuesday, March 27, 2018 at 1:51:12 PM UTC-4, Oliver Graute wrote:
> On 24/03/18, Oliver Graute wrote:
> > my NERDTree seems to ignore my NERDTreeWinSize setting and opens instead
> > at half of the screen. Some ideas how to fix this?
> >
> > https://github.com/scrooloose/nerdtree/issues/259
>
> I observe the problem with latest NERDTree git commit a172d7cf and latest
> vim git commit 2a77d21f7.
>
> Howto start vim with all plugins disabled except NERDTree?
>
> Best Regards,
>
> Oliver

NERDTree maintainer here (@lifecrisis on Github).

This probably hasn't been fixed because no one has given us specific steps to replicate the bug. Is there a specific sequence of steps that will always lead to this problem? I can't fix it if I can't observe the issue. I've also never seen this happen while using the NERDTree.

Can you give explicit instructions on how to replicate this behavior?

Thanks!
Jason

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Vim website hosting

Hello Vimmers,

The Vim website has been hosted on SourceForge for a long time.
It has had its up and downs. Two years ago it was taken over and put
under new management, you can read about that on Ars Technica:
https://arstechnica.com/information-technology/2016/06/under-new-management-sourceforge-moves-to-put-badness-in-past/

Recently there was a long outage, related to a datacenter move.
This triggered looking for an alternative and we ended up with trying
out OSDN. Thanks to Christian Brabandt for doing this work!

So now we have two sites:
https://www.vim.org on SourceForge
https://vim8.org on OSDN

Note that changes on vim8.org will be wiped out, no matter what happens.
Please only forward the URL including this note!

It does look like SourceForge got better after the move. They now also
fully support https on our vhost. Note that the "www" prefix has
nothing to do with SourceForge, please ignore that for this discussion.

OSDN works a lot like SourceForge, but it's hosted in Japan. You might
notice a bit more latency. Otherwise I haven't heard anything negative
about OSDN.

We need to make a choice: Where shall we host www.vim.org?
Opinions?

--
If bankers can count, how come they have eight windows and
only four tellers?

/// 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.
For more options, visit https://groups.google.com/d/optout.

Tuesday, March 27, 2018

Re: vim not auto popup despite asyncomplete installed

On Di, 27 Mär 2018, Cương Vũ Thế wrote:

> Dear all,
> I installed vim version from sourceforge, then install asyncomplete
> through vim-plug.
> I made sure it installed properly.
> However as I typed text, the auto completion popup doesn't appeared at all.
> Do you have any advised about its cause?

you might want to ask the author of that plugin.


Best,
Christian
--
Der eingeborenste Begriff, der notwendigste, von Ursach' und
Wirkung wird in der Anwendung die Veranlassung zu unzähligen sich
immer wiederholenden Irrtümern.
-- Goethe, Maximen und Reflektionen, Nr. 937

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: NERDTree opens half of screen instead of NERDTreeWinSize

On Di, 27 Mär 2018, Oliver Graute wrote:

> On 24/03/18, Oliver Graute wrote:
> > my NERDTree seems to ignore my NERDTreeWinSize setting and opens instead
> > at half of the screen. Some ideas how to fix this?
> >
> > https://github.com/scrooloose/nerdtree/issues/259
>
> I observe the problem with latest NERDTree git commit a172d7cf and latest
> vim git commit 2a77d21f7.

If the plugin author does not fix it, I fear there is nothing we can do
here. Besides probably not everybody here uses Nerdtree.

> Howto start vim with all plugins disabled except NERDTree?

Setting the rtp to that specific plugin and run vim with --clean

Or move your .vim out of the way and start with a fresh ~/.vim

Best,
Christian
--
Der Gedanke, daß jedes Mißgeschick
außerordentlich häufig vorkommt, nimmt ihm die Bedenklichkeit.
-- Stendhal (eig. Marie-Henri Beyle)

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: if &diff only true in first file ?

I added a check in my lightline git branch routine to check for diff and set the correct "diff" status there, so its fixed now.
When I think about it, it makes sense this way. But at first I thought both files would go through the same .vimrc startup logic.
take care,
-mark

--
--
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.
For more options, visit https://groups.google.com/d/optout.

vim not auto popup despite asyncomplete installed

Dear all,
I installed vim version from sourceforge, then install asyncomplete
through vim-plug.
I made sure it installed properly.
However as I typed text, the auto completion popup doesn't appeared at all.
Do you have any advised about its cause?
Below is my _vimrc.
Please help me. Thank you very much.

set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
let cmd = '"' . $VIMRUNTIME . '\diff"'
let eq = '""'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction

let g:bookmark_auto_close = 1
if has("gui_running")
set background=light
"colorscheme solarized8_low
let s:uname = system("uname")
if s:uname == "Darwin\n"
set guifont=Inconsolata\ for\ Powerline:h19
endif
endif

" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')

" Make sure you use single quotes


" On-demand loading
"Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }



Plug 'prabirshrestha/asyncomplete.vim'
call plug

if &diff only true in first file ?

Hi,

In my .vimrc I have

if &diff
let b:mckgitstatus = "diff"
else
autocmd BufReadPost,BufNewFile,FileReadPost * call MyGitStatus()
autocmd BufUnload * call MyGitLeave()
endif

And in the first file window I do see "diff" status as expected.
But the second file window does not have the "diff" status, but my git stuff.

Any idea why if &diff does not work for the second file window ?

thx always for vim and your support,
-mark

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: NERDTree opens half of screen instead of NERDTreeWinSize

On 24/03/18, Oliver Graute wrote:
> my NERDTree seems to ignore my NERDTreeWinSize setting and opens instead
> at half of the screen. Some ideas how to fix this?
>
> https://github.com/scrooloose/nerdtree/issues/259

I observe the problem with latest NERDTree git commit a172d7cf and latest
vim git commit 2a77d21f7.

Howto start vim with all plugins disabled except NERDTree?

Best Regards,

Oliver

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Saturday, March 24, 2018

do task after needed loaded helper#plugin

Hi,

How can I launch $vim/vimfiles/autoload/helperplugin#func after gvim $myvimrc done and initialized ?

Thank you
Niva

--
--
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.
For more options, visit https://groups.google.com/d/optout.

NERDTree opens half of screen instead of NERDTreeWinSize

Hello,

my NERDTree seems to ignore my NERDTreeWinSize setting and opens instead
at half of the screen. Some ideas how to fix this?

:let NERDTreeWinSize
NERDTreeWinSize #20

Someone already reported the same issue here:

https://github.com/scrooloose/nerdtree/issues/259

here I use:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:42:42)
Inklusive der Korrekturen: 1-52
Extra-Patches: 8.0.0056

My work windows pc show same behavior and is on 8.0.0

Best Regards,

Oliver

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Friday, March 23, 2018

Re: Mapping for one handed touch typing


On Fri, Mar 23, 2018 at 2:03 PM, Robert Bower <frrobert2@gmail.com> wrote:
Before, I create my own map, I was wondering has anyone found a remapping for one handed typing?

When I broke my right hand and it was immobilized, I made a bunch of mappings to allow me to continue to be fairly productive.

First, I mapped F1 to F4 to hjkl respectively.  This allowed me to somewhat emulate the normal Vim movement keys, and since I had no muscle memory built up, I needed to visually verify my finger position often.  I found it convenient that the keys I mapped were laid out in relation to the keys I was mapping so I could check my finger position literally at a glance. A little dab of epoxy resin on F1 and F4 also helped me identify them by touch (simulating the dots on F and J on most keyboards).

I also mapped the Leader to be the ` (backtick) character, as the default leader of \ (backslash) was rather inconvenient.  I think there was something buggy about this, but I never figured out what, and I don't use the map leader functionality very often.

I then mapped the : (colon) to be `` (double backticks), so that I could just mash that key twice in order to access command mode.  This, of course, I used A LOT.

I also mapped CapsLock to be the Enter key, so that I could access that easily as well.   I ended up turning that off sometimes though, because I found that certain all-capital letter sequences were super tedious to type one-handed without Caps Lock. YMMV.   I did this with AutoHotKey on Windows, not with native Vim functionality.  xmodmap on Linux should do something similar.

But, the absolute best thing I did was to get a dictionary file of weighted words (i.e., sorted by frequency of use in the English language) and set my dictionary file to use that.  Then I used the ACP (autocompletepop)  plugin so that I could tab-complete most English words. When I type two-handed, and my output is English words (not computer code)  it's generally faster to type a word than it is to try to have ACP complete it for me, but when typing one handed I found it much, much faster to have ACP suggest words for me.    I found a ~200k word file online without too much trouble, sadly I don't remember where anymore.  I believe it was some university somewhere.  It was freely available, but I don't want to publish my personal copy of it because it isn't my own work, and I didn't think to save the link or the author information.

The upshot of all those mappings is, your fingers generally hover near the top-left of the keyboard, largely mitigating the need to keep them near fghj.   Tab-completing words ends up being quick enough to offset -in terms of typed words per minute -  the distance you have to move your hand to type "p" or "?" or whatnot.   

My actual .vimrc entries:

 " LEFT-HANDED """"""""""""""""""""""""""""""""""""""""""""""""""""""""""
" let double backticks act like the colon
nnoremap `` :
" change the Leader key to be ` for left-handed typing
let mapleader="`"
"map the movement keys to F1 to F4, and follow virtual lines
nnoremap <F1> h
nnoremap <F2> gj
nnoremap <F3> gk
nnoremap <F4> l
vnoremap <F1> h
vnoremap <F2> gj
vnoremap <F3> gk
vnoremap <F4> l
" turn on the ACP plugin on startup
let g:acp_enableAtStartup = 1
set dictionary=~/.vim/dict/weighted_words
" LEFT-HANDED """"""""""""""""""""""""""""""""""""""""""""""""""""""""""


Hope that helps,
Dan


--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: 'normal' doesn't trigger TextChangedI

On 23/03/2018 17:36, Jason Felice wrote:
> https://github.com/eraserhd/parinfer-rust/blob/master/tests/run.vim#L40-L65
> is the interesting bit.

Thanks, cool hack! But read Bram's reply about test_override(), which
makes this workaround unnecessary.

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.
For more options, visit https://groups.google.com/d/optout.

Re: Mapping for one handed touch typing

On Fri, Mar 23, 2018 at 10:03 PM, Robert Bower <frrobert2@gmail.com> wrote:
> I am a occasional Vim user. It is my default rescue editor and I use it for a few tasks but not many. I would like to use it for more because it is so customizable. What holds me back is I am a one handed left handed touch typist. I only have use of my left arm.
>
> The problem I have with Vim is while the key maps are natural for a two handed touch typist, they are awkward for for a one handed typist. The home row for one handed typing is fghj. That makes the direction keys of hjkl somewhat unnatural.
>
> Before, I create my own map, I was wondering has anyone found a remapping for one handed typing?
>
> Thanks in advance.

I'm not a touch-typist, but I usually type one-handed, with most of
the fingers of my right hand, which jumps this way and that over the
keyboard in a manner similar to how a pianist's hands may jump from
one octave to another. I don't use "special" one-handed mappings,
though; the mappings I use are either for key sequences which I use
often, or ones which are difficult to find on my Belgian AZERTY
keyboard (e.g. <F9> for Ctrl-] in both Normal mode [to follow Vim's
help hotlinks] and Insert mode [to end an abbreviation or to avoid
triggering it]).

So if you find out that there are complex key sequences that you use
repeatedly, or key combinations which are awkward to get on your
particular national keyboard, that's what you should assign to the
{rhs} of your mappings — which will probably be different than mine,
because they should suit you, not me. As {lhs} I recommend the Fn and
Shift-Fn keys with the exception of <F1> (Help) and maybe also <F10>
(Menu). Or, in Normal mode only, any non-ASCII key (if there are any)
present on your national keyboard: mine has ² ³ é § è ç à ° ù µ £ but
yours may have a different set.

IMHO any Vim user, touch-typist or not, left-handed, right-handed or
both, should learn which keys do what in Vim (in Insert mode, of
course, most keys used just by themselves, or only with Shift, insert
a character into the current editfile; but even in Normal mode, most
keys do something), then it's just a matter of remembering which key
or key combination does what. And my counsel is not to try to use only
hjkl to move the cursor to the next character cell: Vim understands
what the arrow keys do, and it listens to the mouse, so don't be
afraid to use them. (Of course, on a desktop keyboard the arrow keys
are usually on the far right, and that could be awkward for someone
who hasn't got a usable right hand, but it is common to all programs,
not only Vim.)

To learn which keys do what, I recommend the "vimtutor" utility,
distributed together with Vim: it moves the beginner step by step
through the elementary use of Vim; and then I recommend to all users,
beginners or otherwise, to make good use of the online help: AFAIK, no
program available today has such a complete and detailed help system,
available at every user's fingertips without even leaving the program.


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.
For more options, visit https://groups.google.com/d/optout.

Re: Mapping for one handed touch typing

On 2018-03-23 14:03, Robert Bower wrote:
> I am a occasional Vim user. It is my default rescue editor and I
> use it for a few tasks but not many. I would like to use it for
> more because it is so customizable. What holds me back is I am a
> one handed left handed touch typist. I only have use of my left
> arm.

My first thought would be to get a hardware solution like

http://www.nanopac.com/Half+Keyboard.htm

which would solve issues not only within vim, but in other
applications as well. Though at $595, it's a steep investment.

> The problem I have with Vim is while the key maps are natural for a
> two handed touch typist, they are awkward for for a one handed
> typist. The home row for one handed typing is fghj. That makes the
> direction keys of hjkl somewhat unnatural.

Totally understandable!

> Before, I create my own map, I was wondering has anyone found a
> remapping for one handed typing?

Looks like there are a couple possibilities for pre-existing
solutions available here

http://www.onehandkeyboard.org/linux-one-handed-keyboards/

-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.
For more options, visit https://groups.google.com/d/optout.

Re: 'normal' doesn't trigger TextChangedI

On 23/03/2018 22:39, Bram Moolenaar wrote:
>
> Life wrote:
>
>> On 23/03/2018 15:41, Jason Felice wrote:
>>> I couldn't get feedkeys() to trigger TextChangedI either, so I've
>>> rewritten my tests to use a terminal with small delays between
>>> keystrokes, and this works.
>>
>> I have the same problem (writing tests for a plugin that uses
>> TextChangedI, but TextChangedI doesn't seem to be triggered when using
>> feedkeys()). Would you mind showing an example of how you write a test
>> to work around that?
>
> Also try using:
> call test_override("char_avail", 1)

That does it!

I was just studying Test_edit_CTRL_L(), which seems to test TextChangedI
with feedkeys(), to see how that test can pass, and noticed the call to
test_override(). It was not obvious to me that char_avail would be
related to event triggering.

Thanks,
Life



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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: 'normal' doesn't trigger TextChangedI

Life wrote:

> On 23/03/2018 15:41, Jason Felice wrote:
> > I couldn't get feedkeys() to trigger TextChangedI either, so I've
> > rewritten my tests to use a terminal with small delays between
> > keystrokes, and this works.
>
> I have the same problem (writing tests for a plugin that uses
> TextChangedI, but TextChangedI doesn't seem to be triggered when using
> feedkeys()). Would you mind showing an example of how you write a test
> to work around that?

Also try using:
call test_override("char_avail", 1)

--
The future isn't what it used to be.

/// 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.
For more options, visit https://groups.google.com/d/optout.

Mapping for one handed touch typing

I am a occasional Vim user. It is my default rescue editor and I use it for a few tasks but not many. I would like to use it for more because it is so customizable. What holds me back is I am a one handed left handed touch typist. I only have use of my left arm.

The problem I have with Vim is while the key maps are natural for a two handed touch typist, they are awkward for for a one handed typist. The home row for one handed typing is fghj. That makes the direction keys of hjkl somewhat unnatural.

Before, I create my own map, I was wondering has anyone found a remapping for one handed typing?

Thanks 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.
For more options, visit https://groups.google.com/d/optout.

Re: 'normal' doesn't trigger TextChangedI

https://github.com/eraserhd/parinfer-rust/blob/master/tests/run.vim#L40-L65 is the interesting bit.

On Fri, Mar 23, 2018 at 12:30 PM, Lifepillar <lifepillar@lifepillar.me> wrote:
On 23/03/2018 15:41, Jason Felice wrote:
I couldn't get feedkeys() to trigger TextChangedI either, so I've rewritten my tests to use a terminal with small delays between keystrokes, and this works.

I have the same problem (writing tests for a plugin that uses
TextChangedI, but TextChangedI doesn't seem to be triggered when using
feedkeys()). Would you mind showing an example of how you write a test
to work around that?

Thanks,
Life.


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

--- You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: 'normal' doesn't trigger TextChangedI

On 23/03/2018 15:41, Jason Felice wrote:
> I couldn't get feedkeys() to trigger TextChangedI either, so I've
> rewritten my tests to use a terminal with small delays between
> keystrokes, and this works.

I have the same problem (writing tests for a plugin that uses
TextChangedI, but TextChangedI doesn't seem to be triggered when using
feedkeys()). Would you mind showing an example of how you write a test
to work around that?

Thanks,
Life.

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: 'normal' doesn't trigger TextChangedI

I couldn't get feedkeys() to trigger TextChangedI either, so I've rewritten my tests to use a terminal with small delays between keystrokes, and this works.

Thanks!


On Wed, Mar 21, 2018 at 5:28 PM, Bram Moolenaar <Bram@moolenaar.net> wrote:

Jason Felice wrote:

TextChangedI is only triggered on redraw and when using :normal that
doesn't happen.

> at least?  It might not trigger InsertEnter either.

AFAIK InsertEnter is triggered also when using a :normal command.

> I want to write tests for my plugin, so is there a better way to simulate
> normal input?

You can use feedkeys().

--
A day without sunshine is like, well, night.

 /// 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.
For more options, visit https://groups.google.com/d/optout.

Thursday, March 22, 2018

Mapping mutliple keys

Is there a simple way of mapping say ^[a - ^[z etc. to <M-a> - <M-z> etc?

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: Updating a quickfix/location list asynchronously without interfering with another plugin

Hi,

On Thu, Mar 22, 2018 at 12:36 AM, zechfox <zechfox@gmail.com> wrote:
> 在 2017年11月16日星期四 UTC+8下午10:44:41,Yegappan写道:
>> Hi all,
>>
>> There was a recent thread in reddit/r/vim about two Vim plugins updating
>> the same quickfix list at the same time thereby interfering with each other:
>>
>> https://www.reddit.com/r/vim/comments/7c5f1a/two_plugins_writing_to_quickfixloc_list_at_the/
>>
>> As many other plugin authors may need to know how to use the new Vim quickfix
>> features to avoid this, I am sending this e-mail.
>>
>> Vim has many plugins (vim-go, ale, etc.) that use the quickfix/location list
>> feature. Some of these plugins process the output of an external command and
>> update the quickfix list asynchronously as the output becomes available.
>>
>> Updating the quickfix list asynchronously opens up a possibility that two or
>> more plugins may try to update the same quickfix list with different output.
>> Also when a plugin is updating the quickfix list in the background, the user
>> may issue a command that creates or updates a quickfix list. The plugin may
>> then incorrectly use this new list to add the entries.
>>
>> The various commands that create or modify a quickfix list (cfile, cgetfile,
>> caddfile, cbuffer, cgetbuffer, caddbuffer, cexpr, cgetexpr, caddexpr, make,
>> grep, grepadd, vimgrep and vimgrepadd) operate only on the current quickfix
>> list. A plugin using these commands to update the quickfix list can interfere
>> with another plugin.
>>
>> To avoid these issues, the Vim functions getqflist() and setqflist() can be
>> used to operate on any list in the quickfix stack. A list in the stack can be
>> specified using the quickfix identifier. So if a Vim plugin uses these
>> functions to operate on a specific quickfix list then it can avoid interfering
>> with the operation of another plugin operating on another quickfix list.
>>
>> The identifier of a quickfix list can be obtained using:
>>
>> let qfid = getqflist({'id' : 0}).id
>>
>> When adding new entries, the plugin can use setqflist() with this identifier:
>>
>> call setqflist([], 'a', {'id' : qfid, 'items' : newitems})
>>
>> To parse the output of a command and add the quickfix entries, the plugin can
>> use the following:
>>
>> call setqflist([], 'a', {'id' : qfid, 'lines' : cmdoutput})
>>
>> Note that in the previous command, the current 'errorformat' option setting is
>> used to parse the command output. This setting might have been changed either
>> by the user or by some other plugin to some other value. To parse the command
>> output using a specific 'errorformat' setting, the plugin can use:
>>
>> call setqflist([], 'a', {'id' : qfid, 'lines' : cmdoutput, 'efm' : myefm})
>>
>> If a more than 10 quickfix lists are added to the quickfix stack, then the
>> oldest quickfix list is removed. The plugin should check whether the quickfix
>> list it is using is still valid using the following:
>>
>> if has_key(getqflist({'id' : qfid}), 'id')
>> " List is still valid
>> endif
>>
>> In summary, a plugin can use the following steps to asynchronously process a
>> command output and update a quickfix list:
>>
>> 1. Create an empty quickfix list:
>>
>> call setqflist([], ' ', {'title' : 'Output from command abc'})
>>
>> 2. Save the newly created quickfix list identifier:
>>
>> let qfid = getqflist({'id' : 0}).id
>>
>> 3. Start a command in the background using job_start()
>>
>> 4. In the job callback function, check if the quickfix list is still present:
>>
>> if has_key(getqflist({'id' : qfid}), 'id')
>> " Still present
>> " Update the list
>> else
>> " List is removed. Stop the background job.
>> job_stop(....)
>> endif
>>
>> 5. Process the command output and update the quickfix list using one
>> of the following
>> calls:
>>
>> call setqflist([], 'a', {'id' : qfid, 'lines' : cmdoutput, 'efm' : myefm})
>>
>> or
>>
>> call setqflist([], 'a', {'id' : qfid, 'items' : newitems})
>>
>>
>> - Yegappan
>
> Is that possible use 'title' to get quickfix list?
>

The 'title' of a quickfix list is not unique. More than one quickfix
list can have the same title. So a 'title' string cannot be used
to uniquely identify a quickfix list.

>
> As the vim help documents said:
> id get information for the quickfix list with
> quickfix-ID; zero means the id for the
> current list or the list specified by "nr"
>
> the 'current list' maybe changed by other plugin
>

A plugin can create a quickfix list and store/cache the id of the
list immediately in a plugin variable.

Regards,
Yegappan

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: Updating a quickfix/location list asynchronously without interfering with another plugin

在 2017年11月16日星期四 UTC+8下午10:44:41,Yegappan写道:
> Hi all,
>
> There was a recent thread in reddit/r/vim about two Vim plugins updating
> the same quickfix list at the same time thereby interfering with each other:
>
> https://www.reddit.com/r/vim/comments/7c5f1a/two_plugins_writing_to_quickfixloc_list_at_the/
>
> As many other plugin authors may need to know how to use the new Vim quickfix
> features to avoid this, I am sending this e-mail.
>
> Vim has many plugins (vim-go, ale, etc.) that use the quickfix/location list
> feature. Some of these plugins process the output of an external command and
> update the quickfix list asynchronously as the output becomes available.
>
> Updating the quickfix list asynchronously opens up a possibility that two or
> more plugins may try to update the same quickfix list with different output.
> Also when a plugin is updating the quickfix list in the background, the user
> may issue a command that creates or updates a quickfix list. The plugin may
> then incorrectly use this new list to add the entries.
>
> The various commands that create or modify a quickfix list (cfile, cgetfile,
> caddfile, cbuffer, cgetbuffer, caddbuffer, cexpr, cgetexpr, caddexpr, make,
> grep, grepadd, vimgrep and vimgrepadd) operate only on the current quickfix
> list. A plugin using these commands to update the quickfix list can interfere
> with another plugin.
>
> To avoid these issues, the Vim functions getqflist() and setqflist() can be
> used to operate on any list in the quickfix stack. A list in the stack can be
> specified using the quickfix identifier. So if a Vim plugin uses these
> functions to operate on a specific quickfix list then it can avoid interfering
> with the operation of another plugin operating on another quickfix list.
>
> The identifier of a quickfix list can be obtained using:
>
> let qfid = getqflist({'id' : 0}).id
>
> When adding new entries, the plugin can use setqflist() with this identifier:
>
> call setqflist([], 'a', {'id' : qfid, 'items' : newitems})
>
> To parse the output of a command and add the quickfix entries, the plugin can
> use the following:
>
> call setqflist([], 'a', {'id' : qfid, 'lines' : cmdoutput})
>
> Note that in the previous command, the current 'errorformat' option setting is
> used to parse the command output. This setting might have been changed either
> by the user or by some other plugin to some other value. To parse the command
> output using a specific 'errorformat' setting, the plugin can use:
>
> call setqflist([], 'a', {'id' : qfid, 'lines' : cmdoutput, 'efm' : myefm})
>
> If a more than 10 quickfix lists are added to the quickfix stack, then the
> oldest quickfix list is removed. The plugin should check whether the quickfix
> list it is using is still valid using the following:
>
> if has_key(getqflist({'id' : qfid}), 'id')
> " List is still valid
> endif
>
> In summary, a plugin can use the following steps to asynchronously process a
> command output and update a quickfix list:
>
> 1. Create an empty quickfix list:
>
> call setqflist([], ' ', {'title' : 'Output from command abc'})
>
> 2. Save the newly created quickfix list identifier:
>
> let qfid = getqflist({'id' : 0}).id
>
> 3. Start a command in the background using job_start()
>
> 4. In the job callback function, check if the quickfix list is still present:
>
> if has_key(getqflist({'id' : qfid}), 'id')
> " Still present
> " Update the list
> else
> " List is removed. Stop the background job.
> job_stop(....)
> endif
>
> 5. Process the command output and update the quickfix list using one
> of the following
> calls:
>
> call setqflist([], 'a', {'id' : qfid, 'lines' : cmdoutput, 'efm' : myefm})
>
> or
>
> call setqflist([], 'a', {'id' : qfid, 'items' : newitems})
>
>
> - Yegappan

Is that possible use 'title' to get quickfix list?
As the vim help documents said:
id get information for the quickfix list with
quickfix-ID; zero means the id for the
current list or the list specified by "nr"

the 'current list' maybe changed by other plugin

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Wednesday, March 21, 2018

Re: A bug in netrw

Alexey Petrenko wrote:

> I believe I found a bug in netrw. Is it the right place to report it?
>
> Netrw (in a tree mode) displays symlinks wrongly whenever there are
> two symlinks with the same name but different destinations. Obviously,
> symlinks are in different directories. Netrw shows the same
> destination for both symlinks.
>
> See following screencast for demo.
> https://asciinema.org/a/j738urjT6jeC3fWcYYt67SIEa
>
> Vim version used is 8.0.1625 and netrw version is v156.

The maintainer of netrw is Charles Campbell: <drchip@campbellfamily.biz>

--
He who laughs last, thinks slowest.

/// 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.
For more options, visit https://groups.google.com/d/optout.

Re: 'normal' doesn't trigger TextChangedI

Jason Felice wrote:

TextChangedI is only triggered on redraw and when using :normal that
doesn't happen.

> at least? It might not trigger InsertEnter either.

AFAIK InsertEnter is triggered also when using a :normal command.

> I want to write tests for my plugin, so is there a better way to simulate
> normal input?

You can use feedkeys().

--
A day without sunshine is like, well, night.

/// 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.
For more options, visit https://groups.google.com/d/optout.

Re: 'normal' doesn't trigger TextChangedI

On Mi, 21 Mär 2018, Jason Felice wrote:

> at least?  It might not trigger InsertEnter either.
>
> I want to write tests for my plugin, so is there a better way to simulate
> normal input? 

Try feedkeys()

Best,
Christian
--
Nein, das ist keine SchreIBMaschine!

--
--
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.
For more options, visit https://groups.google.com/d/optout.

'normal' doesn't trigger TextChangedI

at least?  It might not trigger InsertEnter either.

I want to write tests for my plugin, so is there a better way to simulate normal input? 

Thanks,
-Jason

--
--
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.
For more options, visit https://groups.google.com/d/optout.