Saturday, March 30, 2019

Re: Announce: ECMAScript interface for Vim

On Sat, Mar 30, 2019 at 10:55 PM Andrey Butirsky <butirsky@gmail.com> wrote:
>
> On 3/30/19 9:54 PM, Bob Pepin wrote:
>
> On 28 Mar 2019, at 15.01, Andrey <butirsky@gmail.com> wrote:
>
> Thumbs up for any common language support!
> I would love if those languages could be used as much effectively as Vimscript itself for Vim programming.
>
> I tried to make all Vim builtins also ES builtins so that simple scripts look almost the same in ES as in Vimscript. Have a look at https://github.com/bobpepin/vim/blob/duktape/runtime/indent/python.js, autogenerated from the corresponding .vim file, https://github.com/bobpepin/vim/blob/duktape/runtime/indent/python.vim.
>
> (Caveat: no datatypes requiring automatic memory management can be passed between Vimscript builtins and ES)
>
> I am playing around with the asyn/await features from recent ES versions together with Vim channels and events (keyboard input/autocmds) right now, imho it's significantly more effective than Vimscript as soon as callbacks get involved. For a sample JSP implementation, see https://github.com/bobpepin/vim/blob/duktape/src/jsp-jsonrpc.ts.
>
> Best,
> Bob
>
> Thanks Bob, sounds interesting.
>
> Actually, I'm new to Vimscript and just had to lean it while working on my re-make of StlShowFunc plugin.
>
> Just curious if the plugin could be easily re-writed on ECMAScript also, could you have a look maybe? :)
>
> (e.g., people complained that Python integration is not very elegant, dunno anything about that)

Isn't there a chicken-and-egg problem there somewhere? I mean, Vim
cannot understand ECMAScript except by means of the plugin, so if the
plugin itself were written in ECMAScript, Vim couldn't decipher it,
could it?

Best regards,
Tony.

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

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

Re: Announce: ECMAScript interface for Vim

On 3/30/19 9:54 PM, Bob Pepin wrote:
On 28 Mar 2019, at 15.01, Andrey <butirsky@gmail.com> wrote:    Thumbs up for any common language support!  I would love if those languages could be used as much effectively as Vimscript itself for Vim programming.    
  I tried to make all Vim builtins also ES builtins so that simple scripts look almost the same in ES as in Vimscript. Have a look at https://github.com/bobpepin/vim/blob/duktape/runtime/indent/python.js, autogenerated from the corresponding .vim file, https://github.com/bobpepin/vim/blob/duktape/runtime/indent/python.vim.    (Caveat: no datatypes requiring automatic memory management can be passed between Vimscript builtins and ES)    I am playing around with the asyn/await features from recent ES versions together with Vim channels and events (keyboard input/autocmds) right now, imho it's significantly more effective than Vimscript as soon as callbacks get involved. For a sample JSP implementation, see https://github.com/bobpepin/vim/blob/duktape/src/jsp-jsonrpc.ts.    Best,  Bob  

Thanks Bob, sounds interesting.

Actually, I'm new to Vimscript and just had to lean it while working on my re-make of StlShowFunc plugin.

Just curious if the plugin could be easily re-writed on ECMAScript also, could you have a look maybe? :)

(e.g., people complained that Python integration is not very elegant, dunno anything about that)

Re: Announce: ECMAScript interface for Vim

Nice work Bob. :) If you are ever in the NYC area we'd love to have you share about integrating Duktape at our little vim meetup.

As a developer using javascript and vim every day, the idea of being able to experiment with JS in vim is quite exciting.

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: Announce: ECMAScript interface for Vim

> On 28 Mar 2019, at 15.01, Andrey <butirsky@gmail.com> wrote:
>
> On Monday, 4 March 2019 15:09:36 UTC+3, Bob Pepin wrote:
>> Hi,
>> This is to announce the release of an ECMAScript scripting interface for Vim.
>>
>> Why? Because it seemed like the right thing to do.
>>
>
> Thumbs up for any common language support!
> I would love if those languages could be used as much effectively as Vimscript itself for Vim programming.
>

I tried to make all Vim builtins also ES builtins so that simple scripts look almost the same in ES as in Vimscript. Have a look at https://github.com/bobpepin/vim/blob/duktape/runtime/indent/python.js, autogenerated from the corresponding .vim file, https://github.com/bobpepin/vim/blob/duktape/runtime/indent/python.vim.

(Caveat: no datatypes requiring automatic memory management can be passed between Vimscript builtins and ES)

I am playing around with the asyn/await features from recent ES versions together with Vim channels and events (keyboard input/autocmds) right now, imho it's significantly more effective than Vimscript as soon as callbacks get involved. For a sample JSP implementation, see https://github.com/bobpepin/vim/blob/duktape/src/jsp-jsonrpc.ts.

Best,
Bob

--
--
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: windows 10, cygwin, and compiling vim

On Sat, Mar 30, 2019 at 10:01 AM Charles E Campbell
<drchip@campbellfamily.biz> wrote:
>
> Hello:
>
> I've been working on getting a vim compiled under windows10+cygwin.
> Hasn't worked too well yet. Anybody out there have some ideas on how to
> compile a runnable vim under windows10+cygwin?
>
> * configure --with-features=huge
> That seems to work fine
>
> * cd src; make (note that this is done under cygwin, so its cygwin's
> make and cygwin's gcc)
> I got about 20 warnings: all saying something like "visibility
> attribute not supported in this configuration: ignored
> This warning affects pen.c, termscreen.c, unicode.c, state.c, vterm.c
>
> As a complete example of such a warning:
> libvterm/src/pen.h: In function 'vterm_state_newpen':
> libvterm/src/pen.c:164:1: warning: visibility attribute not supported
> in this configuration; ignored [-Wattributes]
>
> * otherwise, the compile completes without other warnings. When I try
> to run it: nothing apparently happens.
>
> I'd like to get a cygwin-based vim compiled and running; I'll just go
> ahead and use the gvim from www.vim.org; I need both to insure that
> netrw is working properly under Windows.
>
> Thank you,
> Chip Campbell

IIRC, compiling Vim by using "configure; make" with the Makefile and
src/Makefile under Cygwin will produce a "Unix-like" Cygwin executable
which can only be run under Cygwin, with the cygwin1.dll in the $PATH
and preferably from Cygwin bash.

Since Cygwin has stopped packaging a MinGW gcc (IIRC that was some
years ago), to compile a "native-Windows" Vim or gvim in a Unix-like
environment, you should use the src/make_ming.mak (not the Makefile)
which invokes the MinGW make and gcc executables. Or you can also
compile a native-Windows Vim and gvim in the Windows "dos box" using
Windows tools, with the src/Make_svc.mak; I'm not sure what the
src/msvc????.bat scripts are about, maybe you should use one or the
other depending on your MS Visual C version.

Best regards,
Tony.

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

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

Re: windows 10, cygwin, and compiling vim

On Fr, 29 Mär 2019, Charles E Campbell wrote:

> Hello:
>
> I've been working on getting a vim compiled under windows10+cygwin. Hasn't
> worked too well yet.  Anybody out there have some ideas on how to compile a
> runnable vim under windows10+cygwin?
>
> * configure --with-features=huge
>   That seems to work fine
>
> * cd src; make  (note that this is done under cygwin, so its cygwin's make
> and cygwin's gcc)
>   I got about 20 warnings: all saying something like "visibility attribute
> not supported in this configuration: ignored
>   This warning affects pen.c, termscreen.c, unicode.c, state.c, vterm.c
>
>   As a complete example of such a warning:
>   libvterm/src/pen.h: In function 'vterm_state_newpen':
>   libvterm/src/pen.c:164:1: warning: visibility attribute not supported in
> this configuration; ignored [-Wattributes]

Hm, we disabled this warning with 8.0.1627 for mingw, not sure what test
would be needed. What gcc version is this? If this is cygwin specific, I
guess we need to add a check for `defined(__CYGWIN__)`

index 2ef358ce9..095ba7123 100644
--- a/src/libvterm/src/vterm_internal.h
+++ b/src/libvterm/src/vterm_internal.h
@@ -5,7 +5,7 @@

#include <stdarg.h>

-#if defined(__GNUC__) && !defined(__MINGW32__)
+#if defined(__GNUC__) && !defined(__MINGW32__) && !defined(__CYGWIN__)
# define INTERNAL __attribute__((visibility("internal")))
# define UNUSED __attribute__((unused))
#else


> * otherwise, the compile completes without other warnings.  When I try to
> run it: nothing apparently happens.

Is this gvim or vim? did you try to run the cygwin console vim in a
standard cmd terminal? I think this is not supported.

> I'd like to get a cygwin-based vim compiled and running; I'll just go ahead
> and use the gvim from www.vim.org; I need both to insure that netrw is
> working properly under Windows.

You can always use the vim from the vim/vim-win32-installer repository

Best,
Christian
--
Wußten Sie schon...
... daß der Walfisch, das größte lebende Säugetier, alle anderen
Säugetiere an Größe übertrifft?

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

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

Friday, March 29, 2019

windows 10, cygwin, and compiling vim

Hello:

I've been working on getting a vim compiled under windows10+cygwin.
Hasn't worked too well yet.  Anybody out there have some ideas on how to
compile a runnable vim under windows10+cygwin?

* configure --with-features=huge
  That seems to work fine

* cd src; make  (note that this is done under cygwin, so its cygwin's
make and cygwin's gcc)
  I got about 20 warnings: all saying something like "visibility
attribute not supported in this configuration: ignored
  This warning affects pen.c, termscreen.c, unicode.c, state.c, vterm.c

  As a complete example of such a warning:
  libvterm/src/pen.h: In function 'vterm_state_newpen':
  libvterm/src/pen.c:164:1: warning: visibility attribute not supported
in this configuration; ignored [-Wattributes]

* otherwise, the compile completes without other warnings.  When I try
to run it: nothing apparently happens.

I'd like to get a cygwin-based vim compiled and running; I'll just go
ahead and use the gvim from www.vim.org; I need both to insure that
netrw is working properly under Windows.

Thank you,
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.

Thursday, March 28, 2019

Re: Announce: ECMAScript interface for Vim

On Monday, 4 March 2019 15:09:36 UTC+3, Bob Pepin wrote:
> Hi,
> This is to announce the release of an ECMAScript scripting interface for Vim.
>
> Why? Because it seemed like the right thing to do.
>

Thumbs up for any common language support!
I would love if those languages could be used as much effectively as Vimscript itself for Vim programming.

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

'StlShowFunc' plugin: Showing Functions in the Status Line

Hello all,
I've done massive improvements over the DrChip's StlShowFunc plugin - Showing Functions in the Status Line: https://github.com/dr-chip-vim-scripts/StlShowFunc.

Anyone interested are welcome to test 'staging' branch:
https://github.com/dr-chip-vim-scripts/StlShowFunc/tree/staging

I need your help so I could merge the changes :)
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.

Tuesday, March 26, 2019

Re: [vim/vim] Conceal for tex and saving folds (#4175)

Hello:

Your problem is that mkview/loadview do not handle filetype detection,
nor do they handle syntax on.  See the help:  :help mkview  and search
for "not perfect".

So, modify your BufWinEnter handling autocmd:

autocmd BufWinEnter * silent! loadview|filetype detect

Hope that helps,
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: vim-xml-ftplugin vs. formatoptions

On Di, 26 Mär 2019, Rob Foehl wrote:

> I've noticed that formatoptions+=c and a suitable textwidth value has no
> effect with xml/xslt filetypes, and found this in
> $VIMRUNTIME/autoload/xmlformat.vim:
>
> func! xmlformat#Format()
> " only allow reformatting through the gq command
> " (e.g. Vim is in normal mode)
> if mode() != 'n'
> " do not fall back to internal formatting
> return 0
> endif
> [...]
>
> This is as shipped with 8.1.998, although the upstream version appears to be
> identical at the moment. Kind of surprised at that -- is there some
> underlying reason to disable auto formatting for XML filetypes?
>
> Removing that mode() test definitely causes problems, figured I'd ask here
> before digging any further...

Maintainer here: Yes, there were some serious problems with the way
formatexpressions are evaluated, therefore I explicitly disabled it.

This is from a mail to Bram about the topic (sorry for disclosure):

Also, it looks like the doc patch has never been included, so I keep it
here for reference. (CC'ing Bram, who might want to include the doc
patch):

On Sa, 12 Mai 2018, Bram Moolenaar wrote:
> Christian wrote:
> > However when playing around a bit with formatexpession in insert mode, I
> > had all kind of strange effects (non-undoable insertions below the
> > current line, kind of a recursive call of the function, etc) so I would
> > actually go so far to discourage calling the function in insert mode (or
> > at least mention that in insert mode the function should fall back to
> > Vims internal formatter by returning non-zero).
> >
> > And in general it feels too limited to be called in insert mode for each
> > character inserted (since you have to be really careful not to overwrite
> > anything unwanted and it is a bit tricky to simply add a line break)
> >
> > Also I think it is hardly possible to make an educated guess what the
> > user actually wants from the single character to be inserted.
> >
[...]
>
> Oh, I didn't mean to include an example of a function, but just when to
> set 'formatexpr' to an existing function. And where to do that. I
> would assume in most cases it would be done in the ftplugin file:
>
> :set formatexpr=xmlformat#Format()
>
> With an explanation of how Vim finds the file that contains the function
> in the autoload directory.

Okay, how about this then:
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index ab820b066..95479fae8 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -1445,7 +1445,52 @@ to the name of an external program for Vim to use for text formatting. The
'textwidth' and other options have no effect on formatting by an external
program.

- *right-justify*
+ *format-formatexpr*
+The 'formatexpr' option can be set to a Vim Script function that performs
+reformatting of the buffer. This should usually happen in a |ftplugin|, since
+formatting is highly dependent on the actually used language. It makes sense
+to use an |autoload| script, so the corresponding script is only loaded when
+actually needed and the script should be called <filetype>format.vim.
+
+For example, the xml filetype plugin distributed with Vim in the $VIMRUNTIME
+directory, sets the 'formatexpr' option to: >
+
+ setlocal formatexpr=xmlformat#Format()
+
+That means, you will find the corresponding script in the directory
+`$VIMRUNTIME/autoload/xmlformat.vim`
+
+Here is an example script that removes trailing whitespace from the selected text: >
+
+ func! format#Format()
+ " only reformat on explicit gq command
+ if mode() != 'n'
+ " fall back to Vims internal reformatting
+ return 1
+ endif
+ let lines = getline(v:lnum, v:lnum + v:count - 1)
+ call map(lines, {key, val -> substitute(val, '\s\+$', '', 'g')})
+ call setline('.', lines)
+
+ " do not run internal formatter!
+ return 0
+ endfunc
+ setl formatexpr=format#Format()
+>
+Note: this function explicitly returns non-zero when called from insert mode
+(which basically means, text is inserted beyond the 'textwidth' limit). This
+causes Vim to fall back to reformat the text by using the internal formatter.
+
+However, if the |gq| command is used to reformat the text, the function
+will receive the selected lines, trim trailing whitespace from those lines and
+put them back in place. If you are going to split single lines into multiple
+lines, be careful not to overwrite anything.
+
+If you want to allow reformatting of text from insert or replace mode, one has
+to be very careful, because the function might be called recursively. For
+debugging it helps to set the 'debug' option.
+
+ *right-justify*
There is no command in Vim to right justify text. You can do it with
an external command, like "par" (e.g.: "!}par" to format until the end of the
paragraph) or set 'formatprg' to "par".


> Fixing the problems in Insert mode is a different issue.

Another inconsistency: The script will be called for every (normal)
typed character that is typed in insert mode (when beyond the textwidth
limit) but not when pressing enter. I am just mentioning it. It seems so
seldomly used, that I think it might be enough to document that there
might still be bugs and discourage using it.

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.

vim-xml-ftplugin vs. formatoptions

I've noticed that formatoptions+=c and a suitable textwidth value has no
effect with xml/xslt filetypes, and found this in
$VIMRUNTIME/autoload/xmlformat.vim:

func! xmlformat#Format()
" only allow reformatting through the gq command
" (e.g. Vim is in normal mode)
if mode() != 'n'
" do not fall back to internal formatting
return 0
endif
[...]

This is as shipped with 8.1.998, although the upstream version appears to
be identical at the moment. Kind of surprised at that -- is there some
underlying reason to disable auto formatting for XML filetypes?

Removing that mode() test definitely causes problems, figured I'd ask here
before digging any further...

-Rob

--
--
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: Starting Neovim: notedown executable is required in order for this software to work. ...

... for being out of topic, the answer came quick, and solved the problem.

😇👍

Thanks very much. 

Christian Brabandt <cblists@256bit.org> schrieb am Di., 26. März 2019, 10:10:
Hi,
I am not sure, if you are not off topic here with Neovim problems.
Nevertheless I try to give you some hints.

On Di, 26 Mär 2019, Jo Tasmo wrote:

> When starting Neovim in a Terminal, it gives out:
>
> ```
> notedown executable is required in order for this software to work. Check whether you have needed dependencies installed in README.md

Have you installed any external plugins that requires notedown?
Could it be this:
https://github.com/szymonmaszke/vimpyter

Note it requires notedown to be installed:
https://github.com/aaren/notedown

> Also the permissions by ``` :w ``` don't work proper.
> Ether I have to force with ``` :w! ``` ,or even nothing works.

Not sure what you mean with doesn't work.
I suspect this should be filed with more details at:
https://github.com/neovim/neovim/issues/

Please be more verbose when filing a bug:
Do you get an error message? What exactly do you expect the permissions
to be? How to reproduce this?

Best,
Christian
--
Tätig ist man immer mit einen gewissen Lärm. Wirken geht in der Stille
vor sich.
                -- Peter Bamm

--
--
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/C7WYnGk2p70/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: Starting Neovim: notedown executable is required in order for this software to work. ...

Hi,
I am not sure, if you are not off topic here with Neovim problems.
Nevertheless I try to give you some hints.

On Di, 26 Mär 2019, Jo Tasmo wrote:

> When starting Neovim in a Terminal, it gives out:
>
> ```
> notedown executable is required in order for this software to work. Check whether you have needed dependencies installed in README.md

Have you installed any external plugins that requires notedown?
Could it be this:
https://github.com/szymonmaszke/vimpyter

Note it requires notedown to be installed:
https://github.com/aaren/notedown

> Also the permissions by ``` :w ``` don't work proper.
> Ether I have to force with ``` :w! ``` ,or even nothing works.

Not sure what you mean with doesn't work.
I suspect this should be filed with more details at:
https://github.com/neovim/neovim/issues/

Please be more verbose when filing a bug:
Do you get an error message? What exactly do you expect the permissions
to be? How to reproduce this?

Best,
Christian
--
Tätig ist man immer mit einen gewissen Lärm. Wirken geht in der Stille
vor sich.
-- Peter Bamm

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

Starting Neovim: notedown executable is required in order for this software to work. ...

Hi everyone,

When starting Neovim in a Terminal, it gives out:

```
notedown executable is required in order for this software to work. Check whether you have needed dependencies installed in README.md

```

Also the permissions by ``` :w ``` don't work proper.
Ether I have to force with ``` :w! ``` ,or even nothing works.

I run Neovim 0.3.4 lubuntu_18.0.2_bionic. But I tried also Neovim 2.0.0 already, with the same problem.

I read the README.md on https://github.com/neovim/neovim. Or which README.md could by ment? Whithout getting any hint.

I don't understand, and can't find anything about a
»notedown executable«.

So far my problem with Neovim.


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.

Monday, March 25, 2019

Re: v8.1 indentation change?

> On Monday, 25 March 2019 10:40:49 UTC, Keith wrote:
> > > On Thursday, 21 March 2019 13:55:34 UTC, Paul wrote:
> > > > On Tue, Mar 19, 2019 at 05:24:33AM -0700, Keith wrote:
> > > > >If I have a line that starts, say, one tab in, and then insert a '#' char in col 1, in v8.0 that would be that, but in v8.1, the '#' char gets auto-indented to one tab in, and the remainder of the line is shifted over accordingly.
> > > >
> > > > Could this be a plugin interfering? I can't reproduce it here.
> >
> > I found it in the end by installing v8.0 elsewhere and comparing the 'indent.vim' files. The old one had this near the top:
> >
> > " Don't reindent comments on first column
> > if cline =~ '^#.'
> > return 0
> > endif
> >
> > No idea why that was removed, but putting it back works just fine :)
>
> My bad - it was the 'perl.vim' file in the 'indent' folder.

It looks like this was intentionally removed. Perhaps a matter of taste
how comments are indented?

--
hundred-and-one symptoms of being an internet addict:
118. You are on a first-name basis with your ISP's staff.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

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

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

Re: vim buffer viewport changed

Replying to self one further time.

For anyone interested I went with a timer-based approach for now

let s:timer = timer_start(100, function('s:updateViewport'), {'repeat': -1})
au CursorMoved,CursorMovedI * call s:updateViewport(0)

with updateViewport defined as follows:

https://github.com/myitcv/govim/blob/87595cdf02ece5531d739e080b696d4847c387fc/plugin/govim.vim#L51-L73

This way, only deltas in the viewport are announced to my plugin.

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

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

Re: v8.1 indentation change?

On Monday, 25 March 2019 10:40:49 UTC, Keith wrote:
> > On Thursday, 21 March 2019 13:55:34 UTC, Paul wrote:
> > > On Tue, Mar 19, 2019 at 05:24:33AM -0700, Keith wrote:
> > > >If I have a line that starts, say, one tab in, and then insert a '#' char in col 1, in v8.0 that would be that, but in v8.1, the '#' char gets auto-indented to one tab in, and the remainder of the line is shifted over accordingly.
> > >
> > > Could this be a plugin interfering? I can't reproduce it here.
>
> I found it in the end by installing v8.0 elsewhere and comparing the 'indent.vim' files. The old one had this near the top:
>
> " Don't reindent comments on first column
> if cline =~ '^#.'
> return 0
> endif
>
> No idea why that was removed, but putting it back works just fine :)

My bad - it was the 'perl.vim' file in the 'indent' folder.

--
--
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: v8.1 indentation change?

> On Thursday, 21 March 2019 13:55:34 UTC, Paul wrote:
> > On Tue, Mar 19, 2019 at 05:24:33AM -0700, Keith wrote:
> > >If I have a line that starts, say, one tab in, and then insert a '#' char in col 1, in v8.0 that would be that, but in v8.1, the '#' char gets auto-indented to one tab in, and the remainder of the line is shifted over accordingly.
> >
> > Could this be a plugin interfering? I can't reproduce it here.

I found it in the end by installing v8.0 elsewhere and comparing the 'indent.vim' files. The old one had this near the top:

" Don't reindent comments on first column
if cline =~ '^#.'
return 0
endif

No idea why that was removed, but putting it back works just fine :)

--
--
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 23, 2019

Vim plugin with Python3

Hi i am really stuck with making my vim plugin work with python 3 module. I am new to vim and only examples i can find all related to python 2. Anyone who can share with me a working example of vim plugin with python 3 where python three module resides in different directory and a function need to be call in Vim plugin from that py module.

will be much obliged

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

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

Friday, March 22, 2019

How can I execute ex command between two vim windows (split) ?

Hi all,

I'm editing two different files with vim using the :split command
While I'm editing file2, I would like to move line 10 of file1 to the current line position of file2.
Do you know how I could achieve this with an ex command ??

Thanks a lot :)

--
--
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 execute exc ommand (copy, move etc...) between different vim windows (split) ?

Hi all,

I'm editing two different files with vim using the :split command
While I'm editing file2, I would like to move line 10 of file1 to the current line position of file2.
Do you know how I could achieve this with an ex command ??

Thanks a lot :)

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

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

Thursday, March 21, 2019

Re: How to keep the cursorline consistent in vim diff?

On Do, 21 Mär 2019, DwigtArmyOfChampions wrote:

> It probably was Vim airline, but I'm not skilled enough to know for sure.

I doubt it. vim-airline does only provide a statusline, it doesn't know
about cursorline.


Best,
Christian
--
Ist Weltfrieden ohne religiöse Abrüstung überhaupt möglich?
-- M.S. Salomon (eigentl. Michael Schmidt-Salomon)

--
--
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: Get highest Vim buffer number

On Thu, Mar 21, 2019 at 4:53 PM DwigtArmyOfChampions
<dwightarmyofchampions@hotmail.com> wrote:
>
> I have the following line in my vimrc file. This is for vimdiff:
>
> " dp will send middle pane changes to right pane and then immediately
> " update.
> nnoremap dp :diffput 3 <bar> :diffupdate<cr>
>
> However, this only works if I'm using vimdiff with three files. If I am diff'ing two files, then calling "diffput 3" gives an error message because there is no buffer #3. How do I change the 3 to "buffer of rightmost pane"? Or separate this command into two statements? Something like the following:
>
> If (two files are being compared) Then
> nnoremap dp :diffput 2 <bar> :diffupdate<cr>
>
> ElseIf (three files are being compared) Then
> nnoremap dp :diffput 3 <bar> :diffupdate<cr>
> End If

If you know the error number, you could call a function which would do
something like the following (replacing E123 by the actual error
number):

function s:DiffPut()
try
diffput 3
catch /^Vim\%((\a\+)\)\=:E123:/
diffput 2
endtry
diffupdate
endfunction
map dp call <SID>DiffPut()

see
:help try
and about two pages of scrolldown thereafter.

Note, however, that if you invoke the built-in help, every helpfile
you view will get its own buffer number. These files are
'nomodifiable' however, so you will get a different error number than
the one telling you you're trying to access a nonexistent buffer.

Best regards,
Tony.

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

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

Get highest Vim buffer number

I have the following line in my vimrc file. This is for vimdiff:

" dp will send middle pane changes to right pane and then immediately
" update.
nnoremap dp :diffput 3 <bar> :diffupdate<cr>

However, this only works if I'm using vimdiff with three files. If I am diff'ing two files, then calling "diffput 3" gives an error message because there is no buffer #3. How do I change the 3 to "buffer of rightmost pane"? Or separate this command into two statements? Something like the following:

If (two files are being compared) Then
nnoremap dp :diffput 2 <bar> :diffupdate<cr>

ElseIf (three files are being compared) Then
nnoremap dp :diffput 3 <bar> :diffupdate<cr>
End If

--
--
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 keep the cursorline consistent in vim diff?

On Thursday, March 21, 2019 at 9:45:21 AM UTC-4, Paul wrote:
> On Fri, Mar 15, 2019 at 09:20:12AM -0700, DwigtArmyOfChampions wrote:
> >I'm using vimdiff on a three-way diff. I first open Vim using the command "vimdiff file1.txt file2.txt file3.txt". I have set cursorline enabled and as I arrow down the cursor stays consistent through each of the three windows. But when I do a diffput on one of the buffers the cursorline is no longer consistent. The cursorline on buffer2 is lower than buffer3. How do I update refresh the page?
>
> I remember having this issue, but I can't remember how I overcame it. Have you eliminated any plugin as the cause?

It probably was Vim airline, but I'm not skilled enough to know for sure.

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

ex

I see that starting Vim as "ex -s", while 'compatible' is set, doesn't open an rc file (as per POSIX ex), but does load plugins. Is that intentional? Should it not be as POSIX like as possible so that one-liners (eg., "ex -s file <<< $'s/foo/bar\nw'") are as compatible and as lightweight as possible? If plugins were desired in this scenario, one would call it as "vim".

For scripted one-liners, sadly, "ed" is not as widespread as I'd like. "ex" is an alternative, but is inefficient and could have unexpected consequences if a user's Vim plugins are loaded.

--
--
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: v8.1 indentation change?

On Tue, Mar 19, 2019 at 05:24:33AM -0700, Keith wrote:
>If I have a line that starts, say, one tab in, and then insert a '#' char in col 1, in v8.0 that would be that, but in v8.1, the '#' char gets auto-indented to one tab in, and the remainder of the line is shifted over accordingly.

Could this be a plugin interfering? I can't reproduce it here.

--
--
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 keep the cursorline consistent in vim diff?

On Fri, Mar 15, 2019 at 09:20:12AM -0700, DwigtArmyOfChampions wrote:
>I'm using vimdiff on a three-way diff. I first open Vim using the command "vimdiff file1.txt file2.txt file3.txt". I have set cursorline enabled and as I arrow down the cursor stays consistent through each of the three windows. But when I do a diffput on one of the buffers the cursorline is no longer consistent. The cursorline on buffer2 is lower than buffer3. How do I update refresh the page?

I remember having this issue, but I can't remember how I overcame it. Have you eliminated any plugin as the cause?

--
--
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 19, 2019

Re: Font size change

In gvim the size and shape of the font is defined by the 'guifont'
setting, whose format varies depending on the GUI flavour gvim is
compiled for: Windows, GTK2/3, other-X11, etc., each use a different
format, see https://vim.wikia.com/wiki/Setting_the_font_in_the_GUI

In Vim running in a console terminal, there is _no_ Vim setting for
the font, it uses whatever the terminal is using, and how to set that
varies from one terminal to the other.

Best regards,
Tony.

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

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

Re: Font size change

> > > I am currently trying to change the font size of files being viewed using
> > > vim from the default ( 9) setting, can someone tell me where this is
> > > defined so I can up it to size 10/11 or 12.

in a graphical environment you can set the font and its size in your
.vimrc with `set guifont=Monospace\ 10` for Monospace size 10. it might
conflict or being overruled by the settings of your terminal emulator en
properly set in (eg.) .Xdefaults on BSD and Linux machines. otherwise
look for the font settings of your emulator -- probably right-click to
get a menu where you can change the font and its size.

in console it is set in a global manner, /etc/rc.conf in BSD.

//meine

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

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

v8.1 indentation change?

Hello,

I use vim in my work as a Perl developer, and since upgrading from v8.0 to v8.1 recently I'm noticing a small but slightly annoying change to the way that auto-indentation is working when I comment a line out.

If I have a line that starts, say, one tab in, and then insert a '#' char in col 1, in v8.0 that would be that, but in v8.1, the '#' char gets auto-indented to one tab in, and the remainder of the line is shifted over accordingly.

Does anyone have any handy tips on how to revert to the previous behaviour?

Thanks in advance!
k

--
--
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 18, 2019

Re: Font size change

> what is the VIM equivalent of the ".exrc" file

.vimrc

https://vim.fandom.com/wiki/Example_vimrc is just one of many examples a
search threw up.

--
--
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 buffer viewport changed

> But I'm struggling to find the right combination of events/whatever to fire when the visible part (viewport?) of a buffer changes. For example, as a result of a page down, normal mode G jumping to the end of the buffer, gg to go to the top, etc. I want to use such an event to call matchaddpos to highlight the now-visible part of the buffer (which keeps the number of calls to matchaddpos down).

Apologies - it seems I've been making a basic error in my use of winsaveview(); using that in combination with CusorMoved, CusorMovedI, winheight() and winwidth() gets me a lot of the way there.

The one remaining case I can't currently handle is when the size of a split changes: I need to somehow trigger the change in viewport for all buffers affected by, for example, moving the horizontal/vertical split point.

Again, any pointers much appreciated.

--
--
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 buffer viewport changed

Hi all,

I've searched high and low for answers to my question, but I'm probably using the wrong term/concept so please bear with me in what follows!

As a spare-time experiment, I've pulled together a proof-of-concept Go based host/driver for Vim8 channel-based plugins (the channel implementation works really well BTW):

https://github.com/myitcv/govim

I'm using that as the basis for a channel-based plugin to support Go development in Vim:

https://github.com/myitcv/govim/tree/master/cmd/govim

Part of my experiment involves looking into whether using Go's standard library parser and AST (https://godoc.org/go) in combination with matchaddpos is a more efficient/effective way of syntax highlighting *.go files (particularly large ones).

I have a proof of concept of this working, but what I'm now looking to do is make the approach more efficient.

I'm using the TextChanged and TextChangedI events to trigger a re-parse; no problems there.

But I'm struggling to find the right combination of events/whatever to fire when the visible part (viewport?) of a buffer changes. For example, as a result of a page down, normal mode G jumping to the end of the buffer, gg to go to the top, etc. I want to use such an event to call matchaddpos to highlight the now-visible part of the buffer (which keeps the number of calls to matchaddpos down).

My searching thus far hasn't turned up much. Am I simply using the wrong search terms?

Any help/pointers much appreciated; please ask if you anything above needs to be clarified.

Thanks,


Paul

--
--
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 keep the cursorline consistent in vim diff?

On Saturday, March 16, 2019 at 10:20:15 AM UTC-4, Bram Moolenaar wrote:

> I cannot reproduce the problem. Please give a step-by-step example.
> And what is your Vim version?
>

Vim 8.1. I was able to fix my issue by adding the following to my .vimrc:

" {{{ Vim Diff Options
if &diff

" Only have to use just the bracket keys to go to the next difference.
nnoremap ] ]c
nnoremap [ [c

" dp will send middle pane changes to right pane and then immediately
" update.
nnoremap dp :diffput 3 <bar> :diffupdate<cr>

" Make sure cursor is always in the middle.
set scrolloff=999
endif
" }}}

--
--
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: Font size change

On Thursday, September 20, 2007 at 5:51:31 AM UTC-5, Martin Krischik wrote:
> Hello,
>
> On 20 Sep., 12:19, Andrew.Bridge...@corusgroup.com wrote:
>
> > I am currently trying to change the font size of files being viewed using
> > vim from the default ( 9) setting, can someone tell me where this is
> > defined so I can up it to size 10/11 or 12.
>
> You can have a look at my font plugin:
>
> http://vim.sourceforge.net/scripts/script.php?script_id=1337
>
> Either to use it or to see how fonts are set with various operating
> systems. Multi OS is the most notable feature of the plug-in.
>
> Martin

Martin,

I tried your suggestion for changing the font size while in a VIM session and it worked. I'd like to have it done in the startup file.
In Unix's VI one would put the set options in the ".exrc" file that executed when VI was invoked. what is the VIM equivalent of the ".exrc" file and can I put the example you gave, "set guifont=Courier:h9:cANSI" in the VIM startup file?

Lambert

--
--
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 17, 2019

Change in Quickfix/Location list window buffer management

Hi all,

Patches 8.1.0877 and 8.1.1015 changed the way the quickfix/location list
window buffers are managed.

Before these patches, whenever the quickfix window is opened, a
quickfix buffer is created. When the quickfix window is closed, the
quickfix buffer is wiped out. This results in a new quickfix buffer
every time the quickfix window is closed and opened. The same applies
to the location list window.

Patch 8.1.0877 changed this behavior so that the quickfix buffer is
not wiped out, instead it is reused. A separate buffer is used for each
location list window. The location list buffer is wiped out when the
location list is deleted. When the quickfix/location list window is
closed, the buffer is unlisted. This change helps in minimizing the
churn in the buffer numbers.

Let me know if you see any issues with this change.

Thanks,
Yegappan

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

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

Re: vimdiff + wrap line alignment

> If I set wrap on for vimdiff (in all windows) and there is a wrapped
> line in one window long enough to wrap at least once more than the
> other window, the lines in the windows are no longer in alignment.
> For example, it would seem the "----" line in one window to match the
> other's new line is only as long as the window width and not as long
> as the other window's new line ??
> Anyone have any suggestion for keeping file lines aligned with wrap on
> in vimdiff ?

This is not supported.

Implementing this would require quite a few changes to the code,
implementing filler lines to keep the windows in sync. It's also not
going to look good.

--
"Thou shalt not follow the Null Pointer, for at its end Chaos and
Madness lie."

/// 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: Keeping endofline representation in xml fileformat dos file

Le samedi 16 mars 2019 00:05:26 UTC+1, Christian Brabandt a écrit :
> On Fr, 15 Mär 2019, nivaemail@gmail.com wrote:
>
> > Fails because I don't see mixed end of lines.
>
> If you don't see mixed end of lines, chances are that your Vim is
> handling it correctly. Simply write the file in the fileformat that you
> need (using the +ff=unix or ++ff=dos argument.
>
> Else, please provide a complete example of what works, what you expect
> and what did not work.
>
> Best,
> Christian
> --
> Frauen möchten ohne warum und wofür geliebt werden. Nicht weil sie
> hübsch, liebenswert, wohlerzogen, anmutig oder intelligent sind,
> sondern einfach nur weil sie sie selbst sind.
> -- Henri Frédéric Amiel


In order to keep mixed line endings and get all lines in jsut One Inline as opened, here is a steps I wrote:

In register @o is the initial line foobar^Mbar^M^Mfoo^Mbarbarfoofoo


" (1) make it a Dos file
let s:tmpfile = tempname()
sp | exe 'e +ff=dos '.s:tmpfile

" further editing
put=@o

%s/^M/^M/g
w! | bw! " save it


" (2) make it a Unix file
sp | exe 'e +ff=dos '.s:tmpfile
setlocal ff=unix

" further editing
set ft=vb
norm gg=G
w! | bw! " save it

" (3) keep mixed line endings
sp | exe 'e +ff=dos '.s:tmpfile
" further editing
set ft=vb
w! " save it

and then before replacing initial line by modified line

" (4) paste modified line in place of original line
1,1d

" reload
Chars inline
1,$-1s/$/\^M/
%j
%s/^M /\^M/g

" copy the only inline with mixed endings and ^M appearing
norm ^v$hy

" return to original buffer at prev saved cursor pos
wincmd p
call setpos('.', s:cursorpos)


" inject modified inline with mixed endings ^M appearing.
norm f"p
norm lvt"d
norm ^


Best Regards
NiVa

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

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

Saturday, March 16, 2019

vimdiff + wrap line alignment

Hi,

If I set wrap on for vimdiff (in all windows) and there is a wrapped line in one window long enough to wrap at least once more than the other window, the lines in the windows are no longer in alignment. For example, it would seem the "----" line in one window to match the other's new line is only as long as the window width and not as long as the other window's new line ??
Anyone have any suggestion for keeping file lines aligned with wrap on in vimdiff ?

thx as always for everything vim.
-m

--
--
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 keep the cursorline consistent in vim diff?

> I'm using vimdiff on a three-way diff. I first open Vim using the
> command "vimdiff file1.txt file2.txt file3.txt". I have set cursorline
> enabled and as I arrow down the cursor stays consistent through each
> of the three windows. But when I do a diffput on one of the buffers
> the cursorline is no longer consistent. The cursorline on buffer2 is
> lower than buffer3. How do I update refresh the page?

I cannot reproduce the problem. Please give a step-by-step example.
And what is your Vim version?

--
Time is money. Especially if you make clocks.

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

Friday, March 15, 2019

Re: Keeping endofline representation in xml fileformat dos file

On Fr, 15 Mär 2019, nivaemail@gmail.com wrote:

> Fails because I don't see mixed end of lines.

If you don't see mixed end of lines, chances are that your Vim is
handling it correctly. Simply write the file in the fileformat that you
need (using the +ff=unix or ++ff=dos argument.

Else, please provide a complete example of what works, what you expect
and what did not work.

Best,
Christian
--
Frauen möchten ohne warum und wofür geliebt werden. Nicht weil sie
hübsch, liebenswert, wohlerzogen, anmutig oder intelligent sind,
sondern einfach nur weil sie sie selbst sind.
-- Henri Frédéric Amiel

--
--
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: Keeping endofline representation in xml fileformat dos file

On Fr, 15 Mär 2019, Bailey Stoner wrote:

> Other people are here. It's not just you two. Some people like
> screenshots. They aren't hurting anyone. I can reproduce this issue

Are you saying netiquette is not needed anymore? Sending additional data
with your mail to this list will be multiplied to thousands of people
and may cause a bandwidth issue to those that intentionally only use
text mail. This might actually be common when reading mail on a mobile
phone over a gsm network. If you must include such things, send a link
to a web site such as imgur.

> with a brand new, unconfigured copy of Vim and an XML file easily
> based solely on the description.

That's why I used the `--clean` parameter. So it should work everywhere
without a custom config file.

> Complaining about screenshots isn't helping anyone. This person
> provided significant information for people who are in a console AND
> people who use a GUI, which is ideal.

See above. There is a reason the netiquette exists. Also top posting
might not be considered polite. This is actually mentioned in the
signature of every mail. So please reconsider.

Best,
Christian
--
Wie wollte einer als Meister in seinem Fach erscheinen, wenn er
nichts Unnützes lehrte!
-- Goethe, Maximen und Reflektionen, Nr. 901

--
--
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: Keeping endofline representation in xml fileformat dos file

Le vendredi 15 mars 2019 19:06:38 UTC+1, Brandon Stoner a écrit :
> Other people are here. It's not just you two. Some people like screenshots. They aren't hurting anyone. I can reproduce this issue with a brand new, unconfigured copy of Vim and an XML file easily based solely on the description.
>
>
>
> Complaining about screenshots isn't helping anyone. This person provided significant information for people who are in a console AND people who use a GUI, which is ideal.
>
>
>
>
>
> Mar 15, 2019, 9:57 AM by cbl...@256bit.org:
>
>
>
> On Fr, 15 Mär 2019, niva...@gmail.com wrote:
>
> It was not a screenshot but a gif animation and Sample file was
>
> attached on first post.
>
>
>
> Here it is.
>
>
>
> Please don't send screenshots or screen captures. Since I am reading my
>
> mails on the console, this is pretty useless to me.
>
>
>
> It looks like you are looking for a tool like dos2unix.
>
>
>
> Alternatively, i can successfully convert the file using
>
>
>
> vim --clean -c ':wq! ++ff=unix' sample.xml
>
>
>
> Best,
>
> Christian
>
> --
>
> Ich will nichts mit den Nieren wagen
>
> solang' daran die Viren nagen.
>
>
>
> --
>
> --
>
> 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+u...@googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Hi All,
I've tried to implement Andy's answer into my existing script that is doing :

A/ extracting the mixed line from original file.
B/ put it into new tmpfile and doing the Three Steps of Andy
C/ trying to reinject after B/ Steps, the content of tmpfile into original file at same line, in state of existing mixed line.

Fails because I don't see mixed end of lines.

Thank you all. Embedded mixed scripts are more and more used by these days and would be powerful to manage them easily.

Thank you for your kindness :)
NiVa


This is the vimscript function:

fun! EditScript(cword,line) "{{{

if a:cword=='VALUE'

" save cursor pos
" let @c = getcurpos()
let s:cursorpos = getcurpos()

let g:lineline = getline(line('.'))
if stridx(g:lineline,'scriptparsetext')>-1
\ || stridx(g:lineline,'script')>-1

let pattern='.*VALUE="\([^"]\+\)".*'
let @o = DecodeHtmlEntities(substitute(g:lineline, pattern, '\=submatch(1)', ""))

" extract vbscript of a mixed file https://groups.google.com/forum/#!topic/vim_use/yvObbttLY6g
"
" (1) make it a Dos file
let s:tmpfile = tempname()
sp | exe 'e +ff=dos '.s:tmpfile

" further editing
put=@o

%s/
/
/g

w! | bw! " save it


" (2) make it a Unix file
sp | exe 'e +ff=dos '.s:tmpfile
setlocal ff=unix

" further editing
set ft=vb
norm gg=G

w! | bw! " save it

" (3) keep mixed line endings
sp | exe 'e +ff=dos '.s:tmpfile
" further editing
set ft=vb

w! " save it

" mappings
map <2-LeftMouse> :exe 'silent! call EncodeScript()'<CR>
map <C-RightMouse> :exe 'silent! call ReInjectScript()'<CR>
map <C-MiddleMouse> :exe 'silent! call KeepMixedLineEndings()'<CR>

else

echomsg 'no entering code'

endif
else

echomsg 'no entering code 2'

endif

endfunction "}}}




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

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

Re: Keeping endofline representation in xml fileformat dos file

Other people are here. It's not just you two. Some people like screenshots. They aren't hurting anyone. I can reproduce this issue with a brand new, unconfigured copy of Vim and an XML file easily based solely on the description.

Complaining about screenshots isn't helping anyone. This person provided significant information for people who are in a console AND people who use a GUI, which is ideal.


Mar 15, 2019, 9:57 AM by cblists@256bit.org:

On Fr, 15 Mär 2019, nivaemail@gmail.com wrote:
It was not a screenshot but a gif animation and Sample file was
attached on first post.

Here it is.

Please don't send screenshots or screen captures. Since I am reading my
mails on the console, this is pretty useless to me.

It looks like you are looking for a tool like dos2unix.

Alternatively, i can successfully convert the file using

vim --clean -c ':wq! ++ff=unix' sample.xml

Best,
Christian
--
Ich will nichts mit den Nieren wagen
solang' daran die Viren nagen.

--
--
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: Keeping endofline representation in xml fileformat dos file

Am 14.03.2019 um 21:21 schrieb nivaemail@gmail.com:
> Hi All,
>
>
> I'm wokring on that kind of files'content, initially configured with ff=dos, ffs=unix,dos
>
> <?xml version="1.0" encoding="utf-8"?>
> <PROP ID="script" VALUE="&apos; Init properties
> Option Explicit
>
> Dim varName1, vaName2
> Dim nameOfBar
> &apos; array creation of components
> fnameOfBar = split(Parent.somefoobar, &quot;|&quot;)
> "/>
>
>
> 1/ Instead of the whole content up above, I see only one line with ^M in place of endline CR LF.
>
>
> 2/ Copying this inline containing ^M in new buffer opened with setlocal ffs=unix, I do this substitution %s/^M/^M/g
>
> Then I see all content in different lines.
>
>
> 3/ After editing the script, I would like to restitute the modified content into original file in one line : all content inline with end of line replaced by ^M. As at the origin.
>
> But all attempts fails, even these that say to pass by changing ffs at opening time and writing time.
>
> https://stackoverflow.com/questions/3852868/how-to-make-vim-show-m-and-substitute-it
> https://superuser.com/questions/357760/vi-on-linux-show-m-line-endings-for-dos-format-files
>
>
> Is someone can give me right way to restitute the text content inline containing ^M displayed.
>
> Thank you
> NiVa

Given a file.xml with mixed file endings.

You want to
(1) make it a DOS file:
:e ++ff=dos file.xml
" ... further edits ...
:w
(2) make it a Unix file:
:e ++ff=dos file.xml
:setl ff=unix
" ... further edits ...
:w
(3) keep mixed line endings:
:e file.xml
" ... further edits ...
:w

--
Andy

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

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

Re: Keeping endofline representation in xml fileformat dos file

On Fr, 15 Mär 2019, nivaemail@gmail.com wrote:

> It was not a screenshot but a gif animation and Sample file was
> attached on first post.
>
> Here it is.

Please don't send screenshots or screen captures. Since I am reading my
mails on the console, this is pretty useless to me.

It looks like you are looking for a tool like dos2unix.

Alternatively, i can successfully convert the file using

vim --clean -c ':wq! ++ff=unix' sample.xml

Best,
Christian
--
Ich will nichts mit den Nieren wagen
solang' daran die Viren nagen.

--
--
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 keep the cursorline consistent in vim diff?

I'm using vimdiff on a three-way diff. I first open Vim using the command "vimdiff file1.txt file2.txt file3.txt". I have set cursorline enabled and as I arrow down the cursor stays consistent through each of the three windows. But when I do a diffput on one of the buffers the cursorline is no longer consistent. The cursorline on buffer2 is lower than buffer3. How do I update refresh the page?

--
--
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: Keeping endofline representation in xml fileformat dos file

Le vendredi 15 mars 2019 16:52:12 UTC+1, Christian Brabandt a écrit :
> On Fr, 15 Mär 2019, nivaemail@gmail.com wrote:
>
> > Do you want another sample ?
>
> I don't see a sample. And please do not send screenshots.
>
> Christian
> --
> Allein ist der Zustand, in dem sich jeder Nachdenkliche befindet.
> -- Helmar Nahr

It was not a screenshot but a gif animation and Sample file was attached on first post.

Here it is.

--
--
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: Keeping endofline representation in xml fileformat dos file

On Fr, 15 Mär 2019, nivaemail@gmail.com wrote:

> Do you want another sample ?

I don't see a sample. And please do not send screenshots.

Christian
--
Allein ist der Zustand, in dem sich jeder Nachdenkliche befindet.
-- Helmar Nahr

--
--
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: Keeping endofline representation in xml fileformat dos file

Le vendredi 15 mars 2019 14:50:35 UTC+1, niva...@gmail.com a écrit :
> Le vendredi 15 mars 2019 10:46:51 UTC+1, Christian Brabandt a écrit :
> > On Do, 14 Mär 2019, nivaemail@gmail.com wrote:
> >
> > > Hi All,
> > >
> > >
> > > I'm wokring on that kind of files'content, initially configured with ff=dos, ffs=unix,dos
> > >
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <PROP ID="script" VALUE="&apos; Init properties
> > > Option Explicit
> > >
> > > Dim varName1, vaName2
> > > Dim nameOfBar
> > > &apos; array creation of components
> > > fnameOfBar = split(Parent.somefoobar, &quot;|&quot;)
> > > "/>
> > >
> > >
> > > 1/ Instead of the whole content up above, I see only one line with ^M in place of endline CR LF.
> > >
> > >
> > > 2/ Copying this inline containing ^M in new buffer opened with setlocal ffs=unix, I do this substitution %s/^M/^M/g
> > >
> > > Then I see all content in different lines.
> > >
> > >
> > > 3/ After editing the script, I would like to restitute the modified content into original file in one line : all content inline with end of line replaced by ^M. As at the origin.
> > >
> > > But all attempts fails, even these that say to pass by changing ffs at opening time and writing time.
> > >
> > > https://stackoverflow.com/questions/3852868/how-to-make-vim-show-m-and-substitute-it
> > > https://superuser.com/questions/357760/vi-on-linux-show-m-line-endings-for-dos-format-files
> > >
> > >
> > > Is someone can give me right way to restitute the text content inline containing ^M displayed.
> >
> > Can you provide an example file?
> >
> >
> > Best,
> > Christian
> > --
> > Es ist nicht genug, der Natur die Daumenschrauben anzulegen.
> > Man muß auch hinhören, wenn sie aussagt.
> > -- Arthur Schopenhauer
>
> When I download attached file sample.xml, Vim open it in fileformat=dos and display ^M chars..
>
> Do you want another sample ?

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