Vim website hosting

2018-03-28 Thread Bram Moolenaar

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 -- b...@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_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Vim website hosting

2018-03-28 Thread Eustáquio Rangel
2018-03-28 7:47 GMT-03:00 Bram Moolenaar :

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

​Hey Bram.

What about Github pages?

https://pages.github.com/

As the Vim repository is hosted also there, maybe it's a good choice.

Cheers,

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Vim website hosting

2018-03-28 Thread Christian Brabandt

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_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Wish:

2018-03-28 Thread 'Andy Wokula' via vim_dev

Am 23.03.2018 um 19:16 schrieb Ingo Karkat:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 23-Mar-2018 17:28 +0100, 'Andy Wokula' via vim_dev wrote:

Am 13.04.2011 um 17:07 schrieb Andy Wokula:

Am 09.04.2011 20:27, schrieb Ingo Karkat:

On 09-Apr-2011 14:54, Andy Wokula wrote:

For example, I have a command :InFunc .  It's quite a trivial
command, it takes an argument Ex-command and executes it within a
function.  Purpose is to automatically restore the highlighting state
and the last search pattern.
  :h function-search-undo

Thus, mostly the Ex-command will be :global or :substitute .

Problem: :global has the default range "1,$" whereas :substitute has
the default range ".".  For :InFunc, I'm urged to specify a default
range (e.g. either -range (current line) or -range=% (whole buffer)).
I don't want that, instead I want the default range of the argument
command to be in effect.  But at the moment, it's not possible to
check for an empty range.


" What I use now:
  :[range]InFunc {cmd}" execute :[range]{cmd}, for :subst
  :[range]InFunc! {cmd}   " execute :{cmd}, for :global

com! -bang -range -nargs=+  InFunc,call
InFunc(0,)

func! InFunc(bang, cmd) range
  if a:bang
  exec a:cmd
  else
  exec a:firstline.",".a:lastline. a:cmd
  endif
endfunc


" I'd like to write the above this way:

com! -range=NoDefault -nargs=+  InFunccall InFunc()

func! InFunc(cmd) range
  exec a:range. a:cmd
endfunc


Oops, we would also need a new variable  a:range !

Maybe, actually,  and a:range are not needed, I just want to
be able to check for an empty range:


com! -range -nargs=+  InFunc,call InFunc()

func! InFunc(cmd) range
  if range_is_empty()
  exec a:cmd
  else
  exec a:firstline.",".a:lastline. a:cmd
  endif
endfunc


This would just a require a new function range_is_empty().


Unless there are additional use cases where this could be useful, my
first hunch is that it's not worth the effort.


It's more about consistency:

When you define a mapping, you can check if a count was given or not
(check v:count >= 1).

When you define a command with -range, you cannot check if a range was
given or not.


TIL it is indeed possible to check if a range was given or not:

:com! -range Crwg :echo (==-1 ? 'No range was given' : 'The given
range is ,')

Works with Vim 7.0 onwards.


How did you dig up that old thread?! (But thanks for following up!)


Oops that old?  Feels like yesterday.


I've found out about that, too:

To distinguish between no given range (then defaulting to something like the
last modified range) and a range, use -range=-1 and check :
 :command! -range=-1 Test echomsg  == -1 ? "'[,']" :  . ',' . 

This emulates -range=% but allows :0Test (passed via first argument boolean
flag), too:
 :command! -range=-1 Test call Test(( == 0), ( == -1 &&  == 1 ? 
'1,' . line('$') : ','))


Amazing.

Right, it bothered me at the same time why a range "0" is always
turned into "1".

Best thing: I tried with gVim 5.7, it works there too.
A really old feature this is!


- -- regards, ingo
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQEcBAEBCAAGBQJatURcAAoJEA7ziXlAzQ/vsH4H/3mMbpNKoZJbgYEUmlIJAvv+
7zUphcl6TnyslZwrtz3BSDP4vcQpkFBvsMxwkjRd5z/i3+CtHC8w2v4AfgQr/SdH
fSdMipYM7JeqddWnaD37GlWyIm+gFoaPpuOuPdybnkXGYLs9A6YFZXX1+59OYXR8
QEuahc8/3M4ye9I6PVzqW/IHtMDYRSMPrxRQegZkn29F/mLjftmRh7u2W8c85zJ0
0QlaYpGvO3JqOxzMZSNOtvDWRGelscZPclE4wBuwdjtrCogtZy790ET6JJyUjFYw
Lj7/U2ydwa6UEr6RQRBSG0xmUbBiqLoQZYTLk6d9q/Ipvt9kplj3FqZlVJ9zoXc=
=e/Dn
-END PGP SIGNATURE-


--
Andy

--
--
You received this message from the "vim_dev" 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_dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [vim/vim] 'virtualedit' and tabulation affect number increment/decrement (#923)

2018-03-28 Thread h_east
Hi Bram,

2016-8-2(Tue) 0:21:40 UTC+9 Bram Moolenaar:
> Hirohito Higashi wrote:
> 
> [...]
> 
> > > this almost works, except that after incrementing/decrementing ml_get()
> > > still returns the wrong line. I don't know why yet.
> > > 
> > > On the other hand, one could argue, that the number shouldn't be 
> > > incremented/decremented at all if the cursor is actually not on a 
> > > number, so you could even consider the successful increment to be a bug.
> > 
> > ChrisB>
> > Your patch is a good hint for me. Thanks!
> > 
> > I wrote a patch with a test.
> > Please check and include this.
> 
> Thanks!

This issue is in the todo list yet.

> Patch to fix increment/decrement not working properly when 'virtualedit' is
> set. (Hirohito Higashi, 2016 Aug 1, #923)

You said "Thanks!" a year and a half ago.
Perhaps you forgot to include my patch? :-)

I attached the updated patch.
Thank you for your consideration.
--
Best regards,
Hirohito Higashi (h_east)

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/ops.c b/src/ops.c
index cb019cfd0..8a5e3fa96 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -5629,17 +5629,32 @@ do_addsub(
 int		maxlen = 0;
 pos_T	startpos;
 pos_T	endpos;
+#ifdef FEAT_VIRTUALEDIT
+colnr_T	save_coladd = 0;
+#endif
 
 dohex = (vim_strchr(curbuf->b_p_nf, 'x') != NULL);	/* "heX" */
 dooct = (vim_strchr(curbuf->b_p_nf, 'o') != NULL);	/* "Octal" */
 dobin = (vim_strchr(curbuf->b_p_nf, 'b') != NULL);	/* "Bin" */
 doalp = (vim_strchr(curbuf->b_p_nf, 'p') != NULL);	/* "alPha" */
 
+#ifdef FEAT_VIRTUALEDIT
+if (virtual_active())
+{
+	save_coladd = pos->coladd;
+	pos->coladd = 0;
+}
+#endif
+
 curwin->w_cursor = *pos;
 ptr = ml_get(pos->lnum);
 col = pos->col;
 
-if (*ptr == NUL)
+if (*ptr == NUL
+#ifdef FEAT_VIRTUALEDIT
+	|| col + !!save_coladd >= (int)STRLEN(ptr)
+#endif
+	)
 	goto theend;
 
 /*
@@ -6015,8 +6030,15 @@ do_addsub(
 theend:
 if (visual)
 	curwin->w_cursor = save_cursor;
-else if (did_change)
-	curwin->w_set_curswant = TRUE;
+else
+{
+	if (did_change)
+	curwin->w_set_curswant = TRUE;
+#ifdef FEAT_VIRTUALEDIT
+	else if (virtual_active())
+	curwin->w_cursor.coladd = save_coladd;
+#endif
+}
 
 return did_change;
 }
diff --git a/src/testdir/test_increment.vim b/src/testdir/test_increment.vim
index ad355dce9..db0e57d79 100644
--- a/src/testdir/test_increment.vim
+++ b/src/testdir/test_increment.vim
@@ -1,4 +1,4 @@
-" Tests for using Ctrl-A/Ctrl-X on visual selections
+" Tests for using Ctrl-A/Ctrl-X
 
 func SetUp()
   new dummy
@@ -778,4 +778,40 @@ func Test_increment_empty_line()
   bwipe!
 endfunc
 
+func Test_normal_increment_with_virtualedit()
+  set virtualedit=all
+
+  call setline(1, ["\1"])
+  exec "norm! 0\"
+  call assert_equal("\2", getline(1))
+  call assert_equal([0, 1, 2, 0], getpos('.'))
+
+  call setline(1, ["\1"])
+  exec "norm! 0l\"
+  call assert_equal("\2", getline(1))
+  call assert_equal([0, 1, 2, 0], getpos('.'))
+
+  call setline(1, ["\1"])
+  exec "norm! 07l\"
+  call assert_equal("\2", getline(1))
+  call assert_equal([0, 1, 2, 0], getpos('.'))
+
+  call setline(1, ["\1"])
+  exec "norm! 0w\"
+  call assert_equal("\2", getline(1))
+  call assert_equal([0, 1, 2, 0], getpos('.'))
+
+  call setline(1, ["\1"])
+  exec "norm! 0wl\"
+  call assert_equal("\1", getline(1))
+  call assert_equal([0, 1, 3, 0], getpos('.'))
+
+  call setline(1, ["\1"])
+  exec "norm! 0w30l\"
+  call assert_equal("\1", getline(1))
+  call assert_equal([0, 1, 3, 29], getpos('.'))
+
+  set virtualedit&
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab


Re: [vim/vim] 'virtualedit' and tabulation affect number increment/decrement (#923)

2018-03-28 Thread Bram Moolenaar

Hirohito Higashi wrote:

> 2016-8-2(Tue) 0:21:40 UTC+9 Bram Moolenaar:
> > Hirohito Higashi wrote:
> > 
> > [...]
> > 
> > > > this almost works, except that after incrementing/decrementing ml_get()
> > > > still returns the wrong line. I don't know why yet.
> > > > 
> > > > On the other hand, one could argue, that the number shouldn't be 
> > > > incremented/decremented at all if the cursor is actually not on a 
> > > > number, so you could even consider the successful increment to be a bug.
> > > 
> > > ChrisB>
> > > Your patch is a good hint for me. Thanks!
> > > 
> > > I wrote a patch with a test.
> > > Please check and include this.
> > 
> > Thanks!
> 
> This issue is in the todo list yet.
> 
> > Patch to fix increment/decrement not working properly when 'virtualedit' is
> > set. (Hirohito Higashi, 2016 Aug 1, #923)
> 
> You said "Thanks!" a year and a half ago.
> Perhaps you forgot to include my patch? :-)
> 
> I attached the updated patch.
> Thank you for your consideration.

Sorry, sometimes I'm busy and unable to keep up with patches.  And then
later don't manage to work away the backlog, resulting in some things
slipping down in the todo list.  I'll move this one further up.

-- 
hundred-and-one symptoms of being an internet addict:
83. Batteries in the TV remote now last for months.

 /// Bram Moolenaar -- b...@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_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [vim/vim] Fix HTML indent for custom elements (#2703)

2018-03-28 Thread Bram Moolenaar

othree wrote:

> I reviewed again base on MDN
> And find another missing tag 
> 
> I think there are no other missing tags
> 
> [1]:https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu

"menu" is already included in the list of old HTML tags.

-- 
ASCII stupid question, get a stupid ANSI.

 /// Bram Moolenaar -- b...@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_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Talk about Vim in Krakow April 6

2018-03-28 Thread Bram Moolenaar

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 -- b...@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_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Forth syntax file lacks maintainer?

2018-03-28 Thread Johan Kotlinski
Hi!
I noticed that Forth syntax highlighting file is outdated; it misses many
words from the most recent standard.
Unfortunately the maintainer has not been responding to mail, and there
were no updates since 2012. What would be the steps to transfer maintenance
to someone who is willing to keep the file up to date?

Regards,
Johan
-- 
---
http://www.littlesounddj.com

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Strange ':file' command behaviour after "E23: no alternate file.

2018-03-28 Thread Tom M
Hi all!

First of all, thank you for VIM. Now, I'd like to share an example of a rather 
confusing behaviour. It's the ':file' ex command when used in combination with 
the # register. Here is how to reproduce:

vim -N -u NONE -U NONE --noplugin somefile.txt

:file
=>
"somefile.txt"

:file #
=>
:file "
E23: No alternate file
:file |
(vim still in ex cmd input mode with the cursor positioned where '|' is)

otherfile.txt
(this finishes the input of ':file otherfile.txt' ex command.)

:file
=>
"somefile.txt"

IOW the resulting 'file otherfile.txt' command failed without warning. Is this 
a bug or a "feature"? Because this definitely doesn't feel right. I would 
expect one of these results (in my order of preference):

1) The 'file otherfile.txt' ex cmd goes through so that ':file' gives 
'otherfile.txt' in the end.
2) Immediate abort after E23.
3) Or at least some notification that the file was not changed to 'b.txt'.

This is VIM 8.0.1648 on a Linux machine. VIM 7.4 is affected too.

Thanks in advance for all responses.

Best regards,

Tom

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Forth syntax file lacks maintainer?

2018-03-28 Thread Christian Brabandt

On Mi, 28 Mär 2018, Johan Kotlinski wrote:

> I noticed that Forth syntax highlighting file is outdated; it misses many 
> words
> from the most recent standard.
> Unfortunately the maintainer has not been responding to mail, and there were 
> no
> updates since 2012. What would be the steps to transfer maintenance to someone
> who is willing to keep the file up to date?

There is no formal process. Would you like to become the new maintainer?

Best,
Christian
-- 
Letzte Worte eines Chemikers:
  "Wo hatte ich denn meine Handschuhe hingelegt?"

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [vim/vim] Feature request: improve cmdline-completion for arglist commands with c_CTRL-D (#2706)

2018-03-28 Thread Yegappan Lakshmanan
Hi,

On Fri, Mar 9, 2018 at 1:14 AM, kiryph  wrote:
> As documented under :h cmdline-completion a user can press on the
> commandline  to get a list of possible values in many circumstances.
> This works for
>
> :
> :b
> :ta and similar :tj and :ts
> :e
> :se
> :map
> ...
>
> In particular, I miss that  does not work for :argu.
> This should not list only possible numbers but also the filename.
>
> Furthermore the :argdelete command could be improved:
>
> :argdelete should only list entries of the arglist.
>

The attached patch adds support for command line completion for
file names from the argument list. This works for the ":argedit" and
":argdelete" commands.

- Yegappan

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


arglist_complete.diff
Description: Binary data


Re: Forth syntax file lacks maintainer?

2018-03-28 Thread Johan Kotlinski
>
> > I noticed that Forth syntax highlighting file is outdated; it misses
> many words
> > from the most recent standard.
> > Unfortunately the maintainer has not been responding to mail, and there
> were no
> > updates since 2012. What would be the steps to transfer maintenance to
> someone
> > who is willing to keep the file up to date?
>
> There is no formal process. Would you like to become the new maintainer?
>

Sure, I am willing to help out!

Johan

>
> --
---
http://www.littlesounddj.com

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.