"iabbrev" erratic behaviour

2024-02-19 Thread 'Ottavio Caruso' via vim_use
Hi,

I have this is in my .vimrc:

iabbrev mdate =strftime("%a %d/%m/%Y")


It used to work fine, but as of recently (3 or 4 weeks or so), this
abbreviation only works if it is the first thing that I input on any
file. If I edit a file, type some characters and then I type "mdate",
it doesn't get expanded. I have to save and exit the file, then
re-open it and then type "mdate".

Is there a way to troubleshoot that?

-- 
Ottavio Caruso

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHxMZRcW93dG5SyKaWpq6cwUDMjfwyc68tZNK7%2BjkscOqg%40mail.gmail.com.


How to make gvim/vim-gtk3 behave exactly like vim

2024-01-19 Thread 'Ottavio Caruso' via vim_use
I have installed and uninstalled gvim many times. I have to re learn
some (many) keyboard combinations. Is there a safe way to mod gvim to
make it behave exactly like vim on the terminal?

-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHx%2BtP725CGmhJAJWahjXHk4P1FsAndyeE7MO8Bn1MrTVQ%40mail.gmail.com.


Yanking doesn't yank

2023-01-12 Thread 'Ottavio Caruso' via vim_use
[Originally sent through Gmane.io; apologies for possible duplicates]


I've been using Vim for almost 4 years now and I haven't got it right yet.

I have a block of text (say, 10 lines) that I want to copy from
somewhere to somewhere else.

I put the cursor on the first line, press capital v (shift + v); this
will highlight the line; then press down arrow until I have selected the
whole block. So far so good.

Then I press 'y'. If then I move the cursor down, it will still continue
to highlight the following text, which is not what I want.

As a workaround, after selecting text, I press 'd', then 'p' to but it
back where it was and then move down and press 'p' again.

I wonder why it will keep on selecting text after pressing 'y'.

I'm missing something obvious here.

My .vimrc.

$ cat .vim/vimrc
source $VIMRUNTIME/defaults.vim

"set shellcmdflag=-ic
set dir=~/.vim/tmp
set expandtab
set autoindent
set mouse=r

digraph bl 8226 " Insert Bullet with +k bl


iabbrev cwd =strftime("%a %d/%m %H:%M")
iabbrev mydate =strftime("%a %d/%m/%Y")
iabbrev mydate2  =strftime("%Y%m%d")

map  :1m$


--
Ottavio Caruso

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHy8zJ8-kUiaYXKwW5%3D1Q06hzeor4Gu299VS-WW1nP26eQ%40mail.gmail.com.


Dump vi/nvi help pages, was: Dump [Vim] help pages

2021-04-13 Thread 'Ottavio Caruso' via vim_use
On Tue, 13 Apr 2021 at 08:51, Christian Brabandt  wrote:
>
>
> On Mo, 12 Apr 2021, Julius Hamilton wrote:
>
> > Is there any way to output the content of the Vim help pages to a text 
> > file, with some sort of dump or output command?
>
> The help pages are text files, you don't need to dump them, you can
> :e $VIMRUNTIME/doc/options.txt
> to read the options help page.
>

I wonder if you all could be so kind and forgive my hijack attempt and
ask you if this is also possible with good ol' fashioned vi/nvi?

I would like to dump the output of :viu and :exu to to a file. I've
looked into these directories but I couldn't find anything:

$ find /usr/pkg/share/vi/
/usr/pkg/share/vi/
/usr/pkg/share/vi/tcl
/usr/pkg/share/vi/tcl/mailprocs.tcl
/usr/pkg/share/vi/tcl/gnats.tcl
/usr/pkg/share/vi/tcl/errors.tcl
/usr/pkg/share/vi/tcl/wc.tcl
/usr/pkg/share/vi/perl
/usr/pkg/share/vi/perl/tk.pl
/usr/pkg/share/vi/perl/wc.pl
/usr/pkg/share/vi/perl/make.pl
/usr/pkg/share/vi/perl/forall.pl
/usr/pkg/share/vi/catalog
/usr/pkg/share/vi/catalog/english
/usr/pkg/share/vi/catalog/dutch
/usr/pkg/share/vi/catalog/swedish
/usr/pkg/share/vi/catalog/ru_SU.KOI8-R
/usr/pkg/share/vi/catalog/spanish
/usr/pkg/share/vi/catalog/german
/usr/pkg/share/vi/catalog/french
/usr/pkg/share/vi/recover


-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHx2owjuokbyPi9LsKL1J5DUpPVHyCbgxAOQDoJWZpPy7w%40mail.gmail.com.


Re: Less verbose way of listing files to recover?

2021-02-21 Thread 'Ottavio Caruso' via vim_use
On Fri, 19 Feb 2021 at 18:11, Ottavio Caruso
 wrote:
> $ nvi -r
> vi: no files to recover.
>
> $ vim -r
> Swap files found:
> In directory ~/.vim/tmp:
>-- none --
>
>
> Is there a way to make vim behave like nvi, that is, give a less verbose
> message natively, without, e.g., using a shell script?


I know it's rude but... bump! Anyone?


-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHwdgjUrRpE9%2BsunzM6Xja_qiOa1PnOn8wN4XGOfy95bRA%40mail.gmail.com.


Less verbose way of listing files to recover?

2021-02-19 Thread 'Ottavio Caruso' via vim_use
[Not sure if you have received this message already. Apologies if it
is a duplicate]


Hi,


$ nvi -r
vi: no files to recover.

$ vim -r
Swap files found:
In directory ~/.vim/tmp:
   -- none --


Is there a way to make vim behave like nvi, that is, give a less verbose
message natively, without, e.g., using a shell script?

Thanks.

-- 
Ottavio Caruso

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHw3xQbQHrLVbW_1isvon4DwF874xRMw2tf8haqOcMJeVQ%40mail.gmail.com.


Re: Happy birthday!

2020-11-06 Thread 'Ottavio Caruso' via vim_use
On Thu, 5 Nov 2020 at 23:12, Jerry Peek at sites4people.com
 wrote:

> I put together two chapters about vi in "UNIX Power Tools", in 1990 or so, 
> when I worked for O'Reilly.
[...]
>, I see that the 8th Edition of O'Reilly's "Learning the vi & Vim Editors"

Two solid books! Thanks Jerry. And thanks Bram for your baby Vim!

(I also use nvi, which is still a solid editor)

-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHyspyXA3%3DZ5ka0EDQjujtZFNpAnW5C3nDDo8f3rUb0i9g%40mail.gmail.com.


Re: Yahoogroups is closing down

2020-10-14 Thread 'Ottavio Caruso' via vim_use
On Wed, 14 Oct 2020 at 08:37, Christian Brabandt  wrote:
>
> Hi,
> not sure if you have noticed this (or even still uses it), but Yahoo
> announced, that the Yahoogroups will be shutdown on Dec 15th, 2020.
>
> https://uk.help.yahoo.com/kb/groups/SLN35505.html
>
> If I understand the implications correctly, this means the mailinglist
> archive before the move to Google Groups will be lost.
>

I don't know what can be done fo the past, but, for the future, this
is a reminder that Google can do the same in the future with Google
Groups. Maybe moving all discussions to the good old Usenet?

-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHyz55gpLj3w%3D6wR3820Cbcw-p2smoFARzhGCsWgvOV7JA%40mail.gmail.com.


Re: Real laws, yet funny (For Bram's, or anyone's, collection of signature quotes)

2020-09-22 Thread 'Ottavio Caruso' via vim_use
‪On Tue, 22 Sep 2020 at 07:40, 'caveman رجل الكهف' via vim_use
 wrote:‬
>
> ‐‐‐ Original Message ‐‐‐
> On Monday, September 21, 2020 7:01 PM, Tony Mechelynck 
>  wrote:
>
> > Since March 2007, it is a real standing law in the US state of
> > Arkansas (whose name is to be pronounced as "Arkansaw"), that the
> > "possessive" (i.e. genitive) form of the state's name must be written
> > «Arkansas's» and not «Arkansas'». (I'm using French quotes to
> > emphasize the difference with the apostrophe).
>
> in case we have some arkansas officials here in
> the list, i'd like to share a suggestion for free,
> tax exempt:
>
> i think the simplest solution is to actually
> rename the state into "Arkansa".  this way they
> can the apostrophe at will however they please,
> like "Arkansa's".
>
>
> even better, rename it to just "Arkan".
>
>
> information theoretically there are like 50 states
> right?  so technically we just need:
>
> ceil(log2(50)) = 6 bits only
>
> so clearly "Arkansas", being 64 bits is way an
> over kill.
>
> while at it, let's also rename massachusetts, and
> other wrong names.

As we've all gone in full off-topic mode, isn't it the case in the US
of A that individual states can also determine their own official
language? I must have read somewhere that one state (which ?) ruled
that its own language should be "American" and not "English", in which
case they are free to make up their own spelling rules.

The real issue here is how one would import the Arkansas's spell
checker into Vim.

-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHw-EB%2BnG-%3DzCL3NH7OyH8cyLPf8Pvdj0uLBvg2zVWjMzw%40mail.gmail.com.


Re: Real laws, yet funny (For Bram's, or anyone's, collection of signature quotes)

2020-09-21 Thread 'Ottavio Caruso' via vim_use
On Mon, 21 Sep 2020 at 16:01, Tony Mechelynck
 wrote:
>
> Since March 2007, it is a real standing law in the US state of
> Arkansas (whose name is to be pronounced as "Arkansaw"), that the
> "possessive" (i.e. genitive) form of the state's name must be written
> «Arkansas's» and not «Arkansas'». (I'm using French quotes to
> emphasize the difference with the apostrophe).

I am not a native speaker of English, but I think it is correct (and
obvious) that the Saxon genitive of Arkansas is Arkansas's and not
Arkansas'. The latter is only reserved for plural nouns ("my friends'
party", "my parents' house," but "James's car", Charles's book).

Or maybe I've missed the point.

-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHybFxDStiR4fd9RO5YqTWLyBqJML8Ak5H0KQGmAPrupsA%40mail.gmail.com.


Re: Backup files and long filenames

2020-09-17 Thread 'Ottavio Caruso' via vim_use
On Thu, 17 Sep 2020 at 08:57, A. Wik  wrote:
>
> Hi all,
>
> I've noticed that Vim does not, when running in plain DOS, find the backup 
> files it created with long filenames when running under Win98.
>
> Is there a solution?

Probably not, because Win98 and Dos (which version?) use two different
implementations of FAT.


-- 
Ottavio Caruso

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHzKReaLyM1aPRWjCjSXUbkREPMjkAxtvqF-cTc_vFx23Q%40mail.gmail.com.


Re: Meta: How to read this forum/board now that Google Groups is busted

2020-09-08 Thread 'Ottavio Caruso' via vim_use
On Tue, 8 Sep 2020 at 02:30, Tony Mechelynck
 wrote:
>
> FWIW, it is still possible to revert (for the time being) to the
> former look & feel. I think it involves a rolldown widget near top
> right of the Google Groups page, but now that I've made the changeback
> and that it works (for me) I don't want to break it by going even
> temporarily to the new style.

I still don't get it. Why not use email instead?


-- 
Ottavio Caruso

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHwLAiOc9ReB3nx0sSZfKxdv7gTi2nkeH6dCtdsg9XswMA%40mail.gmail.com.


Re: Meta: How to read this forum/board now that Google Groups is busted

2020-08-22 Thread 'Ottavio Caruso' via vim_use
On Sat, 22 Aug 2020 at 22:40, Eric Weir  wrote:
>
> 
>
> On Aug 22, 2020, at 1:25 PM, 'Ottavio Caruso' via vim_use 
>  wrote:
>
> On Sat, 22 Aug 2020 at 18:02, 'J S' via vim_use
>  wrote:
>
>
> Are there any alternatives for reading this forum?
>
>
> Can you not read it in a mail client, like most of us do?
>
> P.S.  Be sure to CC to my email any response on this thread, as (obviously) I 
> won't otherwise be able to read them.
>
>
> Which one? I can't see it. (EDIT: I had to wade into the headers to find it).

No, I meant which email address. The google forum interface strips the
OP's email address and replaces it with a custom email address. But
it's visible in the headers.

-- 
Ottavio Caruso

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHy2bzjX%2BXoUN%3DZpJ_J93Xy7dy9a%2BEZsVCtvoS%3Des7VhWw%40mail.gmail.com.


Re: Meta: How to read this forum/board now that Google Groups is busted

2020-08-22 Thread 'Ottavio Caruso' via vim_use
On Sat, 22 Aug 2020 at 18:37, Richard Mitchell  wrote:
>
> Most, really?

A quick loot at posters' email reveals most don't use gmail; I assume
they check their emails in an email client, as you do.

Maybe time to move this mailing list away from Google Groups?

And, as per list footer:

> Do not top-post! Type your reply below the text you are replying to.


-- 
Ottavio Caruso

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHxoagD9y906gRbO-NVR29S9_B_BnZFFBT53N_3h%3Dy7tXw%40mail.gmail.com.


Re: Meta: How to read this forum/board now that Google Groups is busted

2020-08-22 Thread 'Ottavio Caruso' via vim_use
On Sat, 22 Aug 2020 at 18:02, 'J S' via vim_use
 wrote:
>
> Are there any alternatives for reading this forum?

Can you not read it in a mail client, like most of us do?

> P.S.  Be sure to CC to my email any response on this thread, as (obviously) I 
> won't otherwise be able to read them.

Which one? I can't see it. (EDIT: I had to wade into the headers to find it).

-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHzp1MTiHLTsyuAYCF0Xq_qeG68SfayrO_Fx94iGSE3Jcw%40mail.gmail.com.


Re: I get "Press ENTER or type command to continue" but not when using symlinks.

2020-05-01 Thread 'Ottavio Caruso' via vim_use
On Fri, 1 May 2020 at 12:33, Tony Mechelynck
 wrote:
>
> On Fri, May 1, 2020 at 12:02 PM Christian Brabandt  wrote:
> >
> >
> > On Fr, 01 Mai 2020, 'Ottavio Caruso' via vim_use wrote:
> >
> > > On Fri, 1 May 2020 at 09:18, Christian Brabandt  
> > > wrote:
> > > >
> > > >
> > > > On Do, 30 Apr 2020, 'Ottavio Caruso' via vim_use wrote:
> > > >
> > > > > On Thu, 30 Apr 2020 at 21:21, Christian Brabandt  
> > > > > wrote:
> > > > > >
> > > > > >
> > > > > > Hi Ottavio,
> > > > > > can you please test with the latest version? I believe there were 
> > > > > > some
> > > > > > patches that fixes such a problem.
> > > > >
> > > > > I've just compiled from the latest Github sources (8.2.0671), and
> > > > > unfortunately I have the same problem.
> > > >
> > > > Hm, not sure. Looks like to be caused by a vi-compatible setting
> > > > (possible shortmess). BTW: what is the size of your terminal? (echo
> > > > $LINES $COLUMNS to find out). How long is the complete path? Does it
> > > > matter, if the complete path is shorter (e.g. try with a bigger terminal
> > > > window).
> > >
> > > That was it!
> > >
> > > $ echo $LINES $COLUMNS
> > > 24 80
> > >
> > > Stretching the terminal to 100 columns solves the issue. And using a
> > > shorter path, too.
> > >
> > > So, we know what it is that triggers the message. Is it still a bug?
> >
> > not sure.
> >
> > Best,
> > Christian
>
> I'm not sure either. Ottavio, what is 'cmdheight' set to? Ask it with
> :verbose set ch?

cmdheight=1

> The default setting is 1, which IMHO is often too small a value. Does
> the problem still happen (with long pathfilenames and/or narrow
> terminal sizes) if you do
> :set ch+=1 ch?
> once or twice? If it doesn't, you can make that setting permanent by
> writing it (not with += but with = and the actual value) into your
> vimrc.

Yes, changing cmdheight to solves the problem, but I have "-u NONE"
intentionally, in order to emulate legacy vi, therefore I can't put
anything in my .vimrc. (Incidentally, you might ask why I'm not using
nvi, and the reason is that it's buggy).

I can live with that. If it's not a bug and it's intended behaviour, so be it.


-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHxeawT8rgHRdCL7wwqjhTE-21VH_QGog2R3Jj%3DrB27j0w%40mail.gmail.com.


Re: I get "Press ENTER or type command to continue" but not when using symlinks.

2020-05-01 Thread 'Ottavio Caruso' via vim_use
On Fri, 1 May 2020 at 09:18, Christian Brabandt  wrote:
>
>
> On Do, 30 Apr 2020, 'Ottavio Caruso' via vim_use wrote:
>
> > On Thu, 30 Apr 2020 at 21:21, Christian Brabandt  wrote:
> > >
> > >
> > > Hi Ottavio,
> > > can you please test with the latest version? I believe there were some
> > > patches that fixes such a problem.
> >
> > I've just compiled from the latest Github sources (8.2.0671), and
> > unfortunately I have the same problem.
>
> Hm, not sure. Looks like to be caused by a vi-compatible setting
> (possible shortmess). BTW: what is the size of your terminal? (echo
> $LINES $COLUMNS to find out). How long is the complete path? Does it
> matter, if the complete path is shorter (e.g. try with a bigger terminal
> window).

That was it!

$ echo $LINES $COLUMNS
24 80

Stretching the terminal to 100 columns solves the issue. And using a
shorter path, too.

So, we know what it is that triggers the message. Is it still a bug?

-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHwzC90ns5K9Yp-8s0KjmzB5xJrgVBpN2aNbgQK%2BAY4k-A%40mail.gmail.com.


Re: I get "Press ENTER or type command to continue" but not when using symlinks.

2020-04-30 Thread 'Ottavio Caruso' via vim_use
On Thu, 30 Apr 2020 at 21:21, Christian Brabandt  wrote:
>
>
> Hi Ottavio,
> can you please test with the latest version? I believe there were some
> patches that fixes such a problem.

I've just compiled from the latest Github sources (8.2.0671), and
unfortunately I have the same problem.

oc@e130:~/vim/vim-8.2.0671$ ./src/vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 30 2020 22:19:30)
Included patches: 1-671
Compiled by oc@e130
Huge version without GUI.  Features included (+) or not (-):
+acl   -farsi +mouse_sgr +tag_binary
+arabic+file_in_path  -mouse_sysmouse-tag_old_static
+autocmd   +find_in_path  +mouse_urxvt   -tag_any_white
+autochdir +float +mouse_xterm   -tcl
-autoservername+folding   +multi_byte+termguicolors
-balloon_eval  -footer+multi_lang+terminal
+balloon_eval_term +fork()-mzscheme  +terminfo
-browse+gettext   +netbeans_intg +termresponse
++builtin_terms-hangul_input  +num64 +textobjects
+byte_offset   +iconv +packages  +textprop
+channel   +insert_expand +path_extra+timers
+cindent   +ipv6  -perl  +title
-clientserver  +job   +persistent_undo   -toolbar
-clipboard +jumplist  +popupwin  +user_commands
+cmdline_compl +keymap+postscript+vartabs
+cmdline_hist  +lambda+printer   +vertsplit
+cmdline_info  +langmap   +profile   +virtualedit
+comments  +libcall   -python+visual
+conceal   +linebreak -python3   +visualextra
+cryptv+lispindent+quickfix  +viminfo
+cscope+listcmds  +reltime   +vreplace
+cursorbind+localmap  +rightleft +wildignore
+cursorshape   -lua   -ruby  +wildmenu
+dialog_con+menu  +scrollbind+windows
+diff  +mksession +signs +writebackup
+digraphs  +modify_fname  +smartindent   -X11
-dnd   +mouse -sound -xfontset
-ebcdic-mouseshape+spell -xim
+emacs_tags+mouse_dec +startuptime   -xpm
+eval  -mouse_gpm +statusline-xsmp
+ex_extra  -mouse_jsbterm -sun_workshop  -xterm_clipboard
+extra_search  +mouse_netterm +syntax-xterm_save
   system vimrc file: "$VIM/vimrc"
 user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
  user exrc file: "$HOME/.exrc"
   defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L/usr/local/lib -Wl,--as-needed -o vim-lm -ltinfo  -ldl


-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHy202EOZz%2Baq8_o41ES9X8Kdsm4WJf-C-FvDaQzGFZePQ%40mail.gmail.com.


I get "Press ENTER or type command to continue" but not when using symlinks.

2020-04-30 Thread 'Ottavio Caruso' via vim_use
Hi,

this is another "Press ENTER or type command to continue " question,
but this time it's a bit different and  bit bizarre. My vim version at
the end of this message.

I have a directory with some symbolic links:

$ ls -al docs/man-todo docs/tips
lrwxrwxrwx 1 oc oc 46 Feb  3 08:27 docs/man-todo ->
/home/oc/Documents/BSD-Cert/man-todo-final.txt
lrwxrwxrwx 1 oc oc 56 Apr 30 19:40 docs/tips ->
/home/oc/Documents/BSD-Cert/fortunes/freebsd-tips-rework

When I launch either of the files (in /home/oc/Documents/BSD-Cert/) with:

vim -u NONE /home/oc/Documents/BSD-Cert/man-todo-final.txt
or:
vim -u NONE /home/oc/Documents/BSD-Cert/fortunes/freebsd-tips-rework

I get  "Press ENTER or type command to continue" every time I enter ex
mode, but I never get it when I use:

vim -u NONE /home/oc/docs/man-todo
or:
vim -u NONE /home/oc/docs/tips

This doesn't happen at all if I omit the "-u NONE" argument.

The only thing that could explain this is that the original directory
is on a vfat partitions, whereas the symlinks are on a ext4 partition.

Any clue?

$ vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr  3 2020 09:57:11)
Included patches: 1-303
Modified by m...@netbsd.org
Compiled by oc@e130
Huge version without GUI.  Features included (+) or not (-):
+acl   -farsi -mouse_sysmouse-tag_old_static
+arabic+file_in_path  +mouse_urxvt   -tag_any_white
+autocmd   +find_in_path  +mouse_xterm   -tcl
+autochdir +float +multi_byte+termguicolors
-autoservername+folding   +multi_lang+terminal
-balloon_eval  -footer-mzscheme  +terminfo
+balloon_eval_term +fork()+netbeans_intg +termresponse
-browse+gettext   +num64 +textobjects
-builtin_terms -hangul_input  +packages  +textprop
+byte_offset   +iconv +path_extra+timers
+channel   +insert_expand -perl  +title
+cindent   +job   +persistent_undo   -toolbar
-clientserver  +jumplist  +popupwin  +user_commands
-clipboard +keymap+postscript+vartabs
+cmdline_compl +lambda+printer   +vertsplit
+cmdline_hist  +langmap   +profile   +virtualedit
+cmdline_info  +libcall   -python+visual
+comments  +linebreak -python3   +visualextra
+conceal   +lispindent+quickfix  +viminfo
+cryptv+listcmds  +reltime   +vreplace
+cscope+localmap  +rightleft +wildignore
+cursorbind-lua   -ruby  +wildmenu
+cursorshape   +menu  +scrollbind+windows
+dialog_con+mksession +signs +writebackup
+diff  +modify_fname  +smartindent   -X11
+digraphs  +mouse -sound -xfontset
-dnd   -mouseshape+spell -xim
-ebcdic+mouse_dec +startuptime   -xpm
+emacs_tags-mouse_gpm +statusline-xsmp
+eval  -mouse_jsbterm -sun_workshop  -xterm_clipboard
+ex_extra  +mouse_netterm +syntax-xterm_save
+extra_search  +mouse_sgr +tag_binary
   system vimrc file: "/usr/pkg/etc/vimrc"
 user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
  user exrc file: "$HOME/.exrc"
   defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/pkg/share/vim"
Compilation: cc -c -I. -Iproto -DHAVE_CONFIG_H   -I/usr/include
-I/usr/pkg/include/ncurses  -O2 -I/usr/include
-I/usr/pkg/include/ncurses -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: cc   -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/local/lib
-Wl,--as-needed -o vim   -lm -lnsl  -lncurses -liconv -ldl

-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHzCSQUOcRXX1yC7OvnZp4xd4jY4A1SgpT-w-A_h5AYt0w%40mail.gmail.com.


Re: Is "vim -C" supposed to override .vimrc?

2020-02-13 Thread 'Ottavio Caruso' via vim_use
On Thu, 13 Feb 2020 at 17:00, Gary Johnson  wrote:
>
> On 2020-02-13, 'Ottavio Caruso' via vim_use wrote:
> > Hi,
> >
> > this is a snippet or my vimrc:
> >
> > $ cat .vim/vimrc
> > source $VIMRUNTIME/defaults.vim
> > set dir=~/.vim/tmp
> > set expandtab
> > set autoindent
> > iabbrev mydate =strftime("%a %d/%m/%Y")
> > digraph bl 8226 " Insert Bullet with +k bl
> > map  :1m$
> >
> > which sources the default vim system file, which in turn sets
> > "nocompatible", as expected. So far. so good.
> >
> > If I start vim with:
> > $ vim -C somefile
> >
> > I expect this to turn some features off, for example visual mode with
> > mouse clicks, but it doesn't. If I manually set "compatible" from the
> > ex command line, it does turn visual mode off. I assume I could put
> > this is my vimrc, but I don't want to do this all the time. I could
> > probably make an alias to:
> >
> > vim -c "set compatible" somefile
> >
> > However I wonder if this is intended behaviour or not, that is, I
> > expected "vim -C" to override vimrc.
>
> From ":help -C":
>
> -C  Compatible mode.  Sets the 'compatible' option.  You can use
> this to get 'compatible', even though a .vimrc file exists.
> Keep in mind that the command ":set nocompatible" in some
> plugin or startup script overrules this, so you may end up
> with 'nocompatible' anyway.

Thanks. I was looking at the wrong section of the help file.

(For posterity, setting "mouse=r" did what I meant to do).


-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHz1%2BhFhdh9UKqtL%3DPG6O7jd9Vh_zrvvvn5cLq7T-uzBHg%40mail.gmail.com.


Is "vim -C" supposed to override .vimrc?

2020-02-13 Thread 'Ottavio Caruso' via vim_use
Hi,

this is a snippet or my vimrc:

$ cat .vim/vimrc
source $VIMRUNTIME/defaults.vim
set dir=~/.vim/tmp
set expandtab
set autoindent
iabbrev mydate =strftime("%a %d/%m/%Y")
digraph bl 8226 " Insert Bullet with +k bl
map  :1m$

which sources the default vim system file, which in turn sets
"nocompatible", as expected. So far. so good.

If I start vim with:
$ vim -C somefile

I expect this to turn some features off, for example visual mode with
mouse clicks, but it doesn't. If I manually set "compatible" from the
ex command line, it does turn visual mode off. I assume I could put
this is my vimrc, but I don't want to do this all the time. I could
probably make an alias to:

vim -c "set compatible" somefile

However I wonder if this is intended behaviour or not, that is, I
expected "vim -C" to override vimrc.

My settings:
$ vim --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Dec 13 2019 20:46:00)
Included patches: 1-2200
Modified by m...@netbsd.org
Compiled by oc@e130
Huge version without GUI.  Features included (+) or not (-):
+acl   -farsi -mouse_sysmouse-tag_any_white
+arabic+file_in_path  +mouse_urxvt   -tcl
+autocmd   +find_in_path  +mouse_xterm   +termguicolors
+autochdir +float +multi_byte+terminal
-autoservername+folding   +multi_lang+terminfo
-balloon_eval  -footer-mzscheme  +termresponse
+balloon_eval_term +fork()+netbeans_intg +textobjects
-browse+gettext   +num64 +textprop
-builtin_terms -hangul_input  +packages  +timers
+byte_offset   +iconv +path_extra+title
+channel   +insert_expand -perl  -toolbar
+cindent   +job   +persistent_undo   +user_commands
-clientserver  +jumplist  +postscript+vartabs
-clipboard +keymap+printer   +vertsplit
+cmdline_compl +lambda+profile   +virtualedit
+cmdline_hist  +langmap   -python+visual
+cmdline_info  +libcall   -python3   +visualextra
+comments  +linebreak +quickfix  +viminfo
+conceal   +lispindent+reltime   +vreplace
+cryptv+listcmds  +rightleft +wildignore
+cscope+localmap  -ruby  +wildmenu
+cursorbind-lua   +scrollbind+windows
+cursorshape   +menu  +signs +writebackup
+dialog_con+mksession +smartindent   -X11
+diff  +modify_fname  -sound -xfontset
+digraphs  +mouse +spell -xim
-dnd   -mouseshape+startuptime   -xpm
-ebcdic+mouse_dec +statusline-xsmp
+emacs_tags-mouse_gpm -sun_workshop  -xterm_clipboard
+eval  -mouse_jsbterm +syntax-xterm_save
+ex_extra  +mouse_netterm +tag_binary
+extra_search  +mouse_sgr -tag_old_static
   system vimrc file: "/usr/pkg/etc/vimrc"
 user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
  user exrc file: "$HOME/.exrc"
   defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/pkg/share/vim"
Compilation: cc -c -I. -Iproto -DHAVE_CONFIG_H   -I/usr/include
-I/usr/pkg/include/ncurses  -O2 -I/usr/include
-I/usr/pkg/include/ncurses -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: cc   -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/local/lib
-Wl,--as-needed -o vim   -lm -lnsl  -lncurses -liconv -ldl



-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHy%2BFp%3DNSaduUSBJp8HHmnMj5qVaDX0s5xeFAQ9%3DpMEqXQ%40mail.gmail.com.


Re: Triplicate text after mix-matching vim and nvi

2020-02-10 Thread 'Ottavio Caruso' via vim_use
On Tue, 4 Feb 2020 at 09:03, Ottavio Caruso
 wrote:
>
>
> At one point, I noticed that the size of this file was growing
> abnormally. Then, I realised that the entries were in duplicate or
> triplicate copies, that is, as if I had copied the whole file and then
> pasted it twice onto itself.
>
> I removed the duplicate lines and started from scratch and, as a proof
> of concept, alternated between vim and nvi, just to see if this would
> happen again, and indeed it did.
>
> I wonder if somebody has a clue why this happens. Is this something I
> should expect? Is there a markup that one editor places that confuses
> the other?

For the record, the culprit is nvi (and mate-terminal).

When mate-terminal crashes (and this should not happen) obviously also
nvi crashes. For some reason, nvi creates multiple recovery files in
/tmp (and this shouldn't happen either).

So, for the time being, I have abandoned my educational purposes and
will stick with vim.

Thanks for making a great editor.


-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHywJ-oDxqQ%3DwrC0ifqtiQ0AC_XheS69Gq%3DgLbHsJOFGAw%40mail.gmail.com.


Re: Triplicate text after mix-matching vim and nvi

2020-02-05 Thread 'Ottavio Caruso' via vim_use
On Wed, 5 Feb 2020 at 08:38, Ottavio Caruso
 wrote:
>
> On Tue, 4 Feb 2020 at 14:10, Christian Brabandt  wrote:
> >
> >
> > On Di, 04 Feb 2020, Tim Chase wrote:
> >
> > > On 2020-02-04 14:43, Christian Brabandt wrote:
> > > > On Di, 04 Feb 2020, 'Ottavio Caruso' via vim_use wrote:
> > > > > 1) dd
> > > > > 2) [shift] + g
> > > > > 3) p
> > > >
> > > > :1t$
> > >
> > > That copies where Ottavio's command sequence moves, so he'd want
> > >
> > > :1m$
> > >
> >
> > Oh, yes he wanted to move and not copy. Sorry.
>
> Tim & Christian,
>
> the command works in both vim and nvi. The remap only in vim. I'll try
> to find a way of making it work in nvi, but this would be off topic.

Correction: I had to prefix the maps with [ctrl]+v and now it works on nvi too:

nvi:
map ^[[15~ :1m$^M

vim:
map  :1m$

Thanks Tony, Christian and Tim!


-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHziw5NHqJYsTMPPCnD7Md%3DLBCKx2tV7Okq%2B7%3DY8r7X8%3DA%40mail.gmail.com.


Re: Triplicate text after mix-matching vim and nvi

2020-02-05 Thread 'Ottavio Caruso' via vim_use
On Tue, 4 Feb 2020 at 14:10, Christian Brabandt  wrote:
>
>
> On Di, 04 Feb 2020, Tim Chase wrote:
>
> > On 2020-02-04 14:43, Christian Brabandt wrote:
> > > On Di, 04 Feb 2020, 'Ottavio Caruso' via vim_use wrote:
> > > > 1) dd
> > > > 2) [shift] + g
> > > > 3) p
> > >
> > > :1t$
> >
> > That copies where Ottavio's command sequence moves, so he'd want
> >
> > :1m$
> >
>
> Oh, yes he wanted to move and not copy. Sorry.

Tim & Christian,

the command works in both vim and nvi. The remap only in vim. I'll try
to find a way of making it work in nvi, but this would be off topic.

(BTW: if anybody knows a of a vi/nvi mailing list or usenet group,
please let me know, on of off list)

-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHwe6cXd%2BRNQOuzmm1-16uZ2DCJA8WFbV5mkQT_SSRf7Ow%40mail.gmail.com.


Re: Triplicate text after mix-matching vim and nvi

2020-02-05 Thread 'Ottavio Caruso' via vim_use
On Tue, 4 Feb 2020 at 13:27, Tony Mechelynck
 wrote:

> The following mapping will move the first line from top to bottom of
> the file (at least in Vim in 'nocompatible' mode, I'm not sure about
> vi (or 'compatible' Vim) and nvi):
>
> :map  :1d$put
>
> ( rather than | to avoid interpreting the rest when declaring the
> mapping rather than when executing it). Of course you can use any
> convenirnt {lhs} instead of 
>

Thanks. The remap works in vim but not in vi, probably because I'm
using the wrong syntax.

-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHx8ypGffZQGabrvoff0aM9yca5QxsL3JgkgGy1TcbkBAA%40mail.gmail.com.


Triplicate text after mix-matching vim and nvi

2020-02-04 Thread 'Ottavio Caruso' via vim_use
Hi,

Maybe this is off-topic but I hope you guys can help, as there's no
specific maling list for classic vi/nvi.

On my system (Linux/amd64 Debian 4.9.189) I have:

- vim (vim 8.1)
- vi (aliased to vim)
- nvi (nvi-1.81.6nb5 )

For self-educational purposes, I've been trying to teach myself to use
both vim and nvi, as I'm studying for a BSD-related certification,
where old vi is installed by default. So, to a certain extent, I am
looking for trouble, however...

I have a file (man-pages.txt) where I have a list of man pages that I
need to expand, for example:

man 8 tcpdump
man 1 login
man 8 sysctl
man 8 adduser
man 5 adduser.conf
man 8 rmuser
man 8 useradd
man 8 userdel

and so on. When I am finished with reading a man page, I cut the first
line and I paste to the last line, so:

1) dd
2) [shift] + g
3) p

And I've been doing this for a few months. Sometimes I use vim and
some other times nvi.

At one point, I noticed that the size of this file was growing
abnormally. Then, I realised that the entries were in duplicate or
triplicate copies, that is, as if I had copied the whole file and then
pasted it twice onto itself.

I removed the duplicate lines and started from scratch and, as a proof
of concept, alternated between vim and nvi, just to see if this would
happen again, and indeed it did.

I wonder if somebody has a clue why this happens. Is this something I
should expect? Is there a markup that one editor places that confuses
the other?

Thanks

-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHxa9%2BhNdpV4vq1FixmDg_-pbLF5WgZvFjMXDsKQv%2BGHTQ%40mail.gmail.com.


Re: What determines the very first file that Vim will load on startup?

2020-01-17 Thread 'Ottavio Caruso' via vim_use
On Fri, 17 Jan 2020 at 13:10, DwigtArmyOfChampions
 wrote:
>
> I am using Vim 7.4. I have a file /etc/vimrc, but when I vim a file and run 
> the :scriptnames command, the very first file loaded is ~/.vimrc.
>
> On another Linux machine I also have Vim 7.4 installed, and when run the vim 
> command and then run :scriptnames, that loads /etc/vimrc.
>
> Where is this loading order determined?

I have this is my help file:

   system-vimrc
 b. For Unix, MS-DOS, MS-Windows, OS/2, VMS, Macintosh, RISC-OS and Amiga
the system vimrc file is read for initializations.  The path of this
file is shown with the ":version" command.  Mostly it's "$VIM/vimrc".
Note that this file is ALWAYS read in 'compatible' mode, since the
automatic resetting of 'compatible' is only done later.  Add a ":set
nocp" command if you like.
For the Macintosh the $VIMRUNTIME/macmap.vim is read.

  VIMINIT .vimrc _vimrc EXINIT .exrc _exrc $MYVIMRC



$ vim --version
[...]
   system vimrc file: "/usr/pkg/etc/vimrc"
 user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
  user exrc file: "$HOME/.exrc"
   defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/pkg/share/vim"

echo $VIM
/usr/pkg/share/vim



-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHy3NVMLeqvzUyoE3uW_%2BKspfLqmpQXbB%3D-p7jmie%2BRHyg%40mail.gmail.com.


Is there a command comparison cheat sheet between nvi and vim?

2019-11-15 Thread 'Ottavio Caruso' via vim_use
Hi all,

apart from the excellent "vi_diff" in the docs, is anybody aware of a
basic cheat sheet of commands comparison between vim and *BSD nvi?

Thanks

-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHyk33g1LMxwLYLuaGRTkCoK55xN%2BP5GMOZkCVO%3DEq_S%2Bw%40mail.gmail.com.


Re: Formatting inconsistencies between vim and other text editors

2019-09-18 Thread 'Ottavio Caruso' via vim_use
On Wed, 18 Sep 2019 at 19:43, Gary Johnson  wrote:
>
> On 2019-09-18, 'Ottavio Caruso' via vim_use wrote:
> > First of all, I know vim is a text editor and not a word processor, but...
> >
> > I have a heavily formatted resume in pdf that I want to make as
> > machine-readable as possible yet decently  readable by a human.
> >
> > I have converted it into plain text first, then, in vim:
> >
> > :set textwidth=80
> >
> > I selected the text with "V" and applied "gq". Then I've removed all
> > formatting and put a bit of spaces and tabs here and there.
> >
> > It looks great in vim, but when I view it in Pluma, Gedit or Xed
> > (Debian Stretch) the formatting is all messed up. Some line breaks are
> > not recognised; tabs are not implemented consistently.
> >
> > Where would I start troubleshooting the issue? Have I followed the
> > wrong workflow?
>
> Formatting differences are affected by:
>
> - tabstop settings
> - mixing tabs and spaces for indenting
> - wrapping of long lines
> - end-of-line characters
> - monospace vs. proportional fonts
>
> and probably other factors I haven't thought of.
>
> For troubleshooting, I would start with executing
>
> :verbose set tabstop?
>
> to see the current tabstop setting and where it was last set, and
>
> :set list
> :set listchars+=tab:>-
> :set listchars+=nbsp:_
>
> to see ends of lines, tabs and non-breaking spaces.

Thanks.

'tabstop' is at 8, which is fine.

I've "set expandtab" and then reformatted the offending paragraphs,
and it seems to have fixed the issue.

What I've also done, instead of converting the pdf to text and then
editing it in vim, I've simply copied the text and pasted it in vim.
This seems to have removed all the formatting and has created a
simpler layout.


-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHyjWs-_Do2jcMBnki9c70pJB3mqZeqSTwCt5iBdpyxCGw%40mail.gmail.com.


Formatting inconsistencies between vim and other text editors

2019-09-18 Thread 'Ottavio Caruso' via vim_use
First of all, I know vim is a text editor and not a word processor, but...

I have a heavily formatted resume in pdf that I want to make as
machine-readable as possible yet decently  readable by a human.

I have converted it into plain text first, then, in vim:

:set textwidth=80

I selected the text with "V" and applied "gq". Then I've removed all
formatting and put a bit of spaces and tabs here and there.

It looks great in vim, but when I view it in Pluma, Gedit or Xed
(Debian Stretch) the formatting is all messed up. Some line breaks are
not recognised; tabs are not implemented consistently.

Where would I start troubleshooting the issue? Have I followed the
wrong workflow?

-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHyYPV4UkDgmSye2JyED0e_KEnp6_8JgdvVj0DQNc_p_kQ%40mail.gmail.com.


Re: Execute command and insert its standard output at the beginning of non-empty line?

2019-09-10 Thread 'Ottavio Caruso' via vim_use
On Tue, 10 Sep 2019 at 12:33, Christian Brabandt  wrote:
>
>
> On Di, 10 Sep 2019, 'Ottavio Caruso' via vim_use wrote:
>
> > Hi all,
> >
> > I have this bash alias:
> > alias my-date='date +"%A %d %B %Y"'
> >
> > and this line in vimrc:
> > set shellcmdflag=-ic
> >
> > I want to insert (prepend) a timestamp at the beginning of a non-empty
> > line, without line breaks, but if I type:
> >
> > :r !my-date
>
> :r reads the output of your command and puts it below the current line.
>
> > this will print the timestamp on the next line, that is the line below
> > the cursor.
> >
> > Is there a way to achieve what I want?
>
> use strftime() together with Ctrl-R in insert mode. See the example in
> the faq: https://vimhelp.org/vim_faq.txt.html#faq-21.4
>

Many thanks Christian, this is exactly what I was looking for.

I put this in my .vimrc:

iabbrev mydate =strftime("%A %d %B %Y")

and it works like a charm.



-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHym1bcr%2BwtAVfH4yh_7CLANp8ZpchBuKa%2ByAtVmmP1iCA%40mail.gmail.com.


Execute command and insert its standard output at the beginning of non-empty line?

2019-09-10 Thread 'Ottavio Caruso' via vim_use
Hi all,

I have this bash alias:
alias my-date='date +"%A %d %B %Y"'

and this line in vimrc:
set shellcmdflag=-ic

I want to insert (prepend) a timestamp at the beginning of a non-empty
line, without line breaks, but if I type:

:r !my-date

this will print the timestamp on the next line, that is the line below
the cursor.

Is there a way to achieve what I want?

Thanks

-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHw_Z9Vop%3DRL5%2BdVsNryX%3Dqm7mP0FoaZqKnvNVw%2BBCBUZw%40mail.gmail.com.


Re: Compile vim with clipboard support.

2019-08-25 Thread 'Ottavio Caruso' via vim_use
On Sat, 24 Aug 2019 at 08:25, Hongyi Zhao  wrote:

>
> Based on the instructions given here:
>
> https://github.com/vim/vim/blob/master/src/INSTALL
>
> It said that:
>
> ---
> The advantage of running configure separately, is that you can write a script
> to build Vim, without changing the Makefile or feature.h. Example (using sh):
>
> CFLAGS=-DCOMPILER_FLAG ./configure --enable-gui=motif
>
> One thing to watch out for: If the configure script itself changes, running
> "make" will execute it again, but without your arguments. Do "make clean" and
> run configure again.
> ---
>
> So, it should be enough to do the following for using specific
> configure arguments:
>
> make clean
> /configure ...
> make
>
> Am I right?
>

[DISCLAIMER: I'm writing this out of selfishness, as I'd really like
to see more people testing vim-* on pkgsrc. Apologies for the detour]

This won't answer your question directly, but you can always try and
build vim on your system using pkgsrc [1] [2] .

Vim on pkgsrc is built around separate packages, the master being
vim-share [3] and in your case you want vim-gtk2 [4].

Then you can modify the Makefile [5] adding your flags or just insert
them from the command line:

$ cd [path-to-pkgsrc]/editors/vim-gtk2 && bmake  install

I can't guarantee this will be an easy ride, though. I had to disable
fortify to make my package work on Linux.

[1] https://www.pkgsrc.org/
[2] https://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/doc/pkgsrc.html
[3] http://pkgsrc.se/editors/vim-share
[4] http://pkgsrc.se/editors/vim-gtk2
[5} 
http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/editors/vim-gtk2/Makefile?rev=1.84=text/x-cvsweb-markup

-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHyNpoBv%3Dg%3DabA4nexUhrnk0_zi3Cq82_dk4i6RnKdaupA%40mail.gmail.com.


Re: Vin crashes with "Caught deadly signal ABRT" unless launched without .vimrc

2019-07-13 Thread 'Ottavio Caruso' via vim_use
On Fri, 12 Jul 2019 at 14:37, Bram Moolenaar  wrote:

> It looks like you run into the false-positive fortify check.
> Although the build log mentiones -D_FORTIFY_SOURCE=1 it behaves like a
> higher fortify level was used.

Thanks for your input Bram. I wanted to make a couple of checks before
getting back you.

In pkgsrc, as default we have:

PKGSRC_USE_FORTIFY?= strong

As explained here:
http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/mk/defaults/mk.conf

PKGSRC_USE_FORTIFY?= strong
# Turns on substitute wrappers for commonly used functions that do not bounds
# checking regularly, but could in some cases. This is effectively in use only
# when both enabled and supported.
# Possible values:
# no: Do not pass any flags for FORTIFY
# weak:   Pass -D_FORTIFY_SOURCE=1
# strong: Pass -D_FORTIFY_SOURCE=2
# Default: strong


I have rebuilt with PKGSRC_USE_FORTIFY?=weak

and this seems to produce an installation that doesn't crash.

I've passed this information to pkgsrc-users and the editors/vim
package maintainer.

Thanks for you assistance.




-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHwiYMzGNxGMAnPzed8jQY1tKOUkE4T39exLcdpiCJ55EA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Vim crashes with "Caught deadly signal ABRT" unless launched without .vimrc

2019-07-12 Thread 'Ottavio Caruso' via vim_use
On Fri, 12 Jul 2019 at 07:18, Dominique Pellé  wrote:

> Your links don't work unfortunately.

Yes, sorry, blame Debian. I'm not sure if attachments are allowed, but
I've attached vim-version, build logs and the crash logs. Let me know
if they are visible and allowed.

>
> My guess is that you did not build with:
>
>  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1

As per logs, this was part of the compilation options.


> Other things to try:
>
> 1) run vim with valgrind, which will report memory errors
> if any:
>
> $ valgrind --num-callers=50 --track-origins=yes ./vim 2> vg.log
>
> Then look at vg.log
>
> 2) You can also build with asan (address sanitizer).
> Uncomment out this line in vim/src/Makefile:
>
> SANITIZER_CFLAGS = -g -O0 -fsanitize=undefined -fno-omit-frame-pointer
>
> Then:
>
> $ cd vim/src
> $ make clean ; make -j8
> $ ./vim 2> asan.log
>

I'll forward this to the pkgsr-users list. If the logs are not
attached, I'll paste them in my next email.


-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHyirg5NV4epX7PfrUiCiB3JAsyVLSv-%2BDsOpqo1Whp8YQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from vim...done.
(gdb) run
Starting program: /opt/pkg/bin/vim 
Vim: Warning: Output is not to a terminal
[?1000h[?1049h[?1h=
Program received signal SIGABRT, Aborted.
0x77308fff in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt full
#0  0x77308fff in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x7730a42a in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2  0x77346c00 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#3  0x773cf1f7 in __fortify_fail () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#4  0x773cd330 in __chk_fail () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#5  0x5571dee3 in strcpy (__src=0x55763046 "0", 
__dest=0x55c3e951 "") at /usr/include/x86_64-linux-gnu/bits/string3.h:110
No locals.
#6  add_nr_var (nr=, name=0x55763046 "0", v=, 
dp=0x55c3ece8) at userfunc.c:618
No locals.
#7  call_user_func (selfdict=, lastline=1, firstline=1, 
rettv=0x7fffd570, argvars=, argcount=1, fp=0x55c28b50) 
at userfunc.c:858
save_sourcing_name = 
fixvar_idx = 
i = 
ai = 
len = 
wait_start = {tv_sec = 0, tv_usec = 140737340837732}
fc = 0x55c3e930
save_did_emsg = 
default_arg_err = 0
v = 
islambda = 0
numbuf = 
"\220\323\377\377\377\177\000\000\220\323\377\377\377\177\000\000\001\000\000\000\000\000\000\000\224\025[UUU\000\000\240\320\377\377\377\177\000\000\022",
 '\000' , "P\302\303U\000\000\000\000\234"
call_start = {tv_sec = 140737333868241, tv_usec = 40}
depth = 1
save_sourcing_lnum = 
save_current_sctx = 
using_sandbox = 0
name = 
started_profiling = 0
depth = 1
#8  call_func (funcname=funcname@entry=0x55c47e60 
"\200\375R13_LocalBrowse", len=len@entry=-1, rettv=rettv@entry=0x7fffd570, 
argcount_in=argcount_in@entry=1, 
argvars_in=argvars_in@entry=0x7fffd390, argv_func=argv_func@entry=0x0, 
firstline=1, lastline=1, doesrange=0x7fffd55c, evaluate=, 
partial=0x0, selfdict_in=0x0) at userfunc.c:1621
did_save_redo = 1
save_redo = {sr_redobuff = {bh_first = {b_next = 0x0, b_str = ""}, 
bh_curr = 0x0, bh_index = 0, bh_space = 0}, sr_old_redobuff = {bh_first = 
{b_next = 0x0, 
  b_str = ""}, bh_curr = 0x0, bh_index = 0, bh_space = 0}}
rfname = 
ret = 0
error = 0
i = 
fp = 0x55c28b50

Vin crashes with "Caught deadly signal ABRT" unless launched without .vimrc

2019-07-11 Thread 'Ottavio Caruso' via vim_use
Hi all,

I'd like to have the opinion of this list before reporting this issue
as a bug on github.

I have compiled and installed Vim using pkgsrc on my Linux Mint Debian Edition.
I've already reported the issue on the pkgsrc-users list and it has
been suggested that I report the issue upstream.

The build has run fine, but, and this seems to be a common failure,
when Vim is launched, it crashes like this:

$vim
Vim: Caught deadly signal
Vim: Finished.

Full vim --version here:
http://paste.debian.net/hidden/ded7a246/

Full build log here:
http://paste.debian.net/hidden/5ebf5480/

I've made a gdb capture here:
http://paste.debian.net/hidden/4ca4bed2/

Temporary workarounds:

1) `vim -u NONE` # works, but without modules

2) recompiling with the option: "CFLAGS=-g INSTALL_UNSTRIPPED=yes" #
produces a binary without crashes.

Any input will be appreciated.





-- 
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHzQDmQcV5psTjtzdQ1KvgZMwm5jn%2BD8Pt66SjoWtyadQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Vim crashes with "Caught deadly signal ABRT" unless launched without .vimrc

2019-07-11 Thread 'Ottavio Caruso' via vim_use
[Apologies if you have already received this email. I have not seen it
on the web interface, so I'm re-sending it.]

Hi all,

I'd like to have the opinion of this list before reporting this issue
as a bug on github.

I have compiled and installed Vim using pkgsrc on my Linux Mint Debian Edition.
I've already reported the issue on the pkgsrc-users list and it has
been suggested that I report the issue upstream.

The build has run fine, but, and this seems to be a common failure,
when Vim is launched, it crashes like this:

$vim
Vim: Caught deadly signal
Vim: Finished.

Full vim --version here:
http://paste.debian.net/hidden/ded7a246/

Full build log here:
http://paste.debian.net/hidden/5ebf5480/

I've made a gdb capture here:
http://paste.debian.net/hidden/4ca4bed2/

Temporary workarounds:

1) `vim -u NONE` # works, but without modules

2) recompiling with the option: "CFLAGS=-g INSTALL_UNSTRIPPED=yes"
produces a binary without crashes.

Any input will be appreciated.

--
Ottavio Caruso

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAEJNuHzX%3DfqXR0eDKFMxCkA4GAgCK3E6uB3YTvpVSX8nAe3RQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.