Thursday, March 30, 2017

Re: vim 'less.sh' script probs w/folds

On Do, 30 Mär 2017, glts wrote:

> On Monday, March 27, 2017 at 11:19:19 PM UTC+2, L A Walsh wrote:
> > If I have a file with folds in it (fdm=marker), and I try to
> > display it with the vim 'less.sh' script, there doesn't seem to be
> > a way to get rid of all the folds (no 'zR'). I can use the cursor
> > keys to move to each fold and open it, but that really defeats
> > the idea of using 'less' to scroll through the source by pressing
> > 'space' (for example).
> >
> > Maybe folds should be disabled for the less.sh script?
>
> I also use less.sh occasionally, mostly at the end of some pipeline
> where I want to have syntax highlighting.
>
> some shell pipeline | less.sh
>
> Like Linda, I like less.sh to behave more or less like less.
>
> I think folding is an advanced feature. People (even Vim users) don't
> necessarily know how to disable it quickly, or even what it is.
>
> If you need a full-fledged but read-only text editor, why not use
> 'view', which is just that?

One thing I forgot to mention and that one should note one should note,
is that using less.sh may cause problems, if the file to be viewed is
actually quite large, since Vim will always read in the whole file into
memory and not only load chunks of a file. This is especially bad for
files larger than your main memory available.

Just mentioning here, since this is a feature a pager usually handles
well.

Best,
Christian
--
Vor allem andern tröstet das Christentum; aber es gibt Seelen, die von
Natur aus glücklich sind und die Trost nicht nötig haben. Diese aber
macht das Christentum unglücklich und weiter hat es keinen Einfluß auf
sie.
-- André Gide

--
--
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 'less.sh' script probs w/folds

Hello,

On Monday, March 27, 2017 at 11:19:19 PM UTC+2, L A Walsh wrote:
> If I have a file with folds in it (fdm=marker), and I try to
> display it with the vim 'less.sh' script, there doesn't seem to be
> a way to get rid of all the folds (no 'zR'). I can use the cursor
> keys to move to each fold and open it, but that really defeats
> the idea of using 'less' to scroll through the source by pressing
> 'space' (for example).
>
> Maybe folds should be disabled for the less.sh script?

I also use less.sh occasionally, mostly at the end of some pipeline
where I want to have syntax highlighting.

some shell pipeline | less.sh

Like Linda, I like less.sh to behave more or less like less.

I think folding is an advanced feature. People (even Vim users) don't
necessarily know how to disable it quickly, or even what it is.

If you need a full-fledged but read-only text editor, why not use
'view', which is just that?

Cheers,


--
David

--
--
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: show reference about word under cursor under scope of all project files

I've been mapping "gb" to use vim-ack for this:

nnoremap gb :Ack -w <cword><CR>

To do without ack, you could probably use this instead:

nnoremap gb :grep -rw <cword> .<CR>



On Mar 30, 2017 8:19 AM, "YZ Xie" <xiedeacc@gmail.com> wrote:
Hi,is there a method show all references about the word under current cursor in a new window?
or a plugin more easy to use than cscope and support golang

I know four way,
1. [I, 
2. grep then :cope
3.just cscope
4.# or *

but it seems method one just work in the same file, not project.
method two works well, but too slow
method three works well, but only suppor c and c++, suport golang?
method four, jesus, cursor will move.

is there a method show all references about the word under current cursor in a new window?
or a plugin more easy to use than cscope and support golang

Regards

Xie




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

show reference about word under cursor under scope of all project files

Hi,is there a method show all references about the word under current cursor in a new window?
or a plugin more easy to use than cscope and support golang

I know four way,
1. [I, 
2. grep then :cope
3.just cscope
4.# or *

but it seems method one just work in the same file, not project.
method two works well, but too slow
method three works well, but only suppor c and c++, suport golang?
method four, jesus, cursor will move.

is there a method show all references about the word under current cursor in a new window?
or a plugin more easy to use than cscope and support golang

Regards

Xie




--
--
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 29, 2017

Re: cpp and golang code fold problem

Hi Christian,
thanks, you're right, fdm was different when file postfix was different, *.cc was syntax, *.cpp was manual, so I need to check my .vimrc. but I have set fdm to syntax, it's strange.
Best
YZ

2017-03-30 2:12 GMT+08:00 Christian Brabandt <cblists@256bit.org>:
Hi YZ!

In both cases please check the output of `:verbose set fdm? fen?`

Best,
Christian

--
--
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/VAmHd6YAA2U/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: cpp and golang code fold problem

Hi YZ!

In both cases please check the output of `:verbose set fdm? fen?`

Best,
Christian

--
--
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: how to find out what the current vim's servername is?

David Fishburn wrote:
>
>
> On Wed, Mar 29, 2017 at 10:39 AM, Charles E Campbell
> <drchip@campbellfamily.biz <mailto:drchip@campbellfamily.biz>> wrote:
>
> Hello:
>
> I've looked through the help for some way to find out what the current
> gvim's server name is (in my case, under X). The serverlist()
> function
> gives a list of all such server names, and one can specify a vim
> to have
> a specific name, but usually the names appear to be something like
> GVIM,
> GVIM2, GVIM3, etc.
>
>
> :echo v:servername
>
> Should do it.
> Dave
>
>
Thank you -- I was looking for the answer largely in remote.txt
(obviously, I didn't find it there).

Regards,
Chip

--
--
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: how to find out what the current vim's servername is?



On Wed, Mar 29, 2017 at 10:39 AM, Charles E Campbell <drchip@campbellfamily.biz> wrote:
Hello:

I've looked through the help for some way to find out what the current
gvim's server name is (in my case, under X).  The serverlist() function
gives a list of all such server names, and one can specify a vim to have
a specific name, but usually the names appear to be something like GVIM,
GVIM2, GVIM3, etc.

:echo v:servername

Should do 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: cpp and golang code fold problem

Hi Campbell,
here is my code, 

test.h
================================================================
#include <iostream>
#include <string>
using namespace std;

class A {
public:
    A();

    string& print_name();




private:
    string& o_print();

    string name;
}
=================================================================


test.cpp
=================================================================
#include "test.h"
A::A()
{
    name = "xie";
}

string& A::print_name(){
    return do_print();
}

string& A::do_print() {
    cout << name << endl;
    name = "yang";
    return name;
}

int main()
{
    A a;
    string str = a.print_name();
    cout << str.c_str() << endl;
}
===================================================================



when rename test.cpp to test.cc, it works well, here is two screenshots






Regards

Xie



2017-03-29 22:19 GMT+08:00 Charles E Campbell <drchip@campbellfamily.biz>:
YZ Xie wrote:
> Hi everyone,
>
> my .vimrc was
> set foldmethod=syntax
> filetype plugin indent on   " Automatically detect file types.
> syntax enable
>  syntax on
>
> but  it cannot fold code if file was named like *.cpp, but it can work
> well if file was name *.c or *.cc.  golang code failed too.
>
> my vim was installed by source code from github,runtime director
> is /usr/share/vim/vim80.
>
> I have export VIMRUNTIMEDIR= /usr/share/vim/vim80 in /etc/profile and
> source it.
>
> vim version was 8.0.439.
>
Hello:

I just opened a *.cpp file with fdm=syntax, and it folded just fine
using your .vimrc (plus using set nocp).  Got any example source you
care to share that won't fold?

Also,syntax-enabled folding is something that the syntax highlighting
maintainers specify in ther syntax highlighting files.  I suggest you
make some examples that won't fold and send them along with an
explanation to the syntax files' maintainers.

Regards,
Chip Campbell

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

how to find out what the current vim's servername is?

Hello:

I've looked through the help for some way to find out what the current
gvim's server name is (in my case, under X). The serverlist() function
gives a list of all such server names, and one can specify a vim to have
a specific name, but usually the names appear to be something like GVIM,
GVIM2, GVIM3, etc.

Regards,
Chip Campbell

--
--
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: RFE: enable gvim to open a buffer or tab in a new window

L A Walsh wrote:
> This is likely only pertinent to a GUI version of vim,
> like gvim running over X.
>
>
> More than once I've wanted to be able to tear off a tab
> and have gvim open the tab in a new window and
> have the new window function like a "tab"
> (or a "split") -- except the other "view" (in case of
> a split), be in a physically separate window.
>
> Just the other day, I had two files open in tabs
> (.cc and .h: a C++ source & header). Instead of
> window switching, I wanted to change my visual
> layout for 1 pair of files to see them side-by-side
> (and when I was done, close the 2nd display leaving
> the 2nd file as a 2nd tab in the 1st window.
>
> If I could tear off & merge tabs it would easily allow
> such operations.
>
> Is that something that might be doable?
>
>
See if http://www.drchip.org/astronaut/vim/index.html#DETACH 's
detach.vim will do what you want.

Regards,
Chip Campbell

--
--
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: cpp and golang code fold problem

YZ Xie wrote:
> Hi everyone,
>
> my .vimrc was
> set foldmethod=syntax
> filetype plugin indent on " Automatically detect file types.
> syntax enable
> syntax on
>
> but it cannot fold code if file was named like *.cpp, but it can work
> well if file was name *.c or *.cc. golang code failed too.
>
> my vim was installed by source code from github,runtime director
> is /usr/share/vim/vim80.
>
> I have export VIMRUNTIMEDIR= /usr/share/vim/vim80 in /etc/profile and
> source it.
>
> vim version was 8.0.439.
>
Hello:

I just opened a *.cpp file with fdm=syntax, and it folded just fine
using your .vimrc (plus using set nocp). Got any example source you
care to share that won't fold?

Also,syntax-enabled folding is something that the syntax highlighting
maintainers specify in ther syntax highlighting files. I suggest you
make some examples that won't fold and send them along with an
explanation to the syntax files' maintainers.

Regards,
Chip Campbell

--
--
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: RFE: enable gvim to open a buffer or tab in a new window

On Tuesday, 28 March, 2017 at 13:08:03 BST, L A Walsh wrote:
>Just the other day, I had two files open in tabs (.cc and .h: a C++ source &
>header). Instead of window switching, I wanted to change my visual layout for
>1 pair of files to see them side-by-side (and when I was done, close the 2nd
>display leaving the 2nd file as a 2nd tab in the 1st window.

Why not just :vsplit the other file into the current tab, and :quit it when done?

--
--
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: Security Risk: (was vim 'less.sh' script probs w/folds)

Christian Brabandt wrote:
> Hi L.!
>
> On Di, 28 Mär 2017, L. A. Walsh wrote:
>
>
>> Here is the problem -- I am not using "less.vim"...
>>
>> I type in (at the command prompt):
>> less.sh <filename>
>>
>
> Here is the problem: Why do you type less.sh and not less or more or
> most. And why is this in your path?
>
----
I wanted syntax highlighting in less, so
I copied 'less.sh' into ~/bin/vless for testing. If it
was a suitable (compatible) pager, I might want it to
replace less as a default when I'm doing SW development.

At the very least, if it was 'less'-feature
compatible, highlighting could be invoked as a special
call out from 'less'.

Note: my first attempt to get this functionality was
to use the convert-to-HTML feature, and setup 'less'
to display the syntax-colorized version of the file
via 'lynx'. unfortunately 'lynx' doesn't implement
text coloring, and the alternate, 'w3m' gave even
worse looking output.

So..why did I use less.sh? Because I followed the
vim instructions to get 'vim' to be usable like "less" or
"more". Neither of those utils hide blocks of text based on
settings in the file. If I want smarter text display,
I'd bring up the file in a text editor, like vim! ;-)

Text files are supposed to be "dumb". From there, you
can add on specific features. In this case, highlighting
was supposed to be added to a 'less/more' like interface.
That excludes automatic visual formatting of the
text to look different than it does in the file.

In the same way, I wouldn't expect vim to automatically
justify text on output when trying to be a simple
replacement for 'less/more' pagers, but w/syntax.

I.e. the defaults should be the simple case as displayed in
'less/more'. Having options to add in hidden text or
word-break line-folding are fine options -- just not
for the default case where it's suppose to be like
a dumb-text pager (except for HLing feature).

"If you use the less or more program to view a file, you
don't get syntax highlighting. Thus you would like to
use Vim instead. You can do this by using the shell script
"$VIMRUNTIME/macros/less.sh".

So if I use less, and don't see syntax highlighting but
want to, then I'd expect vim to do that (only because it is
documented to do so in the help).

>
>> In regards to the 2nd sentence... it is also, not
>> quite accurate: when I saw the folds, the
>> first thing I tried was 'zR' (which didn't work).
>>
>
> You can still use :set nofoldenable
>
---
It's not about all the different things that might
work -- it's about the default inability to display the
file as it is on disk (without folds or text processing
markup).

Do you use 'less' or try to display syntax HLing using
'less.sh'?

What's the use case or reason for insisting that
the script shouldn't function like 'more' or 'less' by
default (as the documentation seems to indicate)?


*curious*,
Linda

--
--
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 28, 2017

vim cannot fold cpp and golang code

vim cannot fold test.cpp, vim prompts E490 no fold found, but rename this file to test.c or test.cc, vim can use zc to fold this same code.

I have set configure in .vimrc foldmethod=syntax set foldlevel=0 set foldnestmax=2 VIMRUNTIME=/usr/share/vim/vim80

in /usr/share/vim/vim80/ftplugin, there exits a cpp.vim file. 

why vim cannot fold *.cpp and *.go, any problem?

--
--
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: cpp and golang code fold problem

在 2017年3月29日星期三 UTC+8下午1:16:40,YZ Xie写道:
> Hi everyone,
>
>
> my .vimrc was 
> set foldmethod=syntax 
> filetype plugin indent on   " Automatically detect file types.
> syntax enable
>  syntax on  
>                  
> but  it cannot fold code if file was named like *.cpp, but it can work well if file was name *.c or *.cc.  golang code failed too.
>
>
> my vim was installed by source code from github,runtime director is /usr/share/vim/vim80. 
>
>
> I have export VIMRUNTIMEDIR= /usr/share/vim/vim80 in /etc/profile and source it.
>
>
> vim version was 8.0.439. 
>
>
> how can I fix this problem?
> thanks

when zc it show E490 no fold found, but rename source file from *.cpp to *.c or *.cc, it works well

--
--
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: Security Risk: (was vim 'less.sh' script probs w/folds)

Hi L.!

On Di, 28 Mär 2017, L. A. Walsh wrote:

> Here is the problem -- I am not using "less.vim"...
>
> I type in (at the command prompt):
> less.sh <filename>

Here is the problem: Why do you type less.sh and not less or more or
most. And why is this in your path?

> In regards to the 2nd sentence... it is also, not
> quite accurate: when I saw the folds, the
> first thing I tried was 'zR' (which didn't work).

You can still use :set nofoldenable

Best,
Christian
--
Probstei:
Körperteil eines Geistlichen, das wegen des Zölibats Pfarrerflucht
auslösen kann

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

cpp and golang code fold problem

Hi everyone,

my .vimrc was 
set foldmethod=syntax 
filetype plugin indent on   " Automatically detect file types.
syntax enable
 syntax on  
                 
but  it cannot fold code if file was named like *.cpp, but it can work well if file was name *.c or *.cc.  golang code failed too.

my vim was installed by source code from github,runtime director is /usr/share/vim/vim80. 

I have export VIMRUNTIMEDIR= /usr/share/vim/vim80 in /etc/profile and source it.

vim version was 8.0.439. 

how can I fix this problem?
thanks

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

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

Re: RFE: enable gvim to open a buffer or tab in a new window

Christian Brabandt wrote:
> Hi L!
>
> On Di, 28 Mär 2017, L A Walsh wrote:
>
>
>> If I could tear off & merge tabs it would easily allow
>> such operations.
>>
>
> You mean like tear off a tab and make it a new application window (e.g.
> before there was only one gvim window and afterwards you have 2 windows
> as seen from the operating system)?
>
-----
Perhaps, though like w/firefox, I can send a tab or drag a tab to another
window -- and it is still only 1 application (who knows how many
threads, though)...
> That is not currently possible. However it should be possible to script
> a plugin, that calls v:progpath with the current window and restores the
> view using :mkview and :loadview. However I don't know, if something
> like this exists
>
----
I'm not sure you are understanding that I really only want there
to be 1 application controlling both windows.
In the same way as when I split a window, if I change
something in 1 split, I can see the edits in another split.

In this case, I'm just wanting a it to bring up a new
window. Sorta like in explorer, if I want I can right click
on a folder and say "open folder in new window". It's still
only 1 copy of explorer, but I can have it open multiple windows
on different folders -- if I change something in one of those
windows, I see the change reflected in other windows (usually,
it's a MS-product). ;-)

-Linda


> Best,
> Christian
>

--
--
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: Security Risk: (was vim 'less.sh' script probs w/folds)

Christian Brabandt wrote:
> On Mo, 27 Mär 2017, L. A. Walsh wrote:
>> Why would you think it shouldn't be disabled? I.e.
>> how does it help emulate the file-pagers 'less' or 'more' while
>> providing syntax-coloring?
>
> Because less.vim does what Vim would do.
====
Here is the problem -- I am not using "less.vim"...

I type in (at the command prompt):
less.sh <filename>

I'm not directly using 'vim'... I'm using a ".sh" file included that
is supposed to allow syntax highlighting.


>
> How likely is it, that a non-vim user gets into contact with less.vim?
----
See above. No contact with less.vim was needed.

>
>> It seems that if anyone was using less.sh to display files,
>> as they would 'less' or 'more' (but w/syntax highlighting), then
>> having text being hidden would seem to be a potential security
>> risk, no?
>
> Where do you see a security risk? It is pretty obvious, that a fold is
> there, so it should be easy to disable it and then you see what is
> hidden behind a fold.
----
"What's a fold" (i.e. a vim-naive user using "less.sh"
to see syntax displayed for a file). No direct contact
with 'vim' is needed to run "less.sh".
>
> How about the attached patch?
---
I am still of the strong opinion that "less.sh" as used
from the command line should do try to achieve the *primary purpose*
what it claims to do, namely:


2. Using Vim like less or more *less*

If you use the less or more program to view a file,
you don't get syntax highlighting. Thus you would like to use Vim
instead. You can do this by using the shell script
"$VIMRUNTIME/macros/less.sh".

...

----
I.e. I wanted "less" or "more" but with syntax highlighting.

I wasn't expecting a "vim-view" of my file, but a text-view
w/syntax highlighting.

Note... it also says (under :help less):

This shell script uses the Vim script "$VIMRUNTIME/macros/less.vim".
It sets up mappings to simulate the commands that
less supports. Otherwise, you can still use the Vim commands.

----
In regards to the 2nd sentence... it is also, not
quite accurate: when I saw the folds, the
first thing I tried was 'zR' (which didn't work).



--
--
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: Security Risk: (was vim 'less.sh' script probs w/folds)

Christian wrote:

> > Ken Takata wrote:
> > >Hi,
> > >
> > >2017/3/28 Tue 6:19:19 UTC+9 L A Walsh wrote:
> > >>If I have a file with folds in it (fdm=3Dmarker), and I try to
> > >>display it with the vim 'less.sh' script, there doesn't seem to be
> > >>a way to get rid of all the folds (no 'zR'). I can use the cursor
> > >>keys to move to each fold and open it, but that really defeats
> > >>the idea of using 'less' to scroll through the source by pressing
> > >>'space' (for example).
> > >>
> > >>Maybe folds should be disabled for the less.sh script?
> > >
> > >I'm not sure it should be disabled. However, you can use the following
> > >command as a workaround to open all folds:
> > >
> > > :norm! zR
> > ----
> > Thanks for the workaround, but where do I put that to
> > make it default, in the the less.vim file?
>
> You can also use zi or :set nofoldenable or something like this.
>
> > Why would you think it shouldn't be disabled? I.e.
> > how does it help emulate the file-pagers 'less' or 'more' while
> > providing syntax-coloring?
>
> Because less.vim does what Vim would do.
>
> > From a different perspective, how would a non-vim user
> > know what to do to use 'less.sh' if it is supposed to be a pager
> > like 'less' or 'more' to page through file or program text without
> > having various portions of files possibly hidden.
>
> How likely is it, that a non-vim user gets into contact with less.vim?
>
> > It seems that if anyone was using less.sh to display files,
> > as they would 'less' or 'more' (but w/syntax highlighting), then
> > having text being hidden would seem to be a potential security
> > risk, no?
>
> Where do you see a security risk? It is pretty obvious, that a fold is=20
> there, so it should be easy to disable it and then you see what is=20
> hidden behind a fold.
>
> How about the attached patch?
>
> @Bram,
> please see the attached patch. It improves less.vim in several ways:
>
> - Makes 'F' toggle folds to make it easier to disable folds and also
> displays it in the help overview

"F" already has a meaning:
" Re-read file and page forward "tail -f"
map F :e<CR>G<SID>L:sleep 1<CR>F
Your patch overwrites this.

We could use "o" for open and "c" for close, since these would normally
be commands that modify the file, but with less Vim is in read-only
mode, thus these commands won't work.

> - Display 'r' key in the help overview
> - Add <nowait> to the mappings, because when trying out less.vim
> I found quite a few of the keys where not working as expected, since
> many plugins map the same keys (or the same prefix, which make Vim
> wait until the timeout triggers)
>
> On a related note, I see that less.bat and less.sh set 'no_plugin_maps'
> However only 11 of over 200 filetype plugins actually check that
> variable. I suggest to at least add a help tag *no_plugin_maps* to
> encourage filetype plugin writers to respect that variable.

I'll do that.

--
hundred-and-one symptoms of being an internet addict:
223. You set up a web-cam as your home's security system.

/// 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: RFE: enable gvim to open a buffer or tab in a new window

Hi L!

On Di, 28 Mär 2017, L A Walsh wrote:

> This is likely only pertinent to a GUI version of vim,
> like gvim running over X.
>
>
> More than once I've wanted to be able to tear off a tab
> and have gvim open the tab in a new window and
> have the new window function like a "tab"
> (or a "split") -- except the other "view" (in case of
> a split), be in a physically separate window.
>
> Just the other day, I had two files open in tabs
> (.cc and .h: a C++ source & header). Instead of
> window switching, I wanted to change my visual
> layout for 1 pair of files to see them side-by-side
> (and when I was done, close the 2nd display leaving
> the 2nd file as a 2nd tab in the 1st window.
>
> If I could tear off & merge tabs it would easily allow
> such operations.

You mean like tear off a tab and make it a new application window (e.g.
before there was only one gvim window and afterwards you have 2 windows
as seen from the operating system)?

That is not currently possible. However it should be possible to script
a plugin, that calls v:progpath with the current window and restores the
view using :mkview and :loadview. However I don't know, if something
like this exists

Best,
Christian
--
Armut, Keuschheit und Gehorsam... unerträglich sind sie alle.

--
--
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: Security Risk: (was vim 'less.sh' script probs w/folds)

diff --git a/runtime/macros/less.vim b/runtime/macros/less.vim
index 72b53f269..347c2b457 100644
--- a/runtime/macros/less.vim
+++ b/runtime/macros/less.vim
@@ -70,8 +70,8 @@ au VimEnter * set nomod
set noma

" Give help
-noremap h :call <SID>Help()<CR>
-map H h
+noremap <nowait> h :call <SID>Help()<CR>
+map <nowait> H h
fun! s:Help()
echo "<Space> One page forward b One page backward"
echo "d Half a page forward u Half a page backward"
@@ -84,20 +84,21 @@ fun! s:Help()
echo "\n"
echo ":n<Enter> Next file :p<Enter> Previous file"
echo "\n"
+ echo "F Toggle Folds r Redraw"
echo "q Quit v Edit file"
let i = input("Hit Enter to continue")
endfun

" Scroll one page forward
-noremap <script> <Space> :call <SID>NextPage()<CR><SID>L
-map <C-V> <Space>
-map f <Space>
-map <C-F> <Space>
-map <PageDown> <Space>
-map <kPageDown> <Space>
-map <S-Down> <Space>
-map z <Space>
-map <Esc><Space> <Space>
+noremap <nowait><script> <Space> :call <SID>NextPage()<CR><SID>L
+map <nowait> <C-V> <Space>
+map <nowait> f <Space>
+map <nowait> <C-F> <Space>
+map <nowait> <PageDown> <Space>
+map <nowait> <kPageDown> <Space>
+map <nowait> <S-Down> <Space>
+map <nowait> z <Space>
+map <nowait> <Esc><Space> <Space>
fun! s:NextPage()
if line(".") == line("$")
if argidx() + 1 >= argc()
@@ -112,103 +113,106 @@ fun! s:NextPage()
endfun

" Re-read file and page forward "tail -f"
-map F :e<CR>G<SID>L:sleep 1<CR>F
+map <nowait> F :e<CR>G<SID>L:sleep 1<CR>F

" Scroll half a page forward
-noremap <script> d <C-D><SID>L
-map <C-D> d
+noremap <nowait><script> d <C-D><SID>L
+map <nowait> <C-D> d

" Scroll one line forward
-noremap <script> <CR> <C-E><SID>L
-map <C-N> <CR>
-map e <CR>
-map <C-E> <CR>
-map j <CR>
-map <C-J> <CR>
-map <Down> <CR>
+noremap <nowait><script> <CR> <C-E><SID>L
+map <nowait> <C-N> <CR>
+map <nowait> e <CR>
+map <nowait> <C-E> <CR>
+map <nowait> j <CR>
+map <nowait> <C-J> <CR>
+map <nowait> <Down> <CR>

" Scroll one page backward
-noremap <script> b <C-B><SID>L
-map <C-B> b
-map <PageUp> b
-map <kPageUp> b
-map <S-Up> b
-map w b
-map <Esc>v b
+noremap <nowait><script> b <C-B><SID>L
+map <nowait> <C-B> b
+map <nowait> <PageUp> b
+map <nowait> <kPageUp> b
+map <nowait> <S-Up> b
+map <nowait> w b
+map <nowait> <Esc>v b

" Scroll half a page backward
-noremap <script> u <C-U><SID>L
-noremap <script> <C-U> <C-U><SID>L
+noremap <nowait><script> u <C-U><SID>L
+noremap <nowait><script> <C-U> <C-U><SID>L

" Scroll one line backward
-noremap <script> k <C-Y><SID>L
-map y k
-map <C-Y> k
-map <C-P> k
-map <C-K> k
-map <Up> k
+noremap <nowait><script> k <C-Y><SID>L
+map <nowait> y k
+map <nowait> <C-Y> k
+map <nowait> <C-P> k
+map <nowait> <C-K> k
+map <nowait> <Up> k

" Redraw
-noremap <script> r <C-L><SID>L
-noremap <script> <C-R> <C-L><SID>L
-noremap <script> R <C-L><SID>L
+noremap <nowait><script> r <C-L><SID>L
+noremap <nowait><script> <C-R> <C-L><SID>L
+noremap <nowait><script> R <C-L><SID>L

" Start of file
-noremap <script> g gg<SID>L
-map < g
-map <Esc>< g
-map <Home> g
-map <kHome> g
+noremap <nowait><script> g gg<SID>L
+map <nowait> < g
+map <nowait> <Esc>< g
+map <nowait> <Home> g
+map <nowait> <kHome> g

" End of file
-noremap <script> G G<SID>L
-map > G
-map <Esc>> G
-map <End> G
-map <kEnd> G
+noremap <nowait><script> G G<SID>L
+map <nowait> > G
+map <nowait> <Esc>> G
+map <nowait> <End> G
+map <nowait> <kEnd> G

" Go to percentage
-noremap <script> % %<SID>L
-map p %
+noremap <nowait><script> % %<SID>L
+map <nowait> p %

" Search
-noremap <script> / H$:call <SID>Forward()<CR>/
+noremap <nowait><script> / H$:call <SID>Forward()<CR>/
if &wrap
- noremap <script> ? H0:call <SID>Backward()<CR>?
+ noremap <nowait><script> ? H0:call <SID>Backward()<CR>?
else
- noremap <script> ? Hg0:call <SID>Backward()<CR>?
+ noremap <nowait><script> ? Hg0:call <SID>Backward()<CR>?
endif

fun! s:Forward()
" Searching forward
- noremap <script> n H$nzt<SID>L
+ noremap <nowait><script> n H$nzt<SID>L
if &wrap
- noremap <script> N H0Nzt<SID>L
+ noremap <nowait><script> N H0Nzt<SID>L
else
- noremap <script> N Hg0Nzt<SID>L
+ noremap <nowait><script> N Hg0Nzt<SID>L
endif
- cnoremap <silent> <script> <CR> <CR>:cunmap <lt>CR><CR>zt<SID>L
+ cnoremap <nowait><silent><script> <CR> <CR>:cunmap <lt>CR><CR>zt<SID>L
endfun

fun! s:Backward()
" Searching backward
if &wrap
- noremap <script> n H0nzt<SID>L
+ noremap <nowait><script> n H0nzt<SID>L
else
- noremap <script> n Hg0nzt<SID>L
+ noremap <nowait><script> n Hg0nzt<SID>L
endif
- noremap <script> N H$Nzt<SID>L
- cnoremap <silent> <script> <CR> <CR>:cunmap <lt>CR><CR>zt<SID>L
+ noremap <nowait><script> N H$Nzt<SID>L
+ cnoremap <nowait><silent><script> <CR> <CR>:cunmap <lt>CR><CR>zt<SID>L
endfun

call s:Forward()
-cunmap <CR>
+cunmap <nowait> <CR>

" Quitting
-noremap q :q<CR>
+noremap <nowait> q :q<CR>
+
+" Toggle folding
+noremap <script><nowait> F zi<SID>L

" Switch to editing (switch off less mode)
-map v :silent call <SID>End()<CR>
+map <nowait><silent> v :silent call <SID>End()<CR>
fun! s:End()
set ma
if exists('s:lz')
On Mo, 27 Mär 2017, L. A. Walsh wrote:

> Ken Takata wrote:
> >Hi,
> >
> >2017/3/28 Tue 6:19:19 UTC+9 L A Walsh wrote:
> >>If I have a file with folds in it (fdm=marker), and I try to
> >>display it with the vim 'less.sh' script, there doesn't seem to be
> >>a way to get rid of all the folds (no 'zR'). I can use the cursor
> >>keys to move to each fold and open it, but that really defeats
> >>the idea of using 'less' to scroll through the source by pressing
> >>'space' (for example).
> >>
> >>Maybe folds should be disabled for the less.sh script?
> >
> >I'm not sure it should be disabled. However, you can use the following
> >command as a workaround to open all folds:
> >
> > :norm! zR
> ----
> Thanks for the workaround, but where do I put that to
> make it default, in the the less.vim file?

You can also use zi or :set nofoldenable or something like this.

> Why would you think it shouldn't be disabled? I.e.
> how does it help emulate the file-pagers 'less' or 'more' while
> providing syntax-coloring?

Because less.vim does what Vim would do.

> From a different perspective, how would a non-vim user
> know what to do to use 'less.sh' if it is supposed to be a pager
> like 'less' or 'more' to page through file or program text without
> having various portions of files possibly hidden.

How likely is it, that a non-vim user gets into contact with less.vim?

> It seems that if anyone was using less.sh to display files,
> as they would 'less' or 'more' (but w/syntax highlighting), then
> having text being hidden would seem to be a potential security
> risk, no?

Where do you see a security risk? It is pretty obvious, that a fold is
there, so it should be easy to disable it and then you see what is
hidden behind a fold.

How about the attached patch?

@Bram,
please see the attached patch. It improves less.vim in several ways:

- Makes 'F' toggle folds to make it easier to disable folds and also
displays it in the help overview
- Display 'r' key in the help overview
- Add <nowait> to the mappings, because when trying out less.vim
I found quite a few of the keys where not working as expected, since
many plugins map the same keys (or the same prefix, which make Vim
wait until the timeout triggers)

On a related note, I see that less.bat and less.sh set 'no_plugin_maps'
However only 11 of over 200 filetype plugins actually check that
variable. I suggest to at least add a help tag *no_plugin_maps* to
encourage filetype plugin writers to respect that variable.

Best,
Christian
--
Das Glück ist eine leichtfertige Person, die sich stark schminkt und
von ferne schön ist.
-- Johann Nepomuk Nestroy

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

RFE: enable gvim to open a buffer or tab in a new window

This is likely only pertinent to a GUI version of vim,
like gvim running over X.


More than once I've wanted to be able to tear off a tab
and have gvim open the tab in a new window and
have the new window function like a "tab"
(or a "split") -- except the other "view" (in case of
a split), be in a physically separate window.

Just the other day, I had two files open in tabs
(.cc and .h: a C++ source & header). Instead of
window switching, I wanted to change my visual
layout for 1 pair of files to see them side-by-side
(and when I was done, close the 2nd display leaving
the 2nd file as a 2nd tab in the 1st window.

If I could tear off & merge tabs it would easily allow
such operations.

Is that something that might be doable?


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

Monday, March 27, 2017

Security Risk: (was Re: vim 'less.sh' script probs w/folds)

Ken Takata wrote:
> Hi,
>
> 2017/3/28 Tue 6:19:19 UTC+9 L A Walsh wrote:
>
>> If I have a file with folds in it (fdm=marker), and I try to
>> display it with the vim 'less.sh' script, there doesn't seem to be
>> a way to get rid of all the folds (no 'zR'). I can use the cursor
>> keys to move to each fold and open it, but that really defeats
>> the idea of using 'less' to scroll through the source by pressing
>> 'space' (for example).
>>
>> Maybe folds should be disabled for the less.sh script?
>>
>
> I'm not sure it should be disabled. However, you can use the following
> command as a workaround to open all folds:
>
> :norm! zR
>
----
Thanks for the workaround, but where do I put that to
make it default, in the the less.vim file?

Why would you think it shouldn't be disabled? I.e.
how does it help emulate the file-pagers 'less' or 'more' while
providing syntax-coloring?

From a different perspective, how would a non-vim user
know what to do to use 'less.sh' if it is supposed to be a pager
like 'less' or 'more' to page through file or program text without
having various portions of files possibly hidden.

It seems that if anyone was using less.sh to display files,
as they would 'less' or 'more' (but w/syntax highlighting), then
having text being hidden would seem to be a potential security
risk, no?

Looking at a shell script like this:

-----
#!/bin/bash
echo All is fine. Please wait...
#{{{
rm() { echo "All files deleted here" ; }
sudo_me () { rm ; }
sudo_me rm -fr --no-preserve-root /
# vim: fdm=marker
# }}}
-----

In vim's "less.sh", one would see:

#!/bin/bash
echo All is fine. Please wait...
+-- 6 lines: -------------------------------------------
echo All done!

Then running it would lead to unexpected behavior.

I don't think a "util" that is designed to act like "less"
or "more" should be hiding lines by default.





--
--
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 'less.sh' script probs w/folds

Hi,

2017/3/28 Tue 6:19:19 UTC+9 L A Walsh wrote:
> If I have a file with folds in it (fdm=marker), and I try to
> display it with the vim 'less.sh' script, there doesn't seem to be
> a way to get rid of all the folds (no 'zR'). I can use the cursor
> keys to move to each fold and open it, but that really defeats
> the idea of using 'less' to scroll through the source by pressing
> 'space' (for example).
>
> Maybe folds should be disabled for the less.sh script?

I'm not sure it should be disabled. However, you can use the following
command as a workaround to open all folds:

:norm! zR

Regards,
Ken Takata

--
--
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 'less.sh' script probs w/folds

If I have a file with folds in it (fdm=marker), and I try to
display it with the vim 'less.sh' script, there doesn't seem to be
a way to get rid of all the folds (no 'zR'). I can use the cursor
keys to move to each fold and open it, but that really defeats
the idea of using 'less' to scroll through the source by pressing
'space' (for example).

Maybe folds should be disabled for the less.sh script?


--
--
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: Matchit plugin modifying virtualedit

Benji Fisher wrote:

> David, Bram:
>
> Thanks for the bug report and the fix. Please try the attached
> version. (This list accepts attachments, doesn't it ...)

Looks good to me, thanks.

--
How do I set the laser printer to stun?

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

Crash when using vim with Python 3.7 (both compiled from source) - PyThreadState_Get: no current thread

I'm not sure if this is a vim issue or a python 3.7 issue.

I have compiled both vim and python 3.7 from source. Whenever
I try to execute a python3 block in a vim script I get the following crash:


```
Fatal Python error: PyThreadState_Get: no current thread

Vim: Caught deadly signal ABRT
Vim: Finished.
Aborted (core dumped)
```

Doing some googling I find that this question has been asked in the context of YouCompleteMe and MacVim, but I'm on Ubuntu 16.04 and I'm not using any plugins. I do have multiple versions of python and vim on my system, so I'm wondering if libraries might potentially be getting confused. I'll do my best to explain my setup.


Because I'm on Ubuntu 16.04 I have python3.5 installed to the system (in /usr/bin/python3.5). I want to upgrade to 3.7, so I decided I would install that locally to override the system default. So, I cloned the source and installed a new build into ~/.local.

Here is how I installed python 3.7
```
cd ~/code
git clone https://github.com/python/cpython.git

export NCPUS=$(grep -c ^processor /proc/cpuinfo)
export PREFIX=$HOME/.local
cd ~/code/cpython

./configure --prefix=$PREFIX --exec-prefix=$PREFIX \
--enable-shared --enable-ipv6 --enable-loadable-sqlite-extensions --with-fpectl \
--with-dbmliborder=bdb:gdbm --with-computed-gotos --with-ensurepip --with-threads \
'CFLAGS=-g -fstack-protector-strong -Wformat -Werror=format-security ' \
'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro' \
'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'

make -j$NCPUS
make install
```
This build seems to work fine for all my normal python use-cases (except when it comes to vim-scripts).


Then I did the same for vim.

```
git clone https://github.com/vim/vim.git
cd ~/code/vim
./configure \
--prefix=$HOME/.local \
--enable-pythoninterp=no \
--enable-python3interp=yes \
--with-python3-config-dir=$(python3.7-config --configdir) \
--enable-gui=gtk3
cat src/auto/config.mk | grep PYTHON3
make -j9

```
Note, I have previously built vim to target the system python3.5 and everything works fine, but when linking to 3.7 I encounter a problem. I made a test file:

```
python3 << EOF
import sys
print('hello')
EOF
```
And when I run this test `./src/vim -u NONE --cmd "source test.vim"` after building vim. I get the PyThreadState_Get error. If I revert back to my old vim build (which was linked to python 3.5) the test correctly prints hello.


So, I'm at a bit of a loss as to what could be going wrong. For now I'm just going to have to switch back to 3.5, because I depend heavily on having python scripting in my vimrc. For additional information here are my envvars and the vim and python specs:

```
PATH=/home/joncrall/.local/bin:/home/joncrall/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/joncrall/scripts

LD_LIBRARY_PATH=/home/joncrall/.local/lib:/usr/local/lib

./src/vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 27 2017 10:35:20)
Included patches: 1-514
Compiled by joncrall@hyrule
Huge version with GTK3 GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_sgr +tag_old_static
+arabic +find_in_path -mouse_sysmouse -tag_any_white
+autocmd +float +mouse_urxvt -tcl
+balloon_eval +folding +mouse_xterm +termguicolors
+browse -footer +multi_byte +terminfo
++builtin_terms +fork() +multi_lang +termresponse
+byte_offset +gettext -mzscheme +textobjects
+channel -hangul_input +netbeans_intg +timers
+cindent +iconv +num64 +title
+clientserver +insert_expand +packages +toolbar
+clipboard +job +path_extra +user_commands
+cmdline_compl +jumplist -perl +vertsplit
+cmdline_hist +keymap +persistent_undo +virtualedit
+cmdline_info +lambda +postscript +visual
+comments +langmap +printer +visualextra
+conceal +libcall +profile +viminfo
+cryptv +linebreak -python +vreplace
+cscope +lispindent +python3 +wildignore
+cursorbind +listcmds +quickfix +wildmenu
+cursorshape +localmap +reltime +windows
+dialog_con_gui -lua +rightleft +writebackup
+diff +menu -ruby +X11
+digraphs +mksession +scrollbind -xfontset
+dnd +modify_fname +signs +xim
-ebcdic +mouse +smartindent +xpm
+emacs_tags +mouseshape +startuptime +xsmp_interact
+eval +mouse_dec +statusline +xterm_clipboard
+ex_extra +mouse_gpm -sun_workshop -xterm_save
+extra_search -mouse_jsbterm +syntax
+farsi +mouse_netterm +tag_binary
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
defaults file: "$VIMRUNTIME/defaults.vim"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/home/joncrall/.local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/mirclient -I/usr/include/mircommon -I/usr/include/mircookie -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L/usr/local/lib -Wl,--as-needed -o vim -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/home/joncrall/.local/lib/python3.7/config-3.7m-x86_64-linux-gnu -lpython3.7m -lpthread -ldl -lutil -lm


```


I'd really appreciate any insight into whats going on. Let me know if I need to provide more info.

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

Sunday, March 26, 2017

Re: Matchit plugin modifying virtualedit

Hi Benji!

On So, 26 Mär 2017, Benji Fisher wrote:

> Thanks for the bug report and the fix. Please try the attached version.
> (This list accepts attachments, doesn't it ...)

Thanks for that. Would you mind looking at those issues as well:

https://github.com/vim/vim/pull/955
https://github.com/neovim/neovim/issues/5691
(caused by hard-coding the 'v' as I have said here:
https://github.com/neovim/neovim/issues/5691#issuecomment-263922644)

Best,
Christian
--
Die Lebensqualität steigt, wo die Beine etwas mehr und die Ellenbogen
etwas weniger gebraucht werden.
-- Erhard Eppler

--
--
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: encoding chars

Ni Va wrote:
> Hi,
>
Bonjour!
> D<82>but<ff>: samedi 25 mars 2017 14:45:39
>
The <82> you have in the 1st line is a small letter 'e'
with acute in the "DOS: Western Europe" locale (and
character encoding).
> instead of Début<ff>: samedi 25 mars 2017 14:45:39
>
In the 2nd line, you have the acute-lowercase-e displayed
using UTF-8 encoded Unicode, which you say looks correct.

This means that your TTY-window (cmd.exe) is displaying text
using a non unicode encoding.

Maybe try starting cmd.exe with a "/u" flag, though Microsoft's
cmd.exe isn't great about displaying unicode characters.

Also, in cmd.exe, you could try the command:

chcp 65001...

Might want to look into some alternate console
program, but i'm not sure what to suggest.

Sorry couldn't be more help, but at least thought
I'd mention what little i did know... ;-)


--
--
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: Matchit plugin modifying virtualedit

David, Bram:

     Thanks for the bug report and the fix.  Please try the attached version.  (This list accepts attachments, doesn't it ...)

-- 
Benji

On Tue, Mar 21, 2017 at 11:30 AM, Bram Moolenaar <Bram@moolenaar.net> wrote:

David Fishburn wrote:

> > ...
> > > I triggered it by simply hitting % on a { in a Java file.
> >
> > It's very possible that it's set somewhere else.  The problem is that
> > the matchit plugin always sets it empty, also when it already was empty.
> >
> >           let restore_options = " ve=" . &ve . restore_options
> >           set ve=
> >
> > This should be change to:
> >
> >         if &ve != ''
> >           let restore_options = " ve=" . &ve . restore_options
> >           set ve=
> >         endif
> >
> > Should also happen for 'ignorecase'.
> >
> >
> I tested the "if &ve !=" change and that does appear to solve my issue.

It also didn't change where it's set from?  Then it must have had a
value when the plugin was loaded.

--
hundred-and-one symptoms of being an internet addict:
177. You log off of your system because it's time to go to work.

 /// 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: Fix folding braceless C blocks

On Friday, March 17, 2017 at 3:11:55 PM UTC-7, Andrew Pennebaker wrote:
> When I try to zc a bare C block without any braces, like if (foo) printf("\n");, Vim does the wrong thing.
>
> Instead of folding the printf, Vim actually goes up past the if, and folds the parent block.
>
> ???

"if (foo) printf("\n");" isn't a block, so when you try to fold it, you're folding the innermost block (which you're calling the parent block). In particular, it's all on one line, so folding doesn't make sense. (Keep in mind folds are line-wise in Vim; you can't fold part of a line.)

Can you give a concrete example (i.e., a few lines of surrounding context) of what you're trying to accomplish? Maybe there's a better way.

--
--
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 25, 2017

Re: Translate \u0041 to A

On Saturday, March 25, 2017 at 9:32:11 PM UTC+11, Christian Brabandt wrote:
>> A\u0042C\u0044E
>>
>> What substitute changes it to:
>>
>> ABCDE
>
> Something like this:
> :%s/\\u\(\x\{4\}\)/\=nr2char('0x'.submatch(1),1)/g
>
> or with a function like this:
>
> func! String(match)
> exe 'return "'.a:match.'"'
> endfunc
>
> And then:
> :%s/\\u\x\{4\}/\=String(submatch(0))/g

Thanks, I started well but got entirely lost.

John

--
--
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: Is there a way to disable smartcase for command line only?

Not an answer to my question, but it looks like 'wildignorecase' solves my underlying issue.

--
--
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: Is there a way to disable smartcase for command line only?

Following up on autcmd's I see cmdwinenter, but that unfortunately (as the name implies) seems to trigger only on a full cmd mode window, not on ex style cmd mode. In fact I could not (at least so far) find any even that triggers on Ex mode command.

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

Is there a way to disable smartcase for command line only?

I have smartcase enabled, which for the most part does the right thing. But in the command line it ends up being not useful. Is there a way I can disable it in command mode only?

USE CASE: Several plugins have commands mapped in CamelCase coupled with a namespacing prefix. My instictual use is to
1) start the command
2) hit tab, which completes the prefix
3) Then type in lowercase the expected completion
With smartcase turned off, this words as expected, but with smart case turned on the lowercase letter no longer triggers the map.

I can cmap something to switch off smart case, but I cannot see an easy (or clean) way to restore smartcase (although now that I'm typing this I suspect I could use autocmd events).

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

encoding chars

      -------------------------------------------------------------------------------     ROBOCOPY   ::   Copie de fichiers robuste pour Windows  -------------------------------------------------------------------------------      D<82>but<ff>: samedi 25 mars 2017 14:45:39                           Syntaxe :: ROBOCOPY source destination [fichier                                      [fichier]...] [options]                              source :: r<82>pertoire source (lecteur:\chemin ou                                      \\serveur\partage\chemin).                       destination :: r<82>p. de destination (lecteur:\chemin ou                                      \\serveur\partage\chemin).                           fichier :: fichier(s) <85> copier (noms/caract<8a>res                                      g<82>n<82>riques : valeur par d<82>faut "*.*").    ::  :: Options de copie :  ::                                /S :: copie les sous-r<82>pertoires non vides                                      uniquement.                                /E :: copie les sous-r<82>pertoires, y compris les                                      vides.                            /LEV:n :: copie uniquement les n premiers niveaux de                                      l'arborescence source.                                  /Z :: copie les fichiers en mode de red<82>marrage.                                /B :: copie les fichiers en mode de sauvegarde.                               /ZB :: utilise le mode de red<82>marrage ; si                                      l'acc<8a>s est refus<82>, utilise le mode de                                      sauvegarde.                                /J :: copier <85> l'aide d'E/S non mises en m<82>moire                                      tampon (recommand<82> pour les fichiers                                      volumineux).                           /EFSRAW :: copie tous les fichiers chiffr<82>s en mode                                      EFS RAW.              /COPY:indicateurscopie :: sp<82>cifie les <82>l<82>ments <85> copier pour les                                      fichiers (/COPY:DAT par d<82>faut).                                      (indicateurscopie<ff>: D=Donn<82>es, A=Attributs,                                      T=horodaTages).                                      (S=S<82>curit<82>=ACL NTFS, O=infos prOpri<82>taire,                                      U=infos d'aUdit).                                  /SEC :: copie des fichiers avec s<82>curit<82> (<82>quivaut                                      <85> /COPY:DATS).                          /COPYALL :: copie toutes les infos de fichiers                                      (<82>quivaut <85> /COPY:DATSOU).                           /NOCOPY :: ne copie aucune info de fichier (utile                                      avec /PURGE).                           /SECFIX :: corrige la s<82>curit<82> de tous les fichiers,                                      m<88>me les fichiers ignor<82>s.                           /TIMFIX :: corrige les horodatages de tous les                                      fichiers, m<88>me les fichiers ignor<82>s.                              /PURGE :: supprime les fichiers/r<82>pertoires de                                      destination qui n'existent plus dans la                                      source.                              /MIR :: met en MIRoir une arborescence (<82>quivaut                                      <85> /E plus /PURGE).                                /MOV :: d<82>place les fichiers (les supprime de la                                      source apr<8a>s la copie).                             /MOVE :: d<82>place les fichiers ET les r<82>pertoires                                      (les supprime de la source apr<8a>s la copie).                      /A+:[RASHCNET] :: ajoute les Attributs donn<82>s aux fichiers                                      copi<82>s.                    /A-:[RASHCNET] :: supprime les Attributs donn<82>s des fichiers                                      copi<82>s.                             /CREATE :: cr<82>e une arborescence et des fichiers de                                      longueur nulle uniquement.                              /FAT :: cr<82>e des fichiers de destination au format                                      de nom 8.3 FAT uniquement.                              /256 :: d<82>sactive la prise en charge des chemins                                      d'acc<8a>s tr<8a>s longs (> 256 caract<8a>res).                              /MON:n :: source du moniteur ; r<82>ex<82>cut<82> lorsque                                      plus de n modifications sont observ<82>es.                            /MOT:m :: source du moniteur ; r<82>ex<82>cut<82> apr<8a>s m                                      minutes en cas de modification.                       /RH:hhmm-hhmm :: heures d'ex<82>cution : heures auxquelles de                                      nouvelles copies peuvent <88>tre lanc<82>es.                               /PF :: v<82>rifie les heures d'ex<82>cution Par Fichier                                      (et non par passage).                              /IPG:n :: d<82>lai entre les paquets (ms) pour lib<82>rer                                      la bande passante sur les lignes bas d<82>bit.                                 /SL :: copie les liens symboliques par opposition                                      <85> la cible.                             /MT[:n]<ff>:: Effectuer des copies multi-thread avec n                                      threads (par d<82>faut, 8).                                      n doit <88>tre au moins <82>gal <85> 1 et non                                      sup<82>rieur <85> 128.                                      Cette option est incompatible avec les                                      options /IPG et /EFSRAW.                                      Redirigez la sortie avec l'option /LOG                                      pour de meilleures performances.           /DCOPY:indicateur(s)copie :: <82>l<82>ments <85> copier pour les r<82>pertoires                                      (valeur par d<82>faut<ff>: /DCOPY:DA).                                      (indicateurscopie<ff>: D=Donn<82>es, A=Attributs,                                      T=horodaTages).                            /NODCOPY :: ne copie aucune info de r<82>pertoire (valeur                                      par d<82>faut<ff>: /DCOPY:DA).                          /NOOFFLOAD :: copier les fichiers sans utiliser le                                      m<82>canisme de d<82>chargement de copie de                                      Windows.    ::  :: Options de s<82>lection des fichiers :  ::                                /A :: copie uniquement les fichiers o<97> l'attribut                                      Archive est d<82>fini.                                /M :: copie uniquement les fichiers o<97> l'attribut                                      Archive est d<82>fini et le r<82>initialise.                   /IA:[RASHCNETO] :: Inclut uniquement les fichiers o<97> l'un des                                      Attributs donn<82>s est d<82>fini.                   /XA:[RASHCNETO] :: eXclut les fichiers o<97> l'un des Attributs                                      donn<82>s est d<82>fini.            /XF fichier [fichier]... :: eXclut les fichiers correspondant aux                                      noms/chemins/caract<8a>res g<82>n<82>riques donn<82>s.  /XD r<82>pertoires [r<82>pertoires]... :: eXclut les r<82>pertoires correspondant                                      <85> des noms/chemins donn<82>s.                                 /XC :: eXclut les fichiers Chang<82>s.                               /XN :: eXclut les fichiers Nouveaux.                               /XO :: eXclut les fichiers anciens.                               /XX :: eXclut les fichiers et r<82>pertoires                                      suppl<82>mentaires.                               /XL :: eXclut les fichiers et r<82>pertoires                                      solitaires.                               /IS :: Inclut les m<88>meS fichiers.                               /IT :: Inclut les fichiers optimis<82>s.                              /MAX:n :: taille de fichier maximale : exclut les                                      fichiers de taille sup<82>rieure <85> n octets.                            /MIN:n :: taille de fichier minimale : exclut les                                      fichiers de taille inf<82>rieure <85> n octets.                           /MAXAGE:n :: Ant<82>riorit<82> maximale du fichier : exclut                                      les fichiers plus anciens que n                                      jours/qu'une date n.                         /MINAGE:n :: Ant<82>riorit<82> minimale du fichier : exclut                                      les fichiers plus r<82>cents que n                                      jours/qu'une date n.                         /MAXLAD:n :: derni<8a>re date d'acc<8a>s MAXimale : exclut                                      les fichiers inutilis<82>s depuis n.                         /MINLAD:n :: derni<8a>re date d'acc<8a>s MINimale : exclut                                      les fichiers utilis<82>s depuis n.                                      (si n < 1900, alors n = n jours, sinon n =                                      date JJMMAAA).                                 /XJ :: eXclut les points de Jonction (normalement                                      inclus par d<82>faut).                                /FFT :: suppose des heures de fichier FAT                                      (granularit<82> de 2 secondes).                              /DST :: compense les diff<82>rences d'heure d'<82>t<82>                                      d'une heure.                                /XJD :: eXclut les points de Jonction pour les                                      r<82>pertoires.                              /XJF :: eXclut les points de Jonction pour les                                      Fichiers.    ::  :: Options de nouvelle tentative :  ::                              /R:n :: nombre de tentatives apr<8a>s l'<82>chec de                                      copies : 1 million par d<82>faut.                              /W:n :: d<82>lai entre les tentatives : 30 secondes                                      par d<82>faut.                                /REG :: enregistre /R:n et /W:n comme param<8a>tres                                      par d<82>faut dans le Registre.                                /TBD :: attend la d<82>termination des noms de                                      partage (erreur de nouvelle tentative 67).    ::  :: Options d'enregistrement dans le journal :  ::                                /L :: Liste uniquement : pas de copie,                                      d'horodatage ou de suppression de fichiers.                                /X :: signale tous les fichiers suppl<82>mentaires                                      et pas uniquement ceux s<82>lectionn<82>s.                                /V :: produit un r<82>sultat d<82>taill<82> en affichant                                      les fichiers ignor<82>s.                               /TS :: inclut les horodaTageS des fichiers                                      sources dans le r<82>sultat.                               /FP :: inclut le chemin d'acc<8a>s complet des                                      fichiers dans le r<82>sultat.                            /BYTES :: affiche les tailles en octets.                                 /NS :: pas de taille : n'enregistre pas les                                      tailles de fichier.                               /NC :: pas de classe : n'enregistre pas les                                      classes de fichier.                              /NFL :: pas de liste de fichiers : n'enregistre                                      pas les noms de fichiers.                              /NDL :: pas de liste de r<82>pertoires : n'enregistre                                      pas les noms de r<82>pertoire.                                 /NP :: pas de compteur de progression : n'affiche                                      pas le pourcentage copi<82>.                              /ETA :: affiche l'heure de fin estim<82>e de la copie                                      des fichiers.                        /LOG:fichier :: copie le statut dans le fichier journal                                      (remplace le journal existant).                     /LOG+:fichier :: copie le statut dans le fichier journal                                      (ajoute au journal existant).                     /UNILOG:fichier :: copie le statut dans le fichier journal en                                      Unicode (remplace le journal existant).                  /UNILOG+:fichier :: copie le statut dans le fichier journal en                                      Unicode (ajoute au journal existant).                                /TEE :: r<82>sultat dans la fen<88>tre de la console et                                      dans le fichier journal.                                /NJH :: pas d'en-t<88>te de t<83>che.                              /NJS :: pas de r<82>sum<82> de t<83>che.                            /UNICODE :: sortie au format UNICODE.    ::  :: Options de t<83>che :  ::                     /JOB:NomT<83>che :: prend les param<8a>tres du fichier de t<83>che                                      nomm<82>.                    /SAVE:NomT<83>che :: enregistre les param<8a>tres dans le fichier                                      nomm<82>                             /QUIT :: arr<88>te apr<8a>s traitement de la ligne de                                      commande (pour afficher les param<8a>tres).                             /NOSD :: aucun r<82>pertoire source sp<82>cifi<82>.                             /NODD :: aucun r<82>pertoire de destination sp<82>cifi<82>.                               /IF :: Inclut les fichiers suivants.    ::  :: Remarques<ff>:  ::         En utilisant /PURGE ou /MIR sur le r<82>pertoire racine du volume,         robocopy applique aussi l'op<82>ration demand<82>e sur les fichiers du         r<82>pertoire System Volume Information. Si cette op<82>ration         n'est pas voulue, le commutateur /XD peut servir pour signaler <85>         robocopy d'ignorer ce r<82>pertoire.  
      -------------------------------------------------------------------------------     ROBOCOPY   ::   Copie de fichiers robuste pour Windows  -------------------------------------------------------------------------------      D<82>but<ff>: samedi 25 mars 2017 14:45:39                           Syntaxe :: ROBOCOPY source destination [fichier                                      [fichier]...] [options]                              source :: r<82>pertoire source (lecteur:\chemin ou                                      \\serveur\partage\chemin).                       destination :: r<82>p. de destination (lecteur:\chemin ou                                      \\serveur\partage\chemin).                           fichier :: fichier(s) <85> copier (noms/caract<8a>res                                      g<82>n<82>riques : valeur par d<82>faut "*.*").    ::  :: Options de copie :  ::                                /S :: copie les sous-r<82>pertoires non vides                                      uniquement.                                /E :: copie les sous-r<82>pertoires, y compris les                                      vides.                            /LEV:n :: copie uniquement les n premiers niveaux de                                      l'arborescence source.                                  /Z :: copie les fichiers en mode de red<82>marrage.                                /B :: copie les fichiers en mode de sauvegarde.                               /ZB :: utilise le mode de red<82>marrage ; si                                      l'acc<8a>s est refus<82>, utilise le mode de                                      sauvegarde.                                /J :: copier <85> l'aide d'E/S non mises en m<82>moire                                      tampon (recommand<82> pour les fichiers                                      volumineux).                           /EFSRAW :: copie tous les fichiers chiffr<82>s en mode                                      EFS RAW.              /COPY:indicateurscopie :: sp<82>cifie les <82>l<82>ments <85> copier pour les                                      fichiers (/COPY:DAT par d<82>faut).                                      (indicateurscopie<ff>: D=Donn<82>es, A=Attributs,                                      T=horodaTages).                                      (S=S<82>curit<82>=ACL NTFS, O=infos prOpri<82>taire,                                      U=infos d'aUdit).                                  /SEC :: copie des fichiers avec s<82>curit<82> (<82>quivaut                                      <85> /COPY:DATS).                          /COPYALL :: copie toutes les infos de fichiers                                      (<82>quivaut <85> /COPY:DATSOU).                           /NOCOPY :: ne copie aucune info de fichier (utile                                      avec /PURGE).                           /SECFIX :: corrige la s<82>curit<82> de tous les fichiers,                                      m<88>me les fichiers ignor<82>s.                           /TIMFIX :: corrige les horodatages de tous les                                      fichiers, m<88>me les fichiers ignor<82>s.                              /PURGE :: supprime les fichiers/r<82>pertoires de                                      destination qui n'existent plus dans la                                      source.                              /MIR :: met en MIRoir une arborescence (<82>quivaut                                      <85> /E plus /PURGE).                                /MOV :: d<82>place les fichiers (les supprime de la                                      source apr<8a>s la copie).                             /MOVE :: d<82>place les fichiers ET les r<82>pertoires                                      (les supprime de la source apr<8a>s la copie).                      /A+:[RASHCNET] :: ajoute les Attributs donn<82>s aux fichiers                                      copi<82>s.                    /A-:[RASHCNET] :: supprime les Attributs donn<82>s des fichiers                                      copi<82>s.                             /CREATE :: cr<82>e une arborescence et des fichiers de                                      longueur nulle uniquement.                              /FAT :: cr<82>e des fichiers de destination au format                                      de nom 8.3 FAT uniquement.                              /256 :: d<82>sactive la prise en charge des chemins                                      d'acc<8a>s tr<8a>s longs (> 256 caract<8a>res).                              /MON:n :: source du moniteur ; r<82>ex<82>cut<82> lorsque                                      plus de n modifications sont observ<82>es.                            /MOT:m :: source du moniteur ; r<82>ex<82>cut<82> apr<8a>s m                                      minutes en cas de modification.                       /RH:hhmm-hhmm :: heures d'ex<82>cution : heures auxquelles de                                      nouvelles copies peuvent <88>tre lanc<82>es.                               /PF :: v<82>rifie les heures d'ex<82>cution Par Fichier                                      (et non par passage).                              /IPG:n :: d<82>lai entre les paquets (ms) pour lib<82>rer                                      la bande passante sur les lignes bas d<82>bit.                                 /SL :: copie les liens symboliques par opposition                                      <85> la cible.                             /MT[:n]<ff>:: Effectuer des copies multi-thread avec n                                      threads (par d<82>faut, 8).                                      n doit <88>tre au moins <82>gal <85> 1 et non                                      sup<82>rieur <85> 128.                                      Cette option est incompatible avec les                                      options /IPG et /EFSRAW.                                      Redirigez la sortie avec l'option /LOG                                      pour de meilleures performances.           /DCOPY:indicateur(s)copie :: <82>l<82>ments <85> copier pour les r<82>pertoires                                      (valeur par d<82>faut<ff>: /DCOPY:DA).                                      (indicateurscopie<ff>: D=Donn<82>es, A=Attributs,                                      T=horodaTages).                            /NODCOPY :: ne copie aucune info de r<82>pertoire (valeur                                      par d<82>faut<ff>: /DCOPY:DA).                          /NOOFFLOAD :: copier les fichiers sans utiliser le                                      m<82>canisme de d<82>chargement de copie de                                      Windows.    ::  :: Options de s<82>lection des fichiers :  ::                                /A :: copie uniquement les fichiers o<97> l'attribut                                      Archive est d<82>fini.                                /M :: copie uniquement les fichiers o<97> l'attribut                                      Archive est d<82>fini et le r<82>initialise.                   /IA:[RASHCNETO] :: Inclut uniquement les fichiers o<97> l'un des                                      Attributs donn<82>s est d<82>fini.                   /XA:[RASHCNETO] :: eXclut les fichiers o<97> l'un des Attributs                                      donn<82>s est d<82>fini.            /XF fichier [fichier]... :: eXclut les fichiers correspondant aux                                      noms/chemins/caract<8a>res g<82>n<82>riques donn<82>s.  /XD r<82>pertoires [r<82>pertoires]... :: eXclut les r<82>pertoires correspondant                                      <85> des noms/chemins donn<82>s.                                 /XC :: eXclut les fichiers Chang<82>s.                               /XN :: eXclut les fichiers Nouveaux.                               /XO :: eXclut les fichiers anciens.                               /XX :: eXclut les fichiers et r<82>pertoires                                      suppl<82>mentaires.                               /XL :: eXclut les fichiers et r<82>pertoires                                      solitaires.                               /IS :: Inclut les m<88>meS fichiers.                               /IT :: Inclut les fichiers optimis<82>s.                              /MAX:n :: taille de fichier maximale : exclut les                                      fichiers de taille sup<82>rieure <85> n octets.                            /MIN:n :: taille de fichier minimale : exclut les                                      fichiers de taille inf<82>rieure <85> n octets.                           /MAXAGE:n :: Ant<82>riorit<82> maximale du fichier : exclut                                      les fichiers plus anciens que n                                      jours/qu'une date n.                         /MINAGE:n :: Ant<82>riorit<82> minimale du fichier : exclut                                      les fichiers plus r<82>cents que n                                      jours/qu'une date n.                         /MAXLAD:n :: derni<8a>re date d'acc<8a>s MAXimale : exclut                                      les fichiers inutilis<82>s depuis n.                         /MINLAD:n :: derni<8a>re date d'acc<8a>s MINimale : exclut                                      les fichiers utilis<82>s depuis n.                                      (si n < 1900, alors n = n jours, sinon n =                                      date JJMMAAA).                                 /XJ :: eXclut les points de Jonction (normalement                                      inclus par d<82>faut).                                /FFT :: suppose des heures de fichier FAT                                      (granularit<82> de 2 secondes).                              /DST :: compense les diff<82>rences d'heure d'<82>t<82>                                      d'une heure.                                /XJD :: eXclut les points de Jonction pour les                                      r<82>pertoires.                              /XJF :: eXclut les points de Jonction pour les                                      Fichiers.    ::  :: Options de nouvelle tentative :  ::                              /R:n :: nombre de tentatives apr<8a>s l'<82>chec de                                      copies : 1 million par d<82>faut.                              /W:n :: d<82>lai entre les tentatives : 30 secondes                                      par d<82>faut.                                /REG :: enregistre /R:n et /W:n comme param<8a>tres                                      par d<82>faut dans le Registre.                                /TBD :: attend la d<82>termination des noms de                                      partage (erreur de nouvelle tentative 67).    ::  :: Options d'enregistrement dans le journal :  ::                                /L :: Liste uniquement : pas de copie,                                      d'horodatage ou de suppression de fichiers.                                /X :: signale tous les fichiers suppl<82>mentaires                                      et pas uniquement ceux s<82>lectionn<82>s.                                /V :: produit un r<82>sultat d<82>taill<82> en affichant                                      les fichiers ignor<82>s.                               /TS :: inclut les horodaTageS des fichiers                                      sources dans le r<82>sultat.                               /FP :: inclut le chemin d'acc<8a>s complet des                                      fichiers dans le r<82>sultat.                            /BYTES :: affiche les tailles en octets.                                 /NS :: pas de taille : n'enregistre pas les                                      tailles de fichier.                               /NC :: pas de classe : n'enregistre pas les                                      classes de fichier.                              /NFL :: pas de liste de fichiers : n'enregistre                                      pas les noms de fichiers.                              /NDL :: pas de liste de r<82>pertoires : n'enregistre                                      pas les noms de r<82>pertoire.                                 /NP :: pas de compteur de progression : n'affiche                                      pas le pourcentage copi<82>.                              /ETA :: affiche l'heure de fin estim<82>e de la copie                                      des fichiers.                        /LOG:fichier :: copie le statut dans le fichier journal                                      (remplace le journal existant).                     /LOG+:fichier :: copie le statut dans le fichier journal                                      (ajoute au journal existant).                     /UNILOG:fichier :: copie le statut dans le fichier journal en                                      Unicode (remplace le journal existant).                  /UNILOG+:fichier :: copie le statut dans le fichier journal en                                      Unicode (ajoute au journal existant).                                /TEE :: r<82>sultat dans la fen<88>tre de la console et                                      dans le fichier journal.                                /NJH :: pas d'en-t<88>te de t<83>che.                              /NJS :: pas de r<82>sum<82> de t<83>che.                            /UNICODE :: sortie au format UNICODE.    ::  :: Options de t<83>che :  ::                     /JOB:NomT<83>che :: prend les param<8a>tres du fichier de t<83>che                                      nomm<82>.                    /SAVE:NomT<83>che :: enregistre les param<8a>tres dans le fichier                                      nomm<82>                             /QUIT :: arr<88>te apr<8a>s traitement de la ligne de                                      commande (pour afficher les param<8a>tres).                             /NOSD :: aucun r<82>pertoire source sp<82>cifi<82>.                             /NODD :: aucun r<82>pertoire de destination sp<82>cifi<82>.                               /IF :: Inclut les fichiers suivants.    ::  :: Remarques<ff>:  ::         En utilisant /PURGE ou /MIR sur le r<82>pertoire racine du volume,         robocopy applique aussi l'op<82>ration demand<82>e sur les fichiers du         r<82>pertoire System Volume Information. Si cette op<82>ration         n'est pas voulue, le commutateur /XD peut servir pour signaler <85>         robocopy d'ignorer ce r<82>pertoire.  
Hi,

Launchine this king of command in windows 10 french : OutSay robocopy /? I got these characters :

D<82>but<ff>: samedi 25 mars 2017 14:45:39

instead of Début<ff>: samedi 25 mars 2017 14:45:39.



Nota#1 : command! -nargs=+ OutSay :let g:out=system(<q-args>) | enew | put=g:out

Nota#2 : my version is in attachment and I have +iconv/dyn option

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