Re: vimrc: identify "small" version vs "huge" version

2020-10-02 Thread John Little
On Saturday, October 3, 2020 at 4:34:49 AM UTC+13, ping wrote:
>
>
> I found in centos 7 there is /usr/bin/vi and /usr/bin/vim, with same 
> version, patches.
>

I was using a new centos 7 instance this week, and the version of vim was 
old, 7.4, and very minimal.  The centos 7 repositories do not have a more 
recent version.

I followed the instructions at 
https://phoenixnap.com/kb/how-to-install-vim-centos-7, except I did not 
remove anything, and did not include any of the interpreter stuff.  It was 
quick and painless, now have a "huge" vim 8.2.

Regards, John Little

-- 
-- 
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/ad1affb3-76fb-4d63-9211-734800709a5co%40googlegroups.com.


Re: gvim: how remove menu and toolbar, but keep original geometry

2020-08-03 Thread John Little

> except that the 3 lines lost by removing the menu and toolbar are gone, 
and the remaining geometry is 80x42. 

On my KDE I get the behaviour you want.  What's your DE?  

Also, in case there's something in your set up, f.ex. something in the 
.vimrc which triggers the GUI to start before the setting of guioptions, try

gvim --clean --cmd 'set go=aeik' -geom 80x80

If that works, you could move stuff around in the .vimrc and .gvimrc to 
find the cause.  Or, maybe put the set go in the alias.  I get your issue 
if I use :set lines= after gvim starts.

In KDE, I can force the size of gvim window, and make it larger than the 
screen, but having forced the size, it can't be changed subsequently.

Regards, and HTH, John Little

-- 
-- 
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/3cfd005f-a85e-4a67-8446-26af18a2b44do%40googlegroups.com.


language handling confused

2020-07-17 Thread John Little
What's happening here? KDE, with $LANGUAGE=en_GB:en_US:fr and 
$LANG=en_NZ.UTF-8

:lang mess
Langue courante pour messages : "en_NZ.UTF-8"

vim --clean, also gvim --clean.  I'm confused.

Regards, John Little




-- 
-- 
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/208f93a6-2902-4f0b-9a74-249fea927da4o%40googlegroups.com.


Re: X error and vim dies

2020-05-06 Thread John Little
If this problem has consequences (vim dying in the middle of your work can 
be bad), if you build your own vim a workaround is to modify os_unix.c in 
the x_error_handler function, to replace the preserve_exit() call with

 g_print("%s", IObuff);

or just comment out the preserve_exit() call.  I have used this workaround 
for a BadWindow error for about a decade, with no ill effect.

Regards, John Little

-- 
-- 
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/28ea59ef-941a-41eb-a700-7180ae0a7cbd%40googlegroups.com.


Re: Using non-greedy quantifiers with substitute()

2020-03-16 Thread John Little
You've used a double-quote string, which processes backslash characters, 
for the pattern. Either double the backslash, or use a single-quote string:

echo substitute("#|\nmulti-line comment\n|#",'#|.\{-}|#',"","g")
>

HTH, and regards,

John Little

-- 
-- 
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/ac338094-581e-4b28-9598-7da9a0160b40%40googlegroups.com.


Re: join() a list with a newline char for an echo

2020-02-06 Thread John Little

> I agree that works - but my list is from a ch_read() and has ^@ (NL) at 
the end of each element
and I just cannot seem to get this work. The join("\n") just puts the ^@ 
back everywhere.

I don't know what you've got there.  Presumably, you are familiar with the 
way vim handles NUL
characters (they are stored in memory as newlines, 0x0a, and show as ^@).  

Have you tried chopping off the ends of the elements? Say,

:let my_list = ["alice", "bob", "carol"]
:call map(my_list, {k,v -> v[0:-2]})
:echo my_list
['alic', 'bo', 'caro']

HTH, John Little

-- 
-- 
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/2a046725-c7f3-4d9d-b571-0cd9242984ae%40googlegroups.com.


Re: join() a list with a newline char for an echo

2020-02-06 Thread John Little
On Friday, February 7, 2020 at 7:53:02 AM UTC+13, M Kelly wrote:

> I have tried join( mylist, "\n") but it uses ^@ and "\r" uses ^M

works fine for me, vim, gvim, and vim --clean.

:let l = ["one", "two", "three"]
:echo join(l, "\n")
one
two
three
Press ENTER or type command to continue

Maybe you're on MS Windows?  Used single quotes?  Have some settings 
causing trouble? (try with vim --clean).

HTH, John Little

-- 
-- 
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/9e8284d8-136e-4dff-8154-d9b24b693c94%40googlegroups.com.


unexpected ] mark after undo/redo

2020-02-03 Thread John Little
Vim 8.2.106. After pasting lines with p, the ] mark is on the last line 
pasted.  

If I then undo and redo with u ctrl-r, the ] mark is now on the line below. 
I did not expect this.

The help says "Lowercase marks are restored when using undo and redo".  

Undoing and redoing the insertion of lines puts the ] mark on the last 
inserted line.

Am I missing something?

Regards, John Little


-- 
-- 
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/6cef08d8-0caf-458c-b22a-35e82f2c34c8%40googlegroups.com.


Re: set all - each option one line

2020-01-18 Thread John Little
If you can't build or obtain a very new vim version, using the python 
interface can serve with a bit of work.  Use the :ver command to see what 

For example, my vim is compiled with python3, so in a scratch buffer
py3 << eof
b = vim.current.buffer
for k in vim.options:
b.append(k + '=' + str(vim.options[k]))
eof

That's global options only, there's buffer-local and window-local options 
too.

-- 
-- 
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/799ff61b-0fc4-474c-a50f-c755135bfafb%40googlegroups.com.


Re: Why does argsdo duplicates a file?

2019-11-26 Thread John Little
On Wednesday, November 27, 2019 at 1:00:31 AM UTC+13, Igor wrote:

Assuming the current directory has files a.txt, b.txt, c.txt

: args *.txt

: argdo vs

> What happens is: c.txt is displayed left most, then the same c.txt ...

> I expected to see c.txt displayed in one single window, but it it 
displayed in two windows. Why?

The argdo vs behaves like you'd entered the following sequence:

:vs
:next
:vs
:next
:vs

Each command in isolation is doing its thing correctly.  There's three 
splits,
resulting in four vim windows.

If what you want is as many vim windows as arguments, in order, try

:1,$-argdo vs | wincmd w
:next

Note there's lots of options affecting vim's behaviour here.  For example, 
if you have 'splitright' set, it's simpler:

:set spr
:1,$-argdo vs 
:next

Regards, John Little

-- 
-- 
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/07bbb4a8-dc68-47ca-875c-a90a8a749507%40googlegroups.com.


Re: Persist Clipboard after Exiting Vim

2019-08-06 Thread John Little
Eli the Bearded explained why the clipboard is "being cleared".

TL;DR install a clipboard manager.

The solution for most users on X is the DE runs a clipboard manager.  I presume 
that your Arch install is bare bones and you haven't installed one yet.  The 
Arch wiki entry for clipboard https://wiki.archlinux.org/index.php/Clipboard 
lists a few options.  Such a manager watches the clipboard and copies it, so 
that when vim exits it is still available.  "full featured" managers have 
things like a history, allowing some manipulation, and knowing about URLs.



If you are not on X, 

-- 
-- 
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/2025fe3c-49cb-445c-b8c6-00a237b00264%40googlegroups.com.


Re: :help :check inconsistent with :check

2019-06-02 Thread John Little

On Sunday, June 2, 2019 at 1:54:53 PM UTC+12, Tony Mechelynck wrote:
> for this, line 827 of doc/tagsrch.txt would have had to be:
> *che* *chec* *check* *checkp* *checkpa* *checkpat* *checkpath*
> instead of just the first and last ones of these; similarly for _all_
> other ex-commands, which I believe would have made the doc/tags file
> much bigger.

Extra tags would only be needed where there's ambiguity.  I compiled a list; 
the middle column is what you get if you type the given at the : command 
prompt, and the third column is the topic you get if you ask for help for the 
given:

given   | :| :help :
+--+-
arg | args | arga
bre | brewind  | break
cab | cabbrev  | cabclear
cadd| caddbuffer   | caddexpr
chec| checkpath| checktime
cne | cnext| cnewer
cnor| cnoremap | cnoreabbrev
cun | cunmap   | cunabbrev
diff| diffupdate   | diffget
doaut   | doautocmd| doautoall
end | endif| endfunction
folddo  | folddopen| folddoc
inor| inoremap | inoreabbrev
keep| keepmarks| keepalt
ladd| laddbuffer   | laddexpr
lfi | lfile| lfirst
lge | lgetfile | lgetbuffer
lma | lmap | lmake
lock| lockmarks| lockvar
mkvi| mkvimrc  | mkview
sfi | sfind| sfirst
snore   | snoremap | snoremenu
ver | version  | verbose

One or two extra tags for each of these is not going to significantly add to 
vim's 10,000 or so.

> :help :check (with 'wildmenu' on) or :help :check would
> have shown you all helptags beginning with :check

How would I have known to do that, when I did not know that there might be 
another command starting with "check"?  I use the help when I don't know stuff, 
that's the point of it.

Regards, John Little

-- 
-- 
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/ffb53d57-66be-413a-a978-20a05f48c19a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


:help :check inconsistent with :check

2019-06-01 Thread John Little
I just struck an inconsistency that had me confused.

I was watching a steadily growing log file, and with autoread set, I used the 
command

:check

and nothing happened (but for a message I didn't understand).  So I went to the 
help and ran

:help :check

and got the help for the command I thought I was running.  Eventually I worked 
out that :check is actually :checkpath, and I should have used :checktime.

But surely ":h :xyz" should give the help for ":xyz", but am I missing 
something?

-- 
-- 
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/f9ed3ee7-06de-4960-9119-940591cee55d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cursor shape in the console

2019-05-30 Thread John Little
On Wednesday, May 29, 2019 at 9:31:17 AM UTC+12, Tony Mechelynck wrote:
> ... I haven't found how to make it work in both konsole
> and xterm ...

I use the XTERM_VERSION environment variable.  xterm defines it, konsole 
doesn't.

Note that if xterm is started with -bc for a blinking cursor, the effects of 
the 5 and 6 are reversed, so that 5 is steady and 6 blinking.

Also, I sometimes use the "Set Text Parameters" sequence to change the colour 
of the cursor; so

if $XTERM_VERSION =~? "xterm"
let _SI = "\]12;green\x7"
let _EI = "\]12;red\x7"
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/070410f8-649c-464c-8153-1d8bc22b77bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Obscure shell syntax hifghlighting problem: Solved!

2019-05-30 Thread John Little
On Sunday, May 26, 2019 at 9:40:30 PM UTC+12, J S wrote:
> That zero works in bash is, of course, not mentioned in "man bash".
In the manual, in 3.5.3 Shell Parameter Expansion, it says:

In each of the cases below, word is subject to tilde expansion, parameter 
expansion, command substitution, and arithmetic expansion.

"0-9" is seen as arithmetic. "1-10" would serve, too.

Regards, John Little

-- 
-- 
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/8117e736-6bf8-4811-9feb-637dfa448514%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: hexa numbers operations : masking, shifting

2019-02-05 Thread John Little
On Monday, February 4, 2019 at 11:47:50 PM UTC+13, niva...@gmail.com wrote:

I'm sorry, I meant to type "a power of 2" in my answer, but my fingers didn't 
obey.

> Shifting can be made multiplying or dividing by pow(x,2).

(Assuming you meant pow(2,x).)

You'd want to be very careful with that, pow() returns a Float and the result 
will become a Float, which is not valid in a lot of vim script contexts, 
including the bit functions.  Float-ness can propagate unexpectedly in vim 
script.  I'd use a literal number if the shift is constant, f.ex. "x / 16" for 
"x >> 4".  If a variable shift is called for maybe use float2nr(pow(2, x)).

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: hexa numbers operations : masking, shifting

2019-02-03 Thread John Little
On Monday, February 4, 2019 at 12:03:40 AM UTC+13, niva...@gmail.com wrote:
> 
> Can I do hexa numbers operations like shifting and masking in vimscript ?

See and(), or(), and xor()

:echo and(0x0103, 0x00ff)

For shifting, multiplying or dividing by 2 would work.

:echo 0x0103 / 256

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬^[^[

2019-01-12 Thread John Little
On Saturday, January 12, 2019 at 11:57:34 AM UTC+13, Peng Yu wrote:
> I got the following error

I looked into this and found a similarly weird bunch of errors, but *only* with 
my .vimrc.

TL;DR the fileencoding has been detected as latin1, and the "▸" fails to 
convert to latin1.  A solution may be to open the offending file, :set 
fileencoding=utf-8, then write the file.

The smallest example of the problem I see is a two byte file, with the hex 
bytes bb 0a:

»

If I edit it with vim, I get a [converted] message and it displays correctly.  
If I then paste this into it

:set listchars+=tab:▸-

it looks ok, but if I then try to write it, there's conversion errors.

The cause, at least in my case, is that the .vimrc gets a detected with 
fileencoding=latin1 because there's a byte invalid for utf-8; vim converts it 
to utf-8 to show it, then converts back to latin1 on writing. 

I think my .vimrc is vulnerable to these encoding snafus for two reasons.
Firstly, I like to use weird characters in listchars, for example "»", to use a 
character that's unlikely to appear in the files I edit. 
Secondly, I've copied my .vimrc around many systems, going back decades, going 
back decades, including presumably systems that did not use utf-8, and it's 
accumulated a bunch of commented-out settings of listchars that have proved 
useful on various systems.  These have the encoding from those ancient systems, 
which are not valid utf-8.

I can see someone else having these two things and stumbling into this, perhaps 
using a conversion library that generates the horrible 
"?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?" text.

HTH, and regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: ALT key mapping in windows 10

2018-12-20 Thread John Little
On Friday, December 21, 2018 at 2:50:06 AM UTC+13, Deepak kumar wrote:

> how to map ALT+ LEFT | RIGHT | UP | DOWN keys in vimrc file?

Generally, to find what vim can map, enter insert mode, type ctrl-v then what 
you want to map.  If you see something, then that's what you can map.  If not, 
vim isn't seeing the keys and has trouble mapping it.  I see  in gvim 
for alt+left.

HTH, and regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Compiling Vim on Ubuntu

2018-11-07 Thread John Little
On Thursday, November 8, 2018 at 9:38:37 AM UTC+13, Dominique Pelle wrote:
> You'll need to make sure that /usr/local/bin is in your path
> before /usr/bin which I think is normally the case by
> default on Ubuntu.

I just checked on an uncustomized instance of 16.04, and indeed /usr/local/bin 
was in the path and ahead of /usr/bin.  If the path is not the problem, 
conceivably David used a terminal session that was started before the make 
install was run, and the shell had hashed the location of gvim, so didn't 
search the path to find the new gvim.  In bash "hash -r" fixes this.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Compiling Vim on Ubuntu

2018-11-07 Thread John Little
On Tuesday, November 6, 2018 at 2:30:56 PM UTC+13, David Fishburn wrote:

> I can't really think what else to try to install to get the GUI support.

In all that you didn't do 

sudo apt-get build-dep vim-gnome

I booted into a xenial iso just now.  This gives a vanilla, out-of-the-box 
xenial experience (almost), if a little slow.  My old, trusty, "apt-get 
build-dep vim-gtk" gave errors. I used the settings app to enable all the 
boxes, let it update, followed Dominique's instructions and built vim with gtk2.

If the build-dep vim-gnome doesn't do the trick, maybe your sources.list has 
problems.  The vanilla xenial's sources.list was, with comments stripped:

deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted universe 
multiverse
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe 
multiverse
deb-src http://security.ubuntu.com/ubuntu/ xenial-security main restricted 
universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe 
multiverse
deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted 
universe multiverse

HTH, and regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: gvim and sliding command output animation

2018-10-18 Thread John Little
On Thursday, October 18, 2018 at 11:13:21 PM UTC+13, Steven Holt wrote:

> I've mentioned it. My DE is i3, i3wm.org.

Sorry, I saw i3, and without thinking assumed it meant an Intel i3 CPU.  It's a 
very long time since I used a tiling window manager.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: gvim and sliding command output animation

2018-10-18 Thread John Little
On Wednesday, October 17, 2018 at 9:28:41 PM UTC+13, Steven Holt wrote:
> Any thoughts?

I'm sorry I'm not much help.  Originally I thought I'd just pop up and ask the 
obvious questions (version, OS, DE).

I simply don't understand your sureness "it's an animation done on purpose".  
gvim is a very thin skin on terminal vim, especially for the main text area.  
Your video plays very quickly for me, I have to play it at half speed to notice 
anything.

I suggest you try a vim GTK2 version.  I've fired up a GTK3 vim here and it 
seems a little slower, but nothing worth your complaint.  AFAIK GTK3 adds 
nothing to vim, though some theming might work differently.

You might try changing the font, or some graphics setting of your set-up, like 
the rendering backend your compositor uses.  You didn't mention your DE, that 
is Gnome, KDE, XFCE, et cetera.  Conceivably another DE might drive your 
hardware better.

If your eyes are hurting, and you normally use white or light backgrounds, IMO 
dark backgrounds (preferably black for text) are far easier on the eyes.

To make progress on what's actually going on you'd have to start profiling vim, 
a lot of work with little prospect of achieving anything.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: ***note*** handling a large file

2018-10-16 Thread John Little
On Monday, October 15, 2018 at 7:43:34 PM UTC+13, Deepak kumar wrote: 
> Is there any way to avoid warning  "***note*** handling a large file" while 
> opening a large file?

The message comes from the LargeFile.vim plugin, so you could just find from 
where it's being loaded, and remove it.  You could run :scriptnames to see 
where it came from.

Or, to disable it you could add 

let g:loaded_LargeFile = -1
 
to your .vimrc.

If you want the functionality, but just don't want the message, you could hack 
the plugin.  It's quite simple and short.

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: vim syntax file for grub 2 grub.cfg

2018-10-15 Thread John Little
Before someone leaps to point this out, note that grub 2 is "bash-like", and 
the sh.vim syntax is useful, but can be misleading.

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


vim syntax file for grub 2 grub.cfg

2018-10-15 Thread John Little
Has anyone got a syntax file for Grub 2?  The syntax/grub.vim is not useful, I 
presume it is for Grub legacy. vim presently "detects" grub.cfg as a .cfg file, 
which again is not useful.

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: gvim and sliding command output animation

2018-10-14 Thread John Little
On Sunday, October 14, 2018 at 9:58:54 PM UTC+13, Steven Holt wrote:
> In gvim, the output is sliding line by line from the status line to the
> top window edge which takes maybe a second or two ...

I don't see this, gvim 8.1.0438 Huge version with GTK2 GUI, on Kubuntu 18.04. 
:ls on 116 buffers and a vertically maximized gvim is imperceptible. (If I 
maximize horizontally as well, I get an annoying status line flash ⅓ and ⅔ up, 
but it's quick.)

So, what OS, DE, and vim version?

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


isident and iskeyword treat @ differently

2018-09-18 Thread John Little
(On Linux with encoding=utf-8) After

:set isident=@ iskeyword=@

\k matches Greek letters, but \i does not.  The help states that both have the 
format of isfname, which says 

Multi-byte characters 256 and above are always included, only the
characters up to 255 are specified with this option.

While I'm at it, \k (and \f) do not match some punctuation, even above 256. For 
example, 

; U+037E GREEK QUESTION MARK

IMO this is good, perhaps the help should be revised.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: editing textareas in Firefox with vim

2018-08-26 Thread John Little
On Saturday, August 25, 2018 at 11:25:19 PM UTC+12, Michael Henry wrote:
> I've been using "textern" for this...

Fantastic, I didn't know about this option.  I'm typing this in gvim using the 
add-on.

>...
> - Press Ctrl-Shift-E to bring up editor.

It defaulted to Ctrl-Shift-D.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: why is cut and paste broken on X11?

2018-08-06 Thread John Little
On Mo, 06 Aug 2018, ruben...@my.liu.edu wrote:

> Why is it that X11 cut and paste has been broken for a couple of years
> now and that it is not being fixed.  It worked fine for 30 years.

What OS and desktop environment do you use?  Vim's use of the selection and the 
clipboard didn't change at all, but in KDE I noticed a change in behaviour with 
plasma 5, in that I often found the selection and the clipboard were different 
and not what I wanted.  The clipboard "plasmoid" has a setting to synchronize 
them, which works well with ASCII but can give problems otherwise due to 
historic X11 brokenness.  Vim has many settings to cope with this, I suggest 
you have a look at :help 'clipboard'.  So your change in behaviour might be in 
X or a clipboard manager.  With Wayland coming I don't know what will happen.

Another source of trouble in recent years, if you use vim rather than gvim, is 
"bracketed paste mode".  IMO vim has been on top of this, but the 
implementations in various terminal emulators have had problems.  Many 
emulators claim to emulate an xterm but how well varies.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Formatting text and using the convention of putting 2 spaces after a period

2018-08-06 Thread John Little
On 06.08.18 11:40, David Woodfall wrote:
> ... vim will change some of the spaces after a period into two spaces...

On Monday, August 6, 2018 at 11:08:12 PM UTC+12, Erik Christiansen replied:
> AFAICT it's an Americanism, judging by occurrence. It defeats simplistic
> automated removal of erroneous double spaces between words.

My understanding is that in print typesetting, more space was often used after 
a sentence than between words (though it could get complicated, depending on 
the font, the space needed for justification, and the first letter of the 
following sentence).  With typewriters, to mimic this, the practice of two 
spaces was adopted.  So, for text to be rendered properly in a variable width 
font one space is best, but with a monospace font, aka a typewriter font, such 
as vim uses, some of us cling to two spaces.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Interloper vi

2018-08-01 Thread John Little

On Wednesday, August 1, 2018 at 4:24:14 PM UTC+12, Suresh Govindachar wrote:
...
>  $ alias  vi
>  bash: alias: vi: not found

reveals your shell is bash.

>  $ which vi
>  /lhome/me/tools/bin/vi

"which" is not what you want with bash.  It is /usr/bin/which, not a bash 
built-in, so it doesn't tell you what bash will do. In a new bash window, if I 
run:

$ type vim
vim is /usr/local/bin/vim
$ vim -c q
# the screen clears...
$ which vim
/usr/local/bin/vim
$ type vim
vim is hashed (/usr/local/bin/vim)

So, better use "type".  Seeing vim hashed to something you don't expect would 
at least be a hint towards Tony's advice to try hash -r.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: syntax highlighting not correct in bash script

2018-07-29 Thread John Little
With the vim 8.1.0224 from git, I see the problem.  (BTW, the colours depend 
totally upon the colour scheme being used, so characterizing the problem by the 
colours seen isn't very useful. Maybe using the default scheme, starting vim 
with --clean -N could be.)

The problem causes the syntax colouring to lose track of what is quoted, and 
following lines of script are coloured as if quoted.

The maintainer of sh.vim has fixed quoting problems in his latest version, 179, 
at http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH and indeed version 
179 colours your snippet correctly for me; it works with the 8.0.1453 I get 
with my distro, derived from Ubuntu 18.04, so I expect it will work for you.

I imagine your snippet is a minimal example of the problem, kudos for that, but 
still looks pathological to me; I avoid tricky stuff like that for the sake of 
my sanity.  

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: gvim8.1 on ubuntu

2018-07-21 Thread John Little
On Friday, July 20, 2018 at 11:48:12 PM UTC+12, Robert Solomon wrote:
> I cloned the github source and compiled vim 8.1.  That went smoothly.
> 
> How do I get gvim 8.1 on Ubuntu?

I'm not sure I understand your question, and I take it differently to Christian 
Brabandt.

If your newly built vim does not have a GUI, as shown by :ver, or vim 
--version, then configure didn't find the needed GUI headers and libraries, and

sudo apt-get build-dep vim-gtk

will get what you need, assuming your Ubuntu version is still in support. 
(14.04, 16.04, 17.10, 18.04).  Then 

make reconfig

will rerun configure, and it should find the GUI, these days that's the 
default.  

If your :ver output shows a GUI (mine straight from git master says "Huge 
version with GTK2 GUI") then you have gvim; on *n?x the same executable is used 
for gvim.  Run it with

vim -g

or use the :gui command to confirm this.  

Either way, 

   sudo make install

makes /usr/local/bin/gvim a link to vim, to completely answer your question.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Remember last command?

2018-07-18 Thread John Little
On Thursday, July 19, 2018 at 7:35:22 AM UTC+12, Bill Tugger wrote:

I'm not sure the other responders are really addressing your question.

> I'd like to also have the repeat command (.) be remembered.

Actually, IIUC, no. See :help 'viminfo' for what can be saved.  Note that 
"registers" are saved, and registers are where recorded macros go,  so, one 
work-flow that might suit you is to record macros for the changes you make.

But, I suggest a solution would be to *not exit vim* after each file.  Naybe 
use the arg list, so :w then :n to the next file, and . will work nicely.  If 
there are several changes, :rewind the list for each change.  If the list of 
files can't be determined at the beginning of a session, after writing a file, 
:e the next, or use drag and drop in a GUI.  

I suppose you're really asking for vim to always record to, say, the "unnamed" 
macro, so that the viminfo mechanism could save and restore it.  I googled for 
"vim automatic macro record" and "vim always record macro" with no pertinent 
results; I thought maybe someone had done a plugin to simulate it.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: "best" terminal library for vim

2018-06-23 Thread John Little
On Saturday, June 23, 2018 at 5:30:54 PM UTC+12, tu...@posteo.de wrote:

> ... a Raspberry Pi Zero W ...

I know next to nothing about Rasberry Pis, but ...

Assuming you're running Raspbian, which is a debian distro, so uses APT,

apt-get build-dep vim

will get you all the packages recursively, including library ones, that the 
Raspian packagers used to build their vim.  The package list shows this as vim 
7.3, so for vim 8 something else might be needed, but the above would at least 
be a very good start IMO.

I wonder how well vim-gtk runs on a Pi...

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: t_kB (shift tab) is not set when using st terminal

2018-06-04 Thread John Little
On Monday, June 4, 2018 at 5:08:05 PM UTC+12, phkbphkbphkb wrote:
> ... t_kB is not set on 
> st (https://st.suckless.org/) 

I think it is.  I downloaded the st-0.8.1.tar.gz from there, extracted st.info, 
ran 
tic st.info
TERM=st-256color vim -c 'echo _kB'
and it shows ^[[Z. (I ignored the tic warnings about unknown capabilities.)

Maybe your OS-level terminfo is old, try the above.  

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: compressed undofiles

2018-06-03 Thread John Little
On Sunday, June 3, 2018 at 3:48:59 PM UTC+12, Adam Monsen wrote:
> I use undofiles heavily. 

> Anyone interested in compressed undofiles?

If you use a file system that supports transparent compression by directory, 
like btrfs or NTFS, there'd be no need for support in vim.  (Historically 
people were warned off such compression because of the overhead, but you're 
implicitly accepting that overhead, and with lots of cores these days...)

So, if you're on Windows, you're good to go.  If on Linux, btrfs is a good idea 
anyway IMO.

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: VIM Advanced text string search HELP

2018-05-25 Thread John Little
It may help if you can start vim in non-compatible mode, such as with 

vi -N

I suggest also turning on search highlighting:

:set hlsearch

If the path you want to replace does not have any dots, I would first search 
for the text that needs to be replaced, perhaps

/\/\/\/[^.]\+\/

With search highlighting, you can see what's been matched.  When you're happy 
with it,

:%s##///new/path/to/file/

(Note the # above is an arbitrary choice, usually one uses / but that's messy 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Who maintains cobol.vim?

2018-05-20 Thread John Little
On Sunday, May 20, 2018 at 7:19:28 PM UTC+12, Martin Lindkvist wrote:
> Could you please pint me to the correct place to get this vim files 
> I have found them at various places but it would be nice to know that the one 
> i use is the most resent and best working one

(A blast from the past... I haven't had the slightest thought about cobol for a 
long time.)
In your vim, look in

:edit $VIMRUNTIME/syntax/cobol.vim

The latest has:
" Last Change:  2015 Feb 13

To answer your question, vim is on github:

https://github.com/vim/vim/blob/master/runtime/syntax/cobol.vim

That says the file was changed on 1 September 2016; I suspect that was a vim 
facing change, rather than to do with cobol.

However, taking files individually may not be a good idea; if you can cope with 
an 80 MiB download following the instructions at https://www.vim.org/git.php 
could be better.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


options window ignored

2018-05-15 Thread John Little
I must be missing something here. :h :options says
"For window and buffer specific options, the last accessed window is used to 
set the option value in"
But the options window is ignored.  F. ex.

If I start vim with 
vim -u NONE -U NONE -i NONE -N 
then I type
200ii
and press escape, 200 characters are wrapped onto 3 lines, then
:options
move the cursor to 4 displaying text, press enter, move the cursor to the line 
with "set wrap", press enter, and it toggles to "set nowrap".

But the wrap option in the window with 200 i's is not affected.


-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: shtags.pl

2018-04-02 Thread John Little
> I don't have the man page unfortunately.

I found the man page in

$VIM/runtime/tools/shtags.1

the same place as shtags.pl. It doesn't get installed, my post was partly about 
mentioning how I accessed it. I imagine that on a vanilla Windows OS nroff 
style man pages are problematic.

I've sometimes handcrafted tags extractors in the past, and used them a lot, 
but maybe that doesn't appeal to most; there might be some unfortunate person 
somewhere maintaining a lot of scripts that will be greatly helped by what 
you've brought to light. 

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: shtags.pl

2018-04-02 Thread John Little
I was startled to see 

# Last Changed: 96/11/27 19:46:06

I tried it on my sundry scripts and it produced nothing, not recognizing bash.
Wait, there's a man page... man man to work out how to see it... 

man -l shtags.1

so 
shtags.pl -s sh -v *.sh

works for me.  If vim continues to distribute this, I think your patch should 
be applied.  The opinions of the maintainers of {syntax,indent,ftplugin}/sh.vim 
might be sought.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: opinion: 'set showmatch'?

2016-09-11 Thread John Little
I use both. You may want to tune the 'matchtime' option; the default, 5, gives 
half a second which for me is too slow for typing parentheses. I use a 5 Hz 
cursor blink, so I set matchtime to 2.

Regards, John Little 

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: wwhat's wrong with my map in my vimrc file?

2016-08-06 Thread John Little
On Friday, August 5, 2016 at 9:22:02 PM UTC+12, 李哲 wrote:
> nnoremap  h
> nnoremap  l

> the key map dosent work

Your OS or window manager might use those.  Mine (KDE) uses C-A-l to lock the 
session.  To find out if you can map them, start your usual vim, go into insert 
mode, type ctrl-V then the key combination you're interested in.  If something 
is inserted into the buffer, then vim can see it, but if not, vim can't see it 
and you can't map it.

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: evalutate $vim as argue of a command line

2016-07-03 Thread John Little
On Friday, July 1, 2016 at 10:38:43 PM UTC+12, Ni Va wrote:
 
> command! -nargs=+ OutSay  :let g:out=system("".) | enew | 
> put=g:out
> 
> It works well but I need to pass $vim value as args of command in order to 
> execute this :
> 
> OutSay 7z a Vim.7z $vim

If I set $vim in bash before starting vim, say
$ export vim=~/test

Then 
OutSay 7z a Vim.7z $vim
works for me, in that 7z runs and compresses ~/test into Vim.7z.  

"$vim" looks unusual for an environment variable, don't you mean "$VIM"?  Case 
is significant in environment variable names, on unix and Linux anyway, not 
sure about windows and Mac OS.

If I run

 OutSay 7z a Vim.7z $VIM

I get 1613 more lines, and Vim.7z is created, about 5 MiB.

Regards, John Little




-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Help in writing vim script

2016-06-15 Thread John Little
On Wednesday, June 15, 2016 at 7:03:20 PM UTC+12, Siddhant Gupta wrote:
> I have a variable containing Result: "/tmp/abcd/1234", I want to extract 
> /tmp/abcd/1234 in another variable.How can I do this?

That depends on what you want to match around what you want.  Matching the word 
Result and the colon and quotes, and assuming there's nothing else,

let x = 'Result: "/tmp/abcd/1234"'
let y = substitute(x, 'Result: "\(.*\)"', '\1', '')

is one way to do it.  Add .* to the beginning or end or both if there's 
characters to ignore there.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Using gx with text-only browser

2016-04-02 Thread John Little
On Sunday, April 3, 2016 at 3:44:25 AM UTC+12, Peter King wrote:

> Worked like a charm!  How in the world did you ever know enough to figure
> that out?

Netrw is well instrumented for debugging, and I've chased down problems in it 
before.  I just followed the instructions at :help netrw-debug.  Seeing the 
command that was being run the problem was obvious, and /dev/tty is an ancient 
Unix pseudo device for this sort of thing.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Using gx with text-only browser

2016-04-02 Thread John Little
On Friday, April 1, 2016 at 8:44:50 PM UTC+13, Peter King wrote:
> I usually use nvim at the console and would like to set gx to open a URL
> under the cursor with /usr/bin/links... All that happens, though, is that
> the console screen blinks while the lookup silently fails.

Netrw is redirecting standard input and output to /dev/null, to avoid browser 
messages; this directly clobbers links' IO.  It's running, you just can't see 
it or type anything into it.

As a workaround, create a script called, say, vimlinks, in your $PATH with the 
following:

#!/bin/bash
links /dev/tty 2>/dev/tty "$@"

chmod +x it:

chmod +x vimlinks

then in vim use

let netrw_browsex_viewer = "vimlinks"

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: How do I add the option +xterm_clipboard to terminal vim

2016-03-14 Thread John Little
On Friday, March 11, 2016 at 11:12:49 AM UTC+13, Bee wrote:

> BUT I wanted to learn how to compile vim terminal with different options.

I have two suggestions:

1.  In a terminal run
   sudo apt-get build-dep vim

Gets all the libraries and headers you need to build vim.  The command applies 
to any debian distro, like Ubuntu.  I assume you've installed the 
"build-essential" package

2. Read Tony Mechelynck's guide at 
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm

I particularly like his method of setting up configure options using 
environment variables via a script.  For your "different options" you would 
have different scripts.

Regards, John Little



-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: problem with a map

2016-02-15 Thread John Little
On Monday, February 15, 2016 at 1:12:54 PM UTC+13, andalou wrote:

> For example, on the following text ...

I tried to work out what was happenning but failed; the escape character messes 
up the quoting in the mapping, and I couldn't fix it.

However, the substitute command can do this cleanly:

:map ,p :%s/^\(\d\+\.\)\n\n\(.*\)$/\r\1\2

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Cursor behaviour change?

2016-02-15 Thread John Little
On Tuesday, February 16, 2016 at 1:28:12 AM UTC+13, Christian Brabandt wrote:

> https://groups.google.com/d/msg/vim_dev/BzdeOuKtAmU/6NL-ovunDQAJ

Sorry for the noise, I've just retested with the vim I built yesterday, and the 
fix is there.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Cursor behaviour change?

2016-02-15 Thread John Little
On Tuesday, February 16, 2016 at 12:31:17 AM UTC+13, Christian Brabandt wrote:

> I think this is a bug in the matchparen plugin. You might need to update 
> your vim. 

If it is indeed a matchparen bug, updating vim won't help, as I've just updated 
from github and the plugin hasn't changed and still gives the problem.

To see otajuun's problem I have to
set noai nosi nocin
(no autoindent, smartindent or C indent)

If I suppress the matchparen plugin by adding
   let g:loaded_matchparen = 1 
to my .vimrc, the behaviour stops.  This might be a workaround for otajuun.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Feature or bug? Funny behaviour of cw on whitespace.

2016-02-12 Thread John Little
On Friday, February 12, 2016 at 1:53:00 AM UTC+13, Erik Christiansen wrote:
> But ":h cw" opens with a defence of this "Special case: ...change-word". 

It doesn't say why though, and the reason IIUC is that vi did it that way, and 
it's such a basic command that millions are used to it.  IMO we'd be better off 
with consistency, c{motion} is like d{motion} then enter insert mode, without 
this special case, but after 40 years...

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: How would you repeatedly produce these lines?

2016-02-02 Thread John Little
A plug for Al's second solution, IMO an idiom worth learning because it's so 
flexible. Any start value, any increment or decrement (or more general, f. ex. 
geometric, say increase by 10%, or maybe random), and no need for the items to 
be contiguous, just to match a regex.

Regards, John Little 

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Compile error: error: 'prep' undeclared

2016-01-05 Thread John Little
On Tuesday, January 5, 2016 at 1:22:56 PM UTC+13, Bernd Eggink wrote:
> When trying to compile vim on Linux (Crux) ...

This question would be better posted in vim_dev, it's very on topic there.

Patch 7.4.1027 did not apply correctly for you.  It renamed hexp as prep as a 
parameter to vim_str2nr in charset.c.  How do you get your source?

Regards, John Little
 

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: vim: register * and + missing in ubuntu1404 server

2015-11-18 Thread John Little
On Wednesday, November 18, 2015 at 5:15:31 PM UTC+13, ping wrote:
...
> I recently switch from ubuntu desktop to ubuntu server , both are 14.04.
> and I couldn't find the register * and +.
...
> although I'm a console vim user...

vim on unices uses X for the clipboard and selection.  If no X server is found, 
I think the * and + become synonyms for the unnamed register, and not shown in 
the :registers display.

Maybe you're thinking of gpm mouse support.  Install the package gpm, and with 
set mouse=a in your .vimrc, a middle click does a paste, but from the unnamed 
register; you still don't get a separate "* and "+ AFAICS. If you want to copy 
outside of vim then paste in it, 
set mouse=
or
set mouse=nvc
then in insert mode vim won't see the middle click, and you'll get gpm's 
selection pasted.

For completeness, if there is an X server running on the machine where you're 
using the console, you can

export DISPLAY=:0

to get vim to use it, but the default setting for the 'clipboard' option 
includes "exclude:cons\|linux" which explicitly turns that off.

HTH, 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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: vim: register * and + missing in ubuntu1404 server

2015-11-18 Thread John Little
I said:
> ... gpm mouse support ... you still don't get a separate "* and "+

Random832 wrote:> 
> Why not? gpm has a selection and can be used to paste between virtual
> consoles or in non-gpm apps. Does it not expose it to applications?

I imagine it does, but no-one has taken the trouble.  gpm isn't very active.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Console vim beeps with file beeper.txt

2015-11-14 Thread John Little
On Sunday, November 15, 2015 at 12:46:38 PM UTC+13, Suresh Govindachar wrote:

> vim beeps using attached beeper.txt. 

My vim doesn't beep, but it shows the first letter of each line is a chinese 
character.  F. ex., the first line is

謬he Cardini Steal

(I imagine you are using a font that can't display the characters, and you get 
a beep when the character fails to display, or maybe some of the junk that 
results gets you a beep.)

Clearly, that first character is meant to be some kind of T.  I think you've 
got an encoding problem.  You might inspect the headers of the web page you 
copied the text from to find what encoding it uses.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: slow display update, maybe due to folded text

2015-10-18 Thread John Little
On Thursday, October 15, 2015 at 12:24:31 AM UTC+13, Tony Mechelynck wrote:

> konsole is supposed to emulate an xterm (I use konsole 2.14.2 from KDE
> 4.14.9 and it sets $TERM=xterm and v:termresponse to some xterm-like
> value). Have you tried the settings listed under ":help xterm-blink"?

At the best of times konsole doesn't emulate xterm from a user's perspective, 
at all.  Rather, the perspective of a programme running within a konsole.  (I 
do indeed have those xterm settings, for the occasions I do fire up xterm.)  
However, plasma 5.2 (ahem, "KDE Frameworks 5.9.0") is far from the best of 
times, there's breakage all over the place, even in konsole; f.ex. it used to 
honour --geometry.  I hope the situation will improve with Kubuntu Wily 
Werewolf ("KDE Frameworks 15.08"), coming in three days.  I would be far better 
off on KDE 4, but haven't been pushed enough yet.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: vim and touch typing

2015-10-14 Thread John Little
On Friday, October 9, 2015 at 10:57:14 PM UTC+13, Filype Pereira wrote:
 
> I have improved so much this week already.

A tip if you are touch typing and sitting at the keyboard in a good position 
for your hands in the home position: move the mouse to your left hand.  Even 
for the right-handed, two weeks on the left and most people don't go back.  The 
keypads on the right push a mouse on the right too far for comfort.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: slow display update, maybe due to folded text

2015-10-14 Thread John Little
On Monday, October 12, 2015 at 12:02:43 PM UTC+13, Paul wrote:

> Is there an (uncomplicated) way to
> ameliorate this problem?

IMO you have an insufficiently conspicuous cursor.  I use gvim with 

set guicursor=a:blinkwait200-blinkon200-blinkoff200

in my .gvimrc for a 5 Hz blink.*

Regards, John Little

*I know I'm in the minority liking a blink, but I think I save at least half a 
second every time I'm looking for the cursor. 

For vim in a terminal emulator, over the years I've resorted to various 
(sometimes desperate) hacks to speed up the blink.  For example, I'm presently 
using KDE plasma 5.2 and there's no configuration for the blink rate yet in Qt 
5, except to compile a C++ fragment to a .so and preload it with  LD_PRELOAD.



-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Vim red text is blurry.

2015-10-11 Thread John Little
On Sunday, October 11, 2015 at 7:11:16 PM UTC+13, Mini UN wrote:
> Hello, I need to fix the vim red colour which makes the text blurry.
> Any suggestions please?

That sounds like "Draw intense colour in bold font" for an ANSI red (which is 
otherwise too dim), in a font that doesn't have proper bold so it gets a fake 
smeared out bold font.  But we're guessing unless you tell us OS, gvim or vim, 
font, and if vim which terminal emulator, and maybe which vim colour scheme.

> Hmmm, strangely, I can't attach the image to this post.

Using the Google Groups (https://groups.google.com/)?  Maybe if this is your 
first post, or you're not a member, a spam control measure stops you.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: vim and touch typing

2015-10-06 Thread John Little
On Tuesday, October 6, 2015 at 10:14:59 PM UTC+13, Filype Pereira wrote:

> > If you can't touch type, then go learn it and then come back to learn vim.

I would disagree with this.  I used vi effectively for years before I learned 
to to touch type, and, like vim, I have several modes, depending on the task at 
hand.  One-handed, using the mouse a lot, using the arrow keys a lot, hands at 
the home position, leap to mind.  Not many people touch type a regex I bet. 

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Copy text and Paste at multiple lines

2015-08-29 Thread John Little
On Saturday, August 29, 2015 at 2:36:43 PM UTC+12, ali jaan wrote:
 Say i had a text like this 
 baseline string a;
 baseline b;
 baseline c;
 baseline d; 
 
 I need to have like this 
 baseline string a; 
 baseline string b;
 baseline string c;
 baseline string d;
 
 Q1.I wanted to copy string and Paste across different lines at a single
 shot .How can i do this.?

If, as in your example, the lines are contiguous, read on.

visual block put.  See :help v_p.  It's a bit tricky, but will do the job.  
First yank the text you want to copy, then start a visual block down the spaces 
at the end of baseline, and press p.  The pasted string will *replace* the 
visual block, and you can't have a zero width block.  If you want to keep the 
contents of the block, press p again.

 Q2.I wanted to copy  a text from unix terminal/from different Vim file.How
 can i paste that string in multiple lines at a single shot? 

Again tricky, the setting of the 'clipboard' or 'guioptions' settings interfere.
You probably have a for autoselect in guioptions, which means when you 
start the block mode, the contents of the block becomes the X selection, 
forgetting the text you want to paste.  If you have autoselect on:
- You can use the X clipboard; at the source, after selecting do an 
explicit Copy operation (like you have to on Windows).  Then, after making 
your visual block, use +p to paste from the clipboard.
- You can copy the text to be pasted before starting the visual block.  One 
way is to paste it (using *p or middle-mouse) and immediately delete it.  
Another,
 :let @ = @*  copies the selection to the unnamed register

HTH, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: gVim closing randomly.

2015-08-27 Thread John Little
On Thursday, August 27, 2015 at 9:14:20 PM UTC+12, Paul Isambert wrote:
 Vim (GUI) ... simply closes abruptly...

How are you starting gvim?  If you start it in a terminal window, there might 
be messages from vim saying what's happening.  If I start gvim in a terminal, 
then pkill it, a message appears in the terminal where I started it.


-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: dot in iskeyword in C and sh files

2015-08-06 Thread John Little
On Thursday, August 6, 2015 at 10:54:07 PM UTC+12, olaf wrote:

 No reason given why a dot should be part of a word.

The Korn shell, ksh, has a syntax using dots; some kind of vaguely OO 
attributes.

$ x=bob
$ x.y=carol

A lot of ksh-isms found their way into POSIX, but not this one I think.  Does 
anyone still use ksh?

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: There is a mistake in my « makefile »

2015-07-27 Thread John Little
I certainly agree with Eric and Gary in their advice, but I will mention a tip 
about vim and traditional makefiles: setting these vim options

:set list
:set listchars+=tab:.

Makes visible the crucial tab character that makefiles must have at the 
beginning of command lines.   You can put these two lines in

$HOME/.vim/after/ftplugin/make.vim

to have them invoked automatically.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: I cannot realise a :map why ??

2015-07-21 Thread John Little
On Tuesday, July 21, 2015 at 8:02:15 PM UTC+12, aubertin.sylvain wrote:
 Following VIM Manual (by Moolenaar) I type :
 :map F9 ipapaEsc (5 characters for Esc and 4 characters for F5 )
 But it doesn't work. Instead of « papa «  , it returns F9
 Something is wrong, but where ??  

That's a normal mode mapping, you appear to be want it to work in insert 
mode.  Try
:imap F9 papa

 If you are shaky on modes, you could start at :help 02.2, The Vim editor is a 
modal editor.  If you understand modes, check out :help map-modes.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: expanding a (g)vim snippet from menu

2015-06-14 Thread John Little
On Saturday, June 13, 2015 at 8:22:01 PM UTC+12, Rudra Banerjee wrote:
 an  SnippetTab`prg :execute 'imap `prg prg' . :UltiSnipsExpandTrigger . 
 'Escgg=GC-j'

Your problem is being caused by the Esc and NL characters; they are causing the 
execute to finish early.  I'm not sure whether they should, but this hinted at 
a solution.

As well, I get 

E331: Must not add menu items directly to menu bar

if I use your menu command, and it should have cr on the end.

Breaking up the Esc and C-J to delay their evaluation seems to work:

an  My.SnippetTab`prg :execute 'imap `prg prg' . g:UltiSnipsExpandTrigger.'E
sc'.'gg=GC'.'-j'cr

I say it seems to work because the output of imap appears as desired; I don't 
have UltiSnips so I haven't invoked the mapping.

When selected off the menu, this gives an annoying Press Enter or type command 
to continue prompt, because the execute is so long.  It can be ignored, or see 
:help hit-enter 
for a discussion.  If g:UltiSnipsExpandTrigger doesn't change much you could 
copy it to a shorter variable I suppose.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Regex stealing from another history

2015-06-14 Thread John Little
On Sunday, June 14, 2015 at 3:59:56 PM UTC+12, meino@gmx.de wrote:
 Is there any way to access commands beyong the current valid
 history?

Well, there's the histget() function, so I'd expect there's a way with lots of 
tricky vimscript.

However, how about using the command-line window:
- in the middle of typing your : command, press ctrl-f
- press /, and scroll up to the search you want
- press enter, and the command window will be searched, and hopefully fail
- press a ctrl-r /

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Convert dot command into macro

2015-06-14 Thread John Little
On Friday, October 19, 2007 at 3:59:15 PM UTC+13, Ben Schmidt wrote:
  Here is a patch...
I have wanted this since my vi days.  

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Changing vim graphical mode to handle colors like in color terminal mode

2015-05-25 Thread John Little
On Monday, May 25, 2015 at 8:13:56 PM UTC+12, Michael Darling wrote:
 I'd like to have vim in graphical mode handle colors (default fg/bg color, 
 syntax highlighting) handle it the same as in color terminal mode.
 
 What's the easiest way to do this?  Is there an option, or do I need to 
 change my local source?

You definitely don't want to change C source code. Vim's colors are specified 
in color scheme files, which are in vimscript, not in C. 

It sounds like you don't understand vim color schemes; my apologies if you do.  
What color schemes are you using in color terminal mode and gvim? I suggest you 
have a look at the files in $VIMRUNTIME/colors, particularly the README.txt 
there.

If you are using the same colorscheme in both modes, and the colors don't 
match, the mapping from XTerm 16, 88 and 256 color modes to RGB can be 
determined, so you could edit a colorscheme so that they match.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: vim with Windows developments under linux and git

2015-05-23 Thread John Little
On Saturday, May 23, 2015 at 3:08:01 AM UTC+12, pcouderc12 wrote:

 Is there somewhere an howto  for good practices, particularly to set 
 vimrc ?

People's preferences vary widely, particularly with these DOS/unix compatiblity 
issues, so I doubt you'll find a widely accepted good practices guide.

I would suggest, though, including the 'fileformat' setting in your status line,
and setting 'laststatus' to 2 so that a status line always appears.  This way 
you see what vim thinks the file is.

Usually for my stuff I want unix endings, even when on Windows, so I suppress 
the fileformat if it's unix, but use a different colour if it's dos, so my 
statusline setting  includes
 %1*%{ff=~'u'?'':ff}%*

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: leaving message buffer open

2015-05-10 Thread John Little
On Saturday, May 9, 2015 at 1:13:54 PM UTC+12, Mark Volkmann wrote:
 Is there a way to open the message buffer in a window so it is always visible?

Often, increasing the command height is enough.  Either, say,

:set cmdheight=10

or with gvim or vim with mouse handling, drag the status line up. Reissuing 
:messages works well with this.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Add milliseconds to strftime()

2015-04-24 Thread John Little
On Friday, April 24, 2015 at 6:02:04 PM UTC+12, av wrote:

 I'd like to know if it is possible to get the milliseconds() in this 
 expression for example:
 
 echo strftime(%Y-%m-%d_%H:%M:%S)

As Paul Isambert says, vim strftime is based on the C function, which uses a 
struct tm that has no field for parts of a second.

If your vim has python (look for +python in your :version output), you can ask 
python, f.ex. in vim
 
:python import datetime
:python print datetime.datetime.now().strftime(%H:%M:%S.%f)

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: How to recursively add an entire directory with all its sub-directories to PATH global setting?

2015-02-27 Thread John Little
On Friday, February 27, 2015 at 8:54:16 PM UTC+13, Bao Niu wrote:
 For example, if I had this folder structure:
 
 ../Main/Sub1
  --/Sub2
  --/Sub3/GrandSub
 
 How can I make my GVim automatically add all the subfolders under Main to the 
 PATH setting?

set path=../Main/**

See :help file-searching for the details.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Combine . with @:

2015-02-23 Thread John Little
On Tuesday, February 24, 2015 at 3:47:10 AM UTC+13, Paolo Bolzoni wrote:

 It is possible to change the meaning of . 

IMO we can't change the meaning of .; too many of us rely on it working the way 
it is.  

It sounds like you want to record a macro.  Maybe vim could always record a 
default macro if it's not otherwise recording; often I find myself regretting 
I should have recorded that. Sorting out what resets that recording might be 
difficult...

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: vim: least key stroke to replace a word

2015-02-17 Thread John Little
On Wednesday, February 18, 2015 at 7:18:15 AM UTC+13, ping wrote:
 experts:
 I know this looks stupid and simple, but I don't know the answer right now.
 
 say I want to replace a word :
 
 from:
 
 abc 456
 
 to:
  123456
 
 what I did is:
 1. put my cursor in a, then cw123escx  , 7 strokes
 2. put my cursor in b, then caw123esc, 7strokes
 3. put my cursor in a, then dwi123esc, 7 strokes
 
 it looks cw and dw behaves non-consistently, which I know is by the design.
 
 I'm editing an old doc full of typos and spelling errors, etc, and I
 need to do this quite often, does anyone knows of a
 least-strokes-method (to protect my fingers) ?

4s123esc is one less, but your eyes have to do the count; my eyes move more 
easily than my fingers, so that's I do.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Who maintains cobol.vim?

2015-02-13 Thread John Little
On Thursday, February 12, 2015 at 3:12:02 PM UTC+13, John Little wrote:
 On Wednesday, February 11, 2015 at 8:33:40 AM UTC+13, wexfordpress wrote:
  Believe it or not it was the omission of the word
  IF from the list of reserved words.
...
 My fix ...
 I shall attempt to contact the maintainer...

Tim Pope has responded saying my fix looks good, and will send a new version to 
Bram.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Who maintains cobol.vim?

2015-02-11 Thread John Little
On Wednesday, February 11, 2015 at 8:33:40 AM UTC+13, wexfordpress wrote:
 Believe it or not it was the omission of the word
 IF from the list of reserved words.

From a distant memory, there is a reason for that.  I'm sorry, your first post 
did not trigger the memory, but I've just diffed my cobol.vim from the 
standard one, and that unlocked things.

Your issue has been reported before:
https://groups.google.com/forum/?hl=en#!topic/vim_use/HGGIOkd_XcA

In hindsight, when that I posted to that thread I should have attempted to 
contact the syntax file's maintainer.  (I suppose I assumed that he would have 
seen the thread.)  I wasn't confident that my proposal was the best one, and 
I've never used vim with cobol, and only rarely ever saw legacy cobol let alone 
worked with it, though I did do lots of cobol-85 in free format.

My fix to the issue was to add cobolBadLine to the list of contained groups in 
the definition of cobolCondFlow:

  syn region  cobolCondFlow contains=ALLBUT,cobolLine,cobolBadLine 
start=\\(IF\|INVALID\|END\|EOP\)\ skip=/\('\|\)[^]\{-}\(\|'\|$\)/ 
end=\. keepend

I shall attempt to contact the maintainer.  Again, sorry I didn't sort this out 
three years ago.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Locating the cursor

2015-02-10 Thread John Little
On Wednesday, February 11, 2015 at 4:48:12 AM UTC+13, Paul wrote:
 
 I'm using Cygwin's X-windows.  

Seems like you have an insufficiently visible cursor.  In gvim I use

  set guicursor=n-c:hor20,v:hor25,ve:ver35,o:hor50,i-ci:ver25,
\r-cr:hor35-ErrorMsg,sm:block
   this looks odd, but it works; the second setting of guicursor does not undo
   the previous settings
  set guicursor=a:blinkwait200-blinkon200-blinkoff200

for a 5 Hz blink.  

Regards, John Little


-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: why function! instead of just function

2015-01-20 Thread John Little
 On 2015-01-19 20:31, Bao Niu wrote:
 function! vs. function? 

On Tuesday, January 20, 2015 at 5:49:55 PM UTC+13, Tim Chase replied:
 If a function already exists with the same name as you want to
 create, the ! will tell it to overwrite the previously-existing
 function.

I'll add that many vim commands work like that, going back to the original vi, 
where f.ex.

:w! foo.txt

overwrites any existing foo.txt.  However, for some commands an added ! 
indicates an alternate behaviour without any overwrite any existing or 
really do it connotation.  Blame the original vi, if you like, f.ex. :map! 
specifies mappings in insert mode.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: netrw - file selection in column mode (liststyle=2)

2015-01-14 Thread John Little
FWIW. I see the problem, in netrw152 and with -u NORC -N. I'll try the latest 
in a moment.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: netrw - file selection in column mode (liststyle=2)

2015-01-14 Thread John Little
I see it with netrw153.

In autoload/netrw.vim, the NetrwLocalRm function takes a range, firstline to 
lastline.  It loops through the range:

   let ctr = a:firstline
   while ctr = a:lastline
exe NetrwKeepj .ctr

This sets the cursor to the first non-blank character of the line, if the 
'startofline' option is on (which is the default) and so the following call to 
NetrwGetWord finds the word at the beginning of the line.

I imagine Dr Chip uses nostartofline.  If I set nosol in my .vimrc, the problem 
does not occur.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: VIM on a small embedded system

2014-12-07 Thread John Little
Not what you asked, but usually with a slow, or difficult to get to platform 
it's better to run vim locally, on the PC with the keyboard, and use netrw to 
edit files on that platform.  Since you've got ssh working on the Arietta, scp 
should work, f.ex.
vim scp://hostname/path/to/file

Have a look at :help netrw

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: :%s//\=@o/gce ignores c flag in key mapping

2014-11-18 Thread John Little
Not much to the point, but I couldn't let this pass:
porphyry5 said:
... I used a plain numeric index as I figured it must use an address array to 
reference the words array, and with a numeric index I could use a binary 
search pattern to locate the word.  I think an associative array must use a 
linear search... 
Associative array implementations usually use some kind of hashing, with mostly 
constant time look ups. You can tell if you iterate over the keys and they come 
in some weird order. 

Regards, John Little 

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: ** matches one or more directories, not zero or more

2014-11-11 Thread John Little
On Tuesday, November 11, 2014 9:08:59 PM UTC+13, Christian Brabandt wrote:
 Am 2014-11-10 20:09, schrieb ds26gte:
  This doesn't match shell behavior of ** (for shells that have it, like 
  bash).
 
 Since the behaviour of ** is not standardized and vim is no shell, that 
 is no argument for or against anything.

I beg to differ on that. Vim is obviously copying functionality that came from 
shells.

  Even if ~/**/*.ex is deemed to keep the '/', the empty instantiation
  of the ** pattern would give ~//*.ex, which is equivalent to ~/*.ex,
  as consecutive /'s in a path collapse into a single /, even in Vim.

I agree.

Regards, John Little
 

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


shortcuts for long filenames

2014-10-23 Thread John Little
You could define an environment variable before you start vim, f.ex. 
:e $JQ/filename
Would also be useful if you have to work in that directory at a shell prompt. 

Regards, John Little 

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: FileType event not triggered for make/automake files?

2014-10-22 Thread John Little
On Thursday, October 23, 2014 7:58:18 AM UTC+13, Shahbaz Youssefi wrote:
 I have an issue where it seems like make and automake file types don't 
 trigger the FileType event.

It seems likely you're getting vim's own file type stuff. What does
  :verbose set sw? et? sts?
tell you?  

(Note that setting expandtab for old-style make files is bad, they depend on 
actual tab characters by design.)

If I edit the make file I use for building vim, and run that, I get
  shiftwidth=8
Last set from modeline
noexpandtab
Last set from /usr/local/share/vim/vim74/ftplugin/make.vim
  softtabstop=0
Last set from /usr/local/share/vim/vim74/ftplugin/make.vim

Read :h file-type 

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: problem with menu

2014-10-06 Thread John Little
On Tuesday, October 7, 2014 5:47:30 AM UTC+13, Charles Campbell wrote:

 Result: no menu.

Something like this has been reported here before, see 
https://groups.google.com/forum/?hl=en#!topicsearchin/vim_use/menu$20AND$20author$3Ame/vim_use/KLUfU_1N0Jc

The solution for me was to delete ~/.gnome2/Vim, though Tony reported success 
editing the file to change a flag.

Regards, 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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: problem with menu

2014-10-06 Thread John Little
On Tuesday, October 7, 2014 5:47:30 AM UTC+13, Charles Campbell wrote:

 Result: no menu.

Something like this has been reported here before, see 
https://groups.google.com/forum/?hl=en#!searchin/vim_use/No$20menu$20bar|sort:relevance/vim_use/KLUfU_1N0Jc/rQykDd8hDVkJ

The solution for me was to delete ~/.gnome2/Vim, though Tony reported success 
editing the file to change a flag.

Regards, 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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: readfile() and writefile() in practice

2014-10-06 Thread John Little
On Tuesday, October 7, 2014 9:59:53 AM UTC+13, Benjamin Klein wrote:
 As far as I can tell, readfile() and writefile() have something against new 
 lines...
 Sent from my iPhone

;) I'd guess you're not running Vim on an iPhone (however fun that might be) 
but on Windows.  Looking at the code, I don't think DOS endings are written.  
There is this comment when writing a file:
/* Always open the file in binary mode, library functions have a mind of
 * their own about CR-LF conversion. */

I would expect the written file to be ok when read again by readfile(), or by 
vim if you have unix in your setting of the 'fileformats' option, or even by 
MS Word, but to hammer away on one line if you use the DOS command type, and 
problematic in various Windows utilities, or (I'm guessing here) some Mac 
software. 

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: How to edit remove Linux files on gVim on Windows without 'end of line' character problem?

2014-10-02 Thread John Little
On Wednesday, October 1, 2014 11:59:05 PM UTC+13, Igor Forca wrote:
...line ending problems, diagnosed by converting to hex...

If you have not done so, I suggest reading the help on 'ff' and 'ffs':

:help 'ff

I use a status line (:set laststatus=2) with an expression that warns me if the 
line endings are not unix ones:

set statusline=%%f%1*%{ff=~'u'?'':ff}%*\ %h%m%r%=%-16.(%l,%2c\ \ %L%)\ %P

The bits about the line endings are

 %1* set the highlighting to User1
 %{ff=~'u'?'':ff}   if the ff option doesn't have a u, show it
 %*  reset the highlighting back to the normal status line setting

This way I'm warned if vim reads a dos or mac file; in most colour schemes the 
status line has a contrasting background to the text and User1 doesn't, so the 
break in the background is noticeable.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Odd Vim display behavior in INSERT mode...

2014-09-17 Thread John Little
On Wednesday, September 17, 2014 4:00:26 PM UTC+12, Sonny Chee wrote:
(Please don't top-post BTW.)
 When you say KDE, do you mean the desktop alternative to Gnome?

Well, yes, there's a few.  With Ubuntu there's several flavours, Kubuntu, 
Lubuntu, and Xubuntu at least, running KDE, LXDE, and XFCE respectively, and I 
thought Ubuntu had a desktop called Unity, not Gnome.  Anyway, they all use the 
Ubuntu repositories so 

sudo apt-get install kubuntu-desktop

should pull in KDE that you can choose at login.  

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Odd Vim display behavior in INSERT mode...

2014-09-14 Thread John Little
On Sunday, September 14, 2014 2:16:02 PM UTC+12, Sonny Chee wrote:
 Thanks for insight John.  Do you use an alternate terminal emulator that 
 offers tabs and scrollbars?

(They all do scrollbars I think.)

My DE is the K one, so konsole is the first choice.  I'd resisted it for years  
because KDE has no setting for the blink rate, and the gnome settings has a 
control for it.  I use set guicursor=a:blinkwait200-blinkon200-blinkoff200 in 
gvim, effectively a 5 Hz blink, and the default 1 Hz is just too anaemic. So I 
stuck with gnome-terminal for years, running a gnome-settings-daemon manually.  
Then gnome-terminal started fighting with kwin, and I switched to xterm for a 
while, it has (slightly weird) scroll bars and can set the blink on and off 
times; and it is supported really well.  But I don't think it does tabs, which 
I don't use much anyway, preferring to open lots of windows.

Then I discovered Trolltech.conf has a setting for the blink rate 
(cursorFlashTime), and went back to konsole, which has tabs and nice 
configuration gui stuff.  (With xterm you either learn 100 command line options 
or 100 names of X resources.)

Have you tried KDE?  If you like vim, I expect you'll like KDE.


Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: sorted file takes much longer to load

2014-09-12 Thread John Little
On Friday, September 12, 2014 5:22:41 PM UTC+12, ZyX wrote:
 
 vim -u NONE ++enc=latin1 file.txt
 
 Does not this throw some error in :messages? ++opt is not supported from the 
 command-line.

Yes, thank you.  With -c q it was flashing past too quickly to see.  I was 
misled by this in the help for 'fileencoding':

To read a file in a certain encoding it won't work by setting
'fileencoding', use the |++enc| argument.  

 -c is too late. You must use --cmd, -c runs *after* reading the file. 

Yes, thank you.

vim --cmd set fencs=latin1 file.txt

(finally) works to avoid the slowdown.  

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: sorted file takes much longer to load

2014-09-12 Thread John Little
On Friday, September 12, 2014 3:52:30 PM UTC+12, John Little wrote:
 On Friday, September 12, 2014 2:35:40 AM UTC+12, Charles Campbell wrote:
  Have you tried profiling?
 
 Just did ...

Then I found gprof -l.  It's first couple of lines say

  %   cumulative   self  self total   
 time   seconds   secondscalls  ns/call  ns/call  name
 85.41 48.3648.36 ml_updatechunk 
(memline.c:5035 @ 4d368d)
  7.86 52.81 4.45 ml_updatechunk 
(memline.c:5033 @ 4d36eb)

These are in a for loop:

for (curline = 1, curix = 0;
 curix  buf-b_ml.ml_usedchunks - 1
  line = curline + buf-b_ml.ml_chunksize[curix].mlcs_numlines;
 curix++)
{
curline += buf-b_ml.ml_chunksize[curix].mlcs_numlines;
}

It appears that vim is walking its list of chunks (where it keeps lines) from 
the beginning, for each line of text already read when it changes encoding.  I 
suspect there's several performance opportunities here:
1) The last chunk used by ml_updatechunk is saved in static variables.  This 
mechanism seems to be not working.
2) In my case the vast majority of lines haven't changed, there's no need to 
update anything.
3) Something faster than a linear search might be possible.


Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Odd Vim display behavior in INSERT mode...

2014-09-12 Thread John Little
On Saturday, September 13, 2014 10:23:38 AM UTC+12, Sonny Chee wrote:
 
 Now, I've been using gnome-terminal.wrapper with Vim on Ubuntu laptop without 
 any problems for years.  Anyone have any ideas on why it should not work over 
 ssh?

gnome-terminal changed a lot when it moved to GTK3, and became much less 
tolerant of lots of stuff around it.  I suspect you're on the Ubuntu LTS 
release cycle, which waits till the .1 release 3 months after the .0 before 
offering the release upgrade, so you've just upgraded from 12.04 to 14.04.1, 
and got the new gnome-terminal.  I too used gnome-terminal for years then it 
got snotty with my DE; *from my perspective* infected with Gnome 3 arrogance.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: sorted file takes much longer to load

2014-09-11 Thread John Little
On Thursday, September 11, 2014 10:55:23 PM UTC+12, Tim Chase wrote:
 You've checked that the input and output files are the same size?

To the byte, as is the reverse sorted file.

 I'd also be interested in what Vim thinks the file-type is in each
 case.

That was an early thought, maybe file type detection might be running amok 
inspecting the file.  However, -u NONE should preclude any of that; :set ft? 
says filetype= and :scriptnames says nothing.

Regards, John Little

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


  1   2   3   4   5   6   >