Thursday, September 13, 2018

Re: "

Le jeudi 13 septembre 2018 17:20:01 UTC+2, Ruben Safir a écrit :
> On 9/13/18 8:15 AM, Ni Va wrote:
> > silent! exe "%s/".k.'/\=get(s:decode, submatch(0), submatch(0))/g'
>
>
> can you explain this line?
>
>
> --
> So many immigrant groups have swept through our town
> that Brooklyn, like Atlantis, reaches mythological
> proportions in the mind of the world - RI Safir 1998
> http://www.mrbrklyn.com
>
> DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
> http://www.nylxs.com - Leadership Development in Free Software
> http://www2.mrbrklyn.com/resources - Unpublished Archive
> http://www.coinhangout.com - coins!
> http://www.brooklyn-living.com
>
> Being so tracked is for FARM ANIMALS and and extermination camps,
> but incompatible with living as a free human being. -RI Safir 2013

Sorry fr mistake

fun! DecodeHtmlEntities( str ) "{{{

let s:decode = {
\ "&": '&' ,
\ ">": '>' ,
\ "&lt;": '<' ,
\ "&apos;": "'" ,
\ "&quot;": '"' }

let str_ret=a:str

for k in keys(s:decode)
echomsg k.' '.s:decode[k]
let str_ret = substitute(str_ret, k, s:decode[k], "g")
endfor

return str_ret

endfunction "}}}

--
--
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: "

On 9/13/18 8:15 AM, Ni Va wrote:
> silent! exe "%s/".k.'/\=get(s:decode, submatch(0), submatch(0))/g'


can you explain this line?


--
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013

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

Problems using v:errmsg

I'm trying to detect whether or not a g// command worked by checking
v:errmsg. AFAICT this is almost identical to the example to the
example in :help errmsg, although there it is using 'silent! next':

let v:errmsg = ""
silent! g/^>/

if v:errmsg == ""
silent g/^-- $/
silent g/^>/
normal 2o
else
normal o
startinsert
endif

However it doesn't seem to work. Whatever I try, v:errmsg is always
empty so the first part of the if statement will run. I've tried with
and without the '!' and also by using normal instead of silent. Doing
:echomsg v:errmsg or :messages after vim has been invoked will always
be empty too.

Any ideas?

-Dave

--

"Linux was made by foreign terrorists to take money from true US companies
like Microsoft." - Some AOL'er.
"To this end we dedicate ourselves..." -Don
-- From the sig of "Don", don@cs.byu.edu

.--. oo
(____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'

--
--
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: "

Le jeudi 13 septembre 2018 14:13:45 UTC+2, Erik Christiansen a écrit :
> On 13.09.18 01:53, Ni Va wrote:
> >
> > I need to edit buffer that contains vbscript that has &quot; chars and friends ...
> >
> > Without definitively write current edited file, How can I change all
> > that chars in order to be able to make modification in an easy view ?
>
> :%s/&quot/"/

fun! EncodeHtmlEntities( ) "{{{

let s:decode = {
\ "&amp;": '&' ,
\ "&gt;": '>' ,
\ "&lt;": '<' ,
\ "&apos;": "'" ,
\ "&quot;": '"' }
for k in keys(s:decode)
silent! exe "%s/".k.'/\=get(s:decode, submatch(0), submatch(0))/g'
endfor

endfunction "}}}

--
--
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: "

On 13.09.18 01:53, Ni Va wrote:
>
> I need to edit buffer that contains vbscript that has &quot; chars and friends ...
>
> Without definitively write current edited file, How can I change all
> that chars in order to be able to make modification in an easy view ?

:%s/&quot/"/

--
--
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: 8.1.0350's Test_exit_cb_wipes_buf() causes segfault when building on Launchpad

On Do, 13 Sep 2018, 'Jonathon Fernyhough' via vim_use wrote:

> On 13/09/2018 10:14, Christian Brabandt wrote:
> > Are you sure this version includes the patch for 8.1.349? I am a bit
> > confused because of the version number:
> > vim_2%3A8.1.0349+really.v8.1.0369-0
>
> Yes, it's really version 8.1.369.
>
> This specific package is built using Launchpad's Recipes feature [1]
> which combines the debian/ packaging files from one git repo [2] with
> the upstream sources from another [3]. This feature triggers automatic
> builds when there's a change.
>
> The Recipes feature only allows certain values to be used in the
> generated version number [4], one of which is the Git tag, but because
> tags start with a "v" I have to hack the versioning slightly. The last
> version I refreshed the packaging files for was 8.1.349 so that forms
> the version number "root", the upstream tag provides the "really"
> version number (with leading "v").
>
> It's essentially a CI system for packaging which is quite handy for
> Vim's release model.
>
> J
>
>
> [1] https://code.launchpad.net/~jonathonf/+recipe/vim-daily
> [2] https://code.launchpad.net/~jonathonf/+git/vim-packaging/+ref/master
> [3] https://code.launchpad.net/~jonathonf/vim/+git/vim-upstream/+ref/master
> [4]
> https://help.launchpad.net/Packaging/SourceBuilds/Recipes#Version_numbers_and_substitution_variables

That is interesting. It might actually be a bug that Vim is handling the
callback command when it should not. However to fix that, it would be
great to have it reproducible.

Forwarding to vim-dev

Best,
Christian
--
Du mußt in allen Phasen deines Lebens stehen, sonst verrätst du dich
selbst.
-- Rainer Werner Fassbinder

--
--
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: 8.1.0350's Test_exit_cb_wipes_buf() causes segfault when building on Launchpad

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJbmi+KAAoJEOAwQ4KMP/S7g2gQAJShtpp5DVOGYeco+Efh8iFv
N7+uVXFkwt3PBnKE7XiHsJq6TThukWbhKFa6rdYWwuVjUZ+vDEyC8eAk+ACxs8W1
d9hjwt2A7j5bbpmjODQw/y46SM+apXzkj2tsquIXZ/+1Kwi4Qr2q9A5UcV9qEJGM
UoAXT3+GaRR/h95t12hSfr/r0S8DyxSrQQ0nRhOPobuzr3jUcWtF9w3hUeBZPYN1
3PAKjkwqf41NlyIaO1VoHEer/2aLUqq531TEqU9RgyUa+ZYJK+ft9uqVpt08QJ/p
ZLLoEecPl6vG2Mw8fnB5BA1AgY+Ou+8rUxv48u9r0CYRxnWE3P22vkcSpxhFs5qN
cPgQpd8GBK736bN3oayN9m6Qp9sLCfspCCmApM5pJyEg0lW1eb80zAdJSCfmGlEz
ZYM26LQRkcNvmctYcnPRfG/VJ+170mDWH9lqpkdb7B8g6NaUNWV6N4icDxdgNLq9
5SJ9D8WqaMg2oozE1IxSAayVJrQHqj+vq3u9Cledn1acCpziTG8HUG8voLt3NvHp
XqZNdb6h2gP5heJGeesV01uaTJoHKazLmvqdr0aRhdT+vEewq9d/Ngru2IcZ5WKH
i2OnHYevYztFjpUeDN/c+7yYPILkrzU/E6Xhf9lE1apMvO5apNhW7kmNWvseEQ7n
/PMscqZ2GlcOeg62giA1
=Qsvl
-----END PGP SIGNATURE-----
On 13/09/2018 10:14, Christian Brabandt wrote:
> Are you sure this version includes the patch for 8.1.349? I am a bit
> confused because of the version number:
> vim_2%3A8.1.0349+really.v8.1.0369-0

Yes, it's really version 8.1.369.

This specific package is built using Launchpad's Recipes feature [1]
which combines the debian/ packaging files from one git repo [2] with
the upstream sources from another [3]. This feature triggers automatic
builds when there's a change.

The Recipes feature only allows certain values to be used in the
generated version number [4], one of which is the Git tag, but because
tags start with a "v" I have to hack the versioning slightly. The last
version I refreshed the packaging files for was 8.1.349 so that forms
the version number "root", the upstream tag provides the "really"
version number (with leading "v").

It's essentially a CI system for packaging which is quite handy for
Vim's release model.

J


[1] https://code.launchpad.net/~jonathonf/+recipe/vim-daily
[2] https://code.launchpad.net/~jonathonf/+git/vim-packaging/+ref/master
[3] https://code.launchpad.net/~jonathonf/vim/+git/vim-upstream/+ref/master
[4]
https://help.launchpad.net/Packaging/SourceBuilds/Recipes#Version_numbers_and_substitution_variables

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