Sunday, February 26, 2017

Re: Can I disable spell checking for Chinese language only?

On Monday, October 15, 2012 at 7:43:29 PM UTC-4, Bill Sun wrote:
> Hi,
>
> I'm a Chinese vim user. I type English-Chinese-mixed text a lot. The
> spell checking for English is neat. However, vim will render all the
> Hanzi as incorrect words (underline them), which is pretty annoying.
>
> My suggestion is: Add the ability to turn off the spell checking for all
> 2-bit characters. Because, at least, all Hanzi are 'individually
> correct' (because there is not spell in Chinese at all).
>
> Regards.

Try the following (fixed on my Windows 10 machines)

````
set spell spelllang=en_us,cjk
````
(Note, there should be no space right after the comma. Error if so.)

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

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

Saturday, February 25, 2017

Re: Updated indent/tf.vim

On Sat, 25 Feb 2017, Bram Moolenaar wrote:

> Christian Robinson wrote:
>
>> This version uses shiftwidth() instead of &shiftwidth.
>
> Thanks, I'll include it.
>
> No need to send it to the mailing list.

Apologies, I used the wrong address. I intended to only send it
directly to you.

- Christian

--
Christian J. Robinson <heptite@gmail.com>
"I'm not screwed. I'm beyond screwed. Screwed is sitting across the room,
waving at me, and saying, 'Hi! Glad I'm not you!'" -- Unknown

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

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

Re: Updated indent/tf.vim

Christian Robinson wrote:

> This version uses shiftwidth() instead of &shiftwidth.

Thanks, I'll include it.

No need to send it to the mailing list.

--
Q: What is the difference between open-source and commercial software?
A: If you have a problem with commercial software you can call a phone
number and they will tell you it might be solved in a future version.
For open-source software there isn't a phone number to call, but you
get the solution within a day.

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

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

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

Custom Macros that Behave Like 't' and 'f'

Greetings,

I'm working on a plugin that I believe will be helpful to a great many Vim users. Right now, I need a method for developing a macro that is entered and then takes a character to operate on as its final component. This idea is most similar to the way users enter the 't' and 'f' commands in Normal mode.

The closest I've come to this behavior is the following (inspired by reading ":h map-expr"):

nnoremap <expr> \e ':echo "\"' . nr2char(getchar(0)) . '\""' . "\<CR>"
nnoremap <expr> \ee ':echo '"e"'<CR>'

This macro will echo any character that follows '\e' in Normal mode. When you enter '\e', the macro does not patiently wait as with 't' and 'f', it times out like a standard mapping.

If this is not possible, it would make some sense given the way that normal user mappings behave, but I would greatly appreciate a consistent and reasonable "Vim way" to make this work.

Best to all,
Jason

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

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

Updated indent/tf.vim

This version uses shiftwidth() instead of &shiftwidth.

--
Christian J. Robinson <heptite@gmail.com>
Clothes make the man. Naked people have little or no influence on society.
-- Mark Twain

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

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

Friday, February 24, 2017

Re: Vim perl support

FWIW, I have a working includeexpr recursion limiter.
With this in place the dlist and ilist can work reasonably well.

Basic idea is to search (and cache) the file for matches with &include
Then check v:fname to see if (after '::' check) whether it's in the working list.
This limits the search to files that are direct descendants.

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

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

Re: Reload ~/.vim/pythonx libraries without quitting vim?

2017-02-24 15:35 GMT+03:00 BPJ <bpj@melroch.se>:
> Is there a way to reload libraries in ~/.vim/pythonx (after editing them)
> without quitting/restarting vim?
>
> If there is it's probably in the help, but I usually can't find things there
> without already knowing the tag I should look for...

Without intentionally creating code in libraries (and all of their
users, though you may try to construct something which will only need
code in your library: I have some ideas) which will reload them you
can't possibly do this properly. You can use `reload()` Python
function (Python-3+: in imp module, Python-2: just there in
__builtin__) and end with a reloaded module in sys.modules, but this
is not going to do you any good in general: all existing references to
your module will still reference the old version.

You may want to check how powerline implements reload():
https://github.com/powerline/powerline/blob/72572c86954cdf8869a1abe9957857f79990d354/powerline/__init__.py#L907.
Note the modules_keeper: I do not remember the details, but it was
fixing some bug. Not sure, but AFAIR one of the initial versions used
reload().

It is also generally good to ask on Python mailing list, Vim does not
provide any code for this job. Additionally you may want to try doing
something on top of Neovim: since it is running Python in a separate
process it may be feasible to kill it and restart. Obviously such
action will take down *all* plugins, not just the one you want to
reload.

>
> TIA,
>
> /bpj
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> --- You received this message because you are subscribed to the Google
> Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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

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

Reload ~/.vim/pythonx libraries without quitting vim?

Is there a way to reload libraries in ~/.vim/pythonx (after
editing them) without quitting/restarting vim?

If there is it's probably in the help, but I usually can't find
things there without already knowing the tag I should look for...

TIA,

/bpj

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

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

Thursday, February 23, 2017

Re: Disabling persistent undo for a file mask

On Thursday, February 23, 2017 at 10:43:01 PM UTC+2, Christian Brabandt wrote:

Thanks for the explanation, Christian!

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

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

Re: Disabling persistent undo for a file mask

Hi RingoRangoRongo!

On Do, 23 Feb 2017, RingoRangoRongo wrote:

> Just confirmed same behaviour with VIM - Vi IMproved 7.3 (vim -u NONE):
>
> :set undolevels=1000
> :set undofile
> :set undodir
> :autocmd BufNewFile,BufRead,BufWrite *.sec setlocal ul=-1
>
> :sav test.sec " no undo file exists
>
> insert random text
>
> :w " undo file appears
>
> insert more random test
>
> :w " undo file disappears
>
> Looks like a bug? :)

Vim will write an undofile (call the internal C function u_write_undo()
for writing the undo file), if the undofile option is set, which it is
in your case. Now you have just set undolevels to -1, but the undo
information is only discarded, if another step has to be saved for undo,
until then the undo information is still kept in memory (and written out
to a file, if you write the file). Once the undo history has been
purged, Vim the internal C function u_write_undo() will skip writing the
file after it has deleted the old file.

Setting 'verbose' to a higher value might also give some clues. The
writeundofile function gives some status then.

Back then when undo persistence was implemented, there were quite some
discussions if one should have another function for discarding the undo
information (there is also a Debian wishlist bug open for that I think).
I think I have even made a patch for that. But in the end it was never
done, because a simple change is enough to purge the undo state (e.g.
https://github.com/chrisbra/histwin.vim/blob/master/autoload/histwin.vim#L1049-L1072)

Best,
Christian
--
Die Wissenschaft ist der Verstand der Welt, die Kunst ihre Seele.
-- Maxim Gorkij

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

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

Re: Disabling persistent undo for a file mask

On Thursday, February 23, 2017 at 9:09:58 PM UTC+2, Charles Campbell wrote:

> Just tried the attached minimal file along with the commands:

[…]

Well, you are also setting noundofile. And while this is a solution to my question (and I dothank you for it, and also blame myself for not thinking about this obvious step :), I'd still say that if undolevels is set to -1, undofile should not appear at all.

Nonetheless, thanks again :).

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

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

Re: Disabling persistent undo for a file mask

set nocp
set undofile undodir=$HOME/.vim/VITMP// undolevels=1000
autocmd! BufRead,BufWrite *.sec setlocal ul=-1 noundofile
RingoRangoRongo wrote:
> Just confirmed same behaviour with VIM - Vi IMproved 7.3 (vim -u NONE):
>
> :set undolevels=1000
> :set undofile
> :set undodir
> :autocmd BufNewFile,BufRead,BufWrite *.sec setlocal ul=-1
>
> :sav test.sec " no undo file exists
>
> insert random text
>
> :w " undo file appears
>
> insert more random test
>
> :w " undo file disappears
>
> Looks like a bug? :)
>
Just tried the attached minimal file along with the commands:

vim -u rrr
:saveas! file.sec
i one two<esc>
:w
i three four<esc>
:w

Comments: nothing in $HOME/VITMP ever appeared, and I checked before
starting and after every saveas and write, using vim 8.0.189 .

Regards,
Chip Campbell

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

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

Re: Disabling persistent undo for a file mask

Just confirmed same behaviour with VIM - Vi IMproved 7.3 (vim -u NONE):

:set undolevels=1000
:set undofile
:set undodir
:autocmd BufNewFile,BufRead,BufWrite *.sec setlocal ul=-1

:sav test.sec " no undo file exists

insert random text

:w " undo file appears

insert more random test

:w " undo file disappears

Looks like a bug? :)

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

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

Re: Disabling persistent undo for a file mask

On Thursday, February 23, 2017 at 6:10:27 PM UTC+2, Ben Fritz wrote:
> Assuming this is reliably repeatable, before performing the :w command that would create the undo file, do this to see what undolevels is and which script last changed it:
>
> :verbose set undolevels?


0. empty buffer:
undolevels=1000
1. I save an empty buffer with :saveas file.sec command: no undo file present
undolevels=-1
Last set from ~/.vimrc
2. I add text and save this now named buffer with :write command: undo file appears
undolevels=-1
Last set from ~/.vimrc
3. I add more text and save this buffer again with :write command: undo file disappears.
undolevels=-1
Last set from ~/.vimrc

That flashing undo file looks like this: http://i.imgur.com/84Dt8g8.png

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

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

Re: Disabling persistent undo for a file mask

On Wednesday, February 22, 2017 at 9:45:02 AM UTC-6, RingoRangoRongo wrote:
> On Wednesday, February 22, 2017 at 5:21:20 PM UTC+2, Ben Fritz wrote:
> > Also, why are you using "setlocal undolevels=-1" instead of "setlocal noundofile", if you goal is only to disable persistent undo. Setting undolevels to -1 disables undo *entirely*.
>
> Well, that's my purpose :). Sorry for somewhat misleading subject.

Assuming this is reliably repeatable, before performing the :w command that would create the undo file, do this to see what undolevels is and which script last changed it:

:verbose set undolevels?

Do it again after the :w to see if it has changed.

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

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

Wednesday, February 22, 2017

Re: syntax question.

2017-02-22 23:10 GMT+03:00 sinbad <sinbad.sinbad@gmail.com>:
> How does vim syntax formatting works? for instance when i type ':' the whole line gets left justified to the start of the line, though this action makes sense for c-coding, it also happens for other file types. I want to disable this specific syntax action. how can i achieve that ?
>
> :set filetype
> filetype=new
>
> :set syntax
> syntax=new
>
> these are my current filtype and syntax settings. I just set both of them to a nonexistent value 'new'. but i still see that left justification.

&syntax is completely irrelevant, it is only used for highlighting.
What you need is normally managed by indentation scripts placed in
`{runtimepath}/indent/{filetype}.vim` (uses &filetype). But in
addition to indentation scripts there are default values, specifically
all options containing indent are relevant: `:helpgrep
\*'\w*indent\w*'\*` (or use the same search in `:h options.txt`). Also
there may be option values leaked from previously open filetypes or
global settings set in vimrc/etc.

The easiest solution should be `:setlocal indentkeys-=:`, but this
will only disable reindenting on colon. Vim will *still* think that
line needs to be shifted to the start, yet it will not autoindent when
you type colon.

>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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

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

syntax question.

How does vim syntax formatting works? for instance when i type ':' the whole line gets left justified to the start of the line, though this action makes sense for c-coding, it also happens for other file types. I want to disable this specific syntax action. how can i achieve that ?

:set filetype
filetype=new

:set syntax
syntax=new

these are my current filtype and syntax settings. I just set both of them to a nonexistent value 'new'. but i still see that left justification.

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

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

FEATURE REQUEST: includeexpr enhancements

I'm currently fascinated by using includeexpr to link files together in an intelligent fashion. But I've been frustrated by it's limitations.
I think these two enhancements would be reasonable:

1) Expose the (current) source file in a v:XXX variable in addition to the v:fname filename string candidate.
This would be useful in limiting recursion level. My use case here is perl, but I'm sure this could apply to other languages. To summarize the use case, I'd like to have vim only search one level of includes. Perl has a *lot* of module re-use leading to a lot of recursion.

2) Ability to return an array/list of files.
Use case here, languages that allow including many files with one statement. Typically this is an include directory sort of call.

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

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

Re: Disabling persistent undo for a file mask

On Wednesday, February 22, 2017 at 5:21:20 PM UTC+2, Ben Fritz wrote:

> What other commands do you have in your .vimrc to enable the undo file for other file types? I'd guess you have an interference going on.

Nothing except this:

set undofile
set undodir=~/.vim/tmp//

No filetype is specified for that (*.sec) particular extension, too.

> It's probably not related to your current problem, but you probably also want a BufNewFile autocmd event in there.

I've tried that, too. No changes: the undofile appears at the second step and disappears at the third.

> Also, why are you using "setlocal undolevels=-1" instead of "setlocal noundofile", if you goal is only to disable persistent undo. Setting undolevels to -1 disables undo *entirely*.

Well, that's my purpose :). Sorry for somewhat misleading subject.

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

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

Re: Disabling persistent undo for a file mask

On Wednesday, February 22, 2017 at 12:23:16 AM UTC-6, RingoRangoRongo wrote:
> Hi!
>
>
> In order to disable persistent undo for a file mask I have the following command in my .vimdc:
>
> autocmd! BufRead,BufWrite *.sec setlocal ul=-1
>
> However, I noticed the following strange behaviour:
>
> 1. I save an empty buffer with :saveas file.sec command: no undo file present
> 2. I add text and save this now named buffer with :write command: undo file appears
> 3. I add more text and save this buffer again with :write command: undo file disappears.
>
> How do I escape the appearance of the undo file at the second step? What should I add to my autocmd?
>

What other commands do you have in your .vimrc to enable the undo file for other file types? I'd guess you have an interference going on.

It's probably not related to your current problem, but you probably also want a BufNewFile autocmd event in there.

Also, why are you using "setlocal undolevels=-1" instead of "setlocal noundofile", if you goal is only to disable persistent undo? Setting undolevels to -1 disables undo *entirely*, not just persistent undo, so that pressing 'u' in normal mode while you edit will do nothing.

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

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

Tuesday, February 21, 2017

Disabling persistent undo for a file mask

Hi!


In order to disable persistent undo for a file mask I have the following command in my .vimdc:

autocmd! BufRead,BufWrite *.sec setlocal ul=-1

However, I noticed the following strange behaviour:

1. I save an empty buffer with :saveas file.sec command: no undo file present
2. I add text and save this now named buffer with :write command: undo file appears
3. I add more text and save this buffer again with :write command: undo file disappears.

How do I escape the appearance of the undo file at the second step? What should I add to my autocmd?

Vim ver:
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 24 2017 00:42:53)
MacOS X (unix) version
Included patches: 1-222
Compiled by Homebrew


Thanks!

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

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

Vim perl support

Lot's of questions about the packaged vim support for perl :-)

For context, doing ilist or dlist against a perl file brings my vim to a standstill. This seems mostly due to attempts to comb through lot's of perl library code. On my system
find /usr/lib/perl5/*_perl -type f -name '*.pm' | wc -l
yields about 8K files. And many of those files "use" other files. Searching that takes a long time.

Trying to work out a better use case for me leads me to a lot of questions/observations.

1) default includeexpr breaks an important use case, including a local library (AKA require('path/to/library'). The attempt to mangle an system path breaks this. Surely this can't be intended. In particular my work pattern is to build a test harness using local includes, something I suspect is common practice.

2) using "use" in include seems to have real issues. Perl has a lot of meta directives, warn, strict etc. that almost *every* module includes. Thus include will try to form a file and search, adding more burden to an already overburdened search path.

3) define seems overly broad, it matches any alpha plus underscore. I'm guessing this was an attempt to catch an edge case, but I'd rather have that not work that way.

4) Both include and define don't account for commented out code. FWIW, this ends up being an issue when I'm doing a little "printf" style debugging, as I have a snippet/macro that inserts a
use Data::Dumper; print Dumper $x;
That I usually comment out.

5) path seems a little weird. I trimmed down path to '.' and attempted to build out a smarter includeexpr and noticed that somehow vim was getting full paths. I'm not sure what was going on here, some candidates that made sense to me:
a) vim was getting this from the +perl support
b) Somehow the path info was being communicated earlier before the ftplugin modifications I made (I have these in 'after/ftplugin')

6) It would be nice to have some way to tell perl "don't go further here" with the include. I tried to do this via the includeexpr (and a long list of meta use directives to just return "" on, "warn" for example). It was unclear to me that this made a difference. If there was some sort of "only search so many levels" or "ignore include under these conditions" it seems to me that vim could have access to all those perl modules without having to search all the modules.

I'm trying to understand how to make my use case better (and have some thoughts) but I'm also trying to understand how the settings were made to be used. In particular I'm not clear as to why I might want completion, or definitions from any nested module inclusion. I can see searching any module that has been called by "use" something that seems quite useful. But for the most part I'd never want it to go any farther then that.

Ah well. Any tips/thoughts would be appreciated.
FWIW I'm currently
1) Disabling includeexpr
2) limiting include to just require
3) setting define to only match sub and my

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

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

Monday, February 20, 2017

Re: gVim 8.0 (patches 1-133): netrw :Explore command not recognized

boB Stepp wrote:
> I'm on Win7Pro-64-bit. When I type ":E(xplore)" I get the following:
>
> <quote>
>
> ***sorry*** this version of netrw requires vim 7.4 with patch 213
> E117: Unknown function netrw#Explore
>
> </quote>
>
> I have not found this exact issue in my searching, but I have seen
> several open issues on the Vim bug tracker involving Windows and
> netrw. Has any patch addressed this problem? Or is this somehow a
> problem on my end?
>
The latest netrw is v162j, which you can get from my website:
http://www.drchip.org/astronaut/vim/index.html#NETRW . It resolves most
of the Windows+netrw issues, but I'm still working on it.

Regards,
Chip Campbell

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

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

Re: Developing a simple vim script:Program-test-tune-loop?

> Hi Jason,
>
> thanks *A LOT* for your two postings!
> That will help me in many ways!!!
>
> GREAT!
>
> Cheers
> Meino

Hey Meino,

One last tip I didn't think of earlier provides rapid access to the help system while editing Vimscript. Use this autocommand in your vimrc:

augroup QuickHelp
autocmd!
autocmd FileType vim setlocal keywordprg=:help
augroup END

Putting this in your vimrc has an useful effect. Placing your cursor on a Vimscript keyword (e.g. "autocmd") and pressing "K" in normal mode will open a help window for that keyword. Try it out and see if it's useful.

Of course, you'll have to read the documentation to find out WHY this works!

Best wishes,
Jason

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

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

Re: Developing a simple vim script:Program-test-tune-loop?

jrfranklin@georgiasouthern.edu <jrfranklin@georgiasouthern.edu> [17-02-20 17:09]:
> (5) One good mapping is...
>
> nmap <silent> <Leader>s :update! | so %<CR>
>
> This will write the file if it has changed and source it immediately so you can see the effect of your Vimscript.
>
> There are many more optimizations. Discovering them is part of the fun of Vim!
>
> Best,
> Jason
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


Hi Jason,

thanks *A LOT* for your two postings!
That will help me in many ways!!!

GREAT!

Cheers
Meino




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

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

Re: Developing a simple vim script:Program-test-tune-loop?

(5) One good mapping is...

nmap <silent> <Leader>s :update! | so %<CR>

This will write the file if it has changed and source it immediately so you can see the effect of your Vimscript.

There are many more optimizations. Discovering them is part of the fun of Vim!

Best,
Jason

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

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

Re: Developing a simple vim script:Program-test-tune-loop?

A few tips to get you started...

(0) Read `:h usr_41.txt`.

(1) Vimscript autocompletion is available (see `:h i_CTRL-X_CTRL-V`).

(2) See `:h :@`. This command will allow you to copy a region of Vimscript into a register and then run the contents of that register (useful for quickly testing a small snippet).

(3) Put autocommands in a block like this:

augroup [GROUP NAME HERE]
autocmd!
[YOUR AUTOCOMMANDS HERE...]
augroup END

This will allow you to source the same script (with ":so %") after writing it. All of the commands will be deleted and then created again fresh.

(4) Declare functions with :function! instead of :function. This will force the re-definition of the function whenever the script is sourced again.

Happy Vimming!
Jason

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

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

Sunday, February 19, 2017

gVim 8.0 (patches 1-133): netrw :Explore command not recognized

I'm on Win7Pro-64-bit. When I type ":E(xplore)" I get the following:

<quote>

***sorry*** this version of netrw requires vim 7.4 with patch 213
E117: Unknown function netrw#Explore

</quote>

I have not found this exact issue in my searching, but I have seen
several open issues on the Vim bug tracker involving Windows and
netrw. Has any patch addressed this problem? Or is this somehow a
problem on my end?

Thanks in advance!

--
boB

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

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

Re: Help with print encoding

> At the end of the day VIM is a text editor. It supports basic printing
> with limited styling - it is not a full Unicode scripting engine with
> printing.

Very interesting discussion. At some point in the evolution from the basic
text editor, using something like LaTeX makes more sense.

There's no useful concept in software, no matter how simple, that won't be
seized immediately and abused beyond its authors wildest speculations.
(Back when the Osborne portable computer was sold with a spreadsheet and
word processor bundle, the world immediately divided into 2 groups.
Spreadsheet users who wanted to write an occasional letter would create a
66-character wide column and type in it, and writers who would do any
arithmetic required with Wordstar's primitive commands.

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

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

Re: [doc][patch] Fix usage of single quotations

Ken Takata wrote:

> Single quotations are used for options in the Vim documents. However, there
> are some parts which uses single quotations for non-option words. They might
> sometimes cause confusion, I think. Attached patch fixes them.
> It also fixes:
>
> * Add new tags in term.txt: *terminal-output-codes* and *terminal-key-codes*
> * Fix missing tags in term.txt: *'t_PS'* and *'t_PE'*
> * Fix typos in usr_02.txt and version8.txt

Thanks!

--
At some point in the project somebody will start whining about the need to
determine the project "requirements". This involves interviewing people who
don't know what they want but, curiously, know exactly when they need it.
(Scott Adams - The Dilbert principle)

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

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

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

Re: Help with print encoding

On 19/02/2017 10:11, Mike Williams wrote:
> On 14/02/2017 20:32, Lifepillar wrote:
>> On 14/02/2017 16:43, Mike Williams wrote:
>>> On 14/02/2017 07:25, Lifepillar wrote:
>>>> On 13/02/2017 18:08, Mike Williams wrote:
>>>>> The reason you see the upside-down question marks is because VIM
>>>>> converts the buffer content from utf-8 to latin1, but the latin1
>>>>> character set does not include the left and right single quotes and
>>>>> VIM
>>>>> will change them to upside-down quotes so they stand out. On Macs
>>>>> there
>>>>> is special code to convert utf-8 to Mac encoding where the left and
>>>>> right quotes exist, so that should work for you. Unfortunately I
>>>>> don't
>>>>> have access to a Mac to confirm this.
>>>>
>>>> I do not know much about print encondings, but... wouldn't it be
>>>> possible to define new print encodings, namely a UTF-8 print encoding?
>>>
>>> That would make life easier, but history is against you I'm afraid.
>>
>> Would you care to elaborate? Is PostScript the problem? If so, can Vim
>> bypass generating a PostScript file?
>
> Almost all printing technology pre-dates Unicode and earlier unified
> character set technology. Early products would be sales region specific
> - for example Western printers would not print East Asian text and vice
> versa (OK they did ASCII but not the wider European character set, but I
> digress).
>
> The early printers were very limited in processing power and available
> memory. The original methods of font definition and use were organised
> around minimising font sizes and a lot of the print file text encoding
> methods were designed to support this. They provide some internal fonts
> but because of font licensing and hardware constraints there were only a
> few fonts covering the basic design styles - fixed width, serif,
> sans-serif, and symbols.
>
> This means if you wanted to use any other fonts on the printer they have
> to be downloaded to the printer. These fonts could be large, and if you
> use multiple fonts your print file size balloons, and then your printer
> runs out of memory and fails to print. Techniques developed to reduce
> the final file size to help printing these complex files, but they were
> not trivial.
>
> VIM printing support was added in the late 90s. It uses four fonts
> (each of the Courier normal, bold, italic and bold-italic variations are
> distinct fonts) which are all provided by default in PostScript printing
> systems. Importantly this also means that everything is known about the
> fonts (glyph sizes, complement, etc.).
>
> Most printing technology in use today (PS, PDF, XPS) supports fonts with
> a large number of glyphs, and multi-byte character encodings (including
> various Unicode encodings) for the text to be printed. It would be
> possible to add support to VIM given time - it would need to include a
> font reader, font rewriter (to avoid including a few megabytes of font
> data not needed), four fonts to be used for the four styles (although it
> could implement a poor man's version for bold and italic versions) which
> are suitably licensed for inclusion with VIM. Adding support for
> arbitrary fonts provided by the user raises the bar further due to the
> various font formats available and varying glyph complements. And you
> still have the issue of what to do if a font does not contain the glyph
> for the character you want printed.
>
> At the end of the day VIM is a text editor. It supports basic printing
> with limited styling - it is not a full Unicode scripting engine with
> printing. Generally text files are written in a single well defined
> script, or character set, which can normally be handled by an 8-bit
> encoding (there is support for CJK MBCS printing as well). The
> immediate problem is handling the transcoding of Unicode to a suitable
> single byte character set. There are two possible solutions, selection
> of single byte character set based on glyphs to be printed, or use
> Unicode character alternates when transcoding to a character set. For
> example converting your left and right quotes to apostrophes. I will be
> suggesting the latter one to start with to the dev team.
>
> Basically yes it could be done, but the amount of work and additions to
> VIM seems out of proportion to the benefit gained. Some may say they
> would love a full Unicode print support, possibly even with proportional
> fonts but they their will be issues with composing characters and
> possibly a layout-engine. These are far from trivial to implement and
> most VIM users would have other priorities.
>
> I hope that helps understand some of the issues to do with printing
> these days.

Thanks for the thorough explanation!
Life.

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

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

Re: Help with print encoding

On 14/02/2017 20:32, Lifepillar wrote:
> On 14/02/2017 16:43, Mike Williams wrote:
>> On 14/02/2017 07:25, Lifepillar wrote:
>>> On 13/02/2017 18:08, Mike Williams wrote:
>>>> The reason you see the upside-down question marks is because VIM
>>>> converts the buffer content from utf-8 to latin1, but the latin1
>>>> character set does not include the left and right single quotes and VIM
>>>> will change them to upside-down quotes so they stand out. On Macs there
>>>> is special code to convert utf-8 to Mac encoding where the left and
>>>> right quotes exist, so that should work for you. Unfortunately I don't
>>>> have access to a Mac to confirm this.
>>>
>>> I do not know much about print encondings, but... wouldn't it be
>>> possible to define new print encodings, namely a UTF-8 print encoding?
>>
>> That would make life easier, but history is against you I'm afraid.
>
> Would you care to elaborate? Is PostScript the problem? If so, can Vim
> bypass generating a PostScript file?

Almost all printing technology pre-dates Unicode and earlier unified
character set technology. Early products would be sales region specific
- for example Western printers would not print East Asian text and vice
versa (OK they did ASCII but not the wider European character set, but I
digress).

The early printers were very limited in processing power and available
memory. The original methods of font definition and use were organised
around minimising font sizes and a lot of the print file text encoding
methods were designed to support this. They provide some internal fonts
but because of font licensing and hardware constraints there were only a
few fonts covering the basic design styles - fixed width, serif,
sans-serif, and symbols.

This means if you wanted to use any other fonts on the printer they have
to be downloaded to the printer. These fonts could be large, and if you
use multiple fonts your print file size balloons, and then your printer
runs out of memory and fails to print. Techniques developed to reduce
the final file size to help printing these complex files, but they were
not trivial.

VIM printing support was added in the late 90s. It uses four fonts
(each of the Courier normal, bold, italic and bold-italic variations are
distinct fonts) which are all provided by default in PostScript printing
systems. Importantly this also means that everything is known about the
fonts (glyph sizes, complement, etc.).

Most printing technology in use today (PS, PDF, XPS) supports fonts with
a large number of glyphs, and multi-byte character encodings (including
various Unicode encodings) for the text to be printed. It would be
possible to add support to VIM given time - it would need to include a
font reader, font rewriter (to avoid including a few megabytes of font
data not needed), four fonts to be used for the four styles (although it
could implement a poor man's version for bold and italic versions) which
are suitably licensed for inclusion with VIM. Adding support for
arbitrary fonts provided by the user raises the bar further due to the
various font formats available and varying glyph complements. And you
still have the issue of what to do if a font does not contain the glyph
for the character you want printed.

At the end of the day VIM is a text editor. It supports basic printing
with limited styling - it is not a full Unicode scripting engine with
printing. Generally text files are written in a single well defined
script, or character set, which can normally be handled by an 8-bit
encoding (there is support for CJK MBCS printing as well). The
immediate problem is handling the transcoding of Unicode to a suitable
single byte character set. There are two possible solutions, selection
of single byte character set based on glyphs to be printed, or use
Unicode character alternates when transcoding to a character set. For
example converting your left and right quotes to apostrophes. I will be
suggesting the latter one to start with to the dev team.

Basically yes it could be done, but the amount of work and additions to
VIM seems out of proportion to the benefit gained. Some may say they
would love a full Unicode print support, possibly even with proportional
fonts but they their will be issues with composing characters and
possibly a layout-engine. These are far from trivial to implement and
most VIM users would have other priorities.

I hope that helps understand some of the issues to do with printing
these days.

TTFN

Mike
--
Where there's smoke, there's toast.

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

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

Re: setup on dos machine

Best regards,
Tony.


On Sun, Feb 19, 2017 at 2:31 AM, email from <c71ckt09@gmail.com> wrote:
> is this complicated directory hard coded into vim.
> i would like to put all the files in one directory.

You can't.
1) MS-DOS is not supported anymore in recent versions of Vim
2) Vim needs its runtime files in a number of directories, see :help
'runtimepath'

Even on MS-DOS, at least on versions which supported hard disks,
multiple directories were a standard features of the operating system.

>
> what are ALL of the environment variables?
>
> the doc says that the environment both start with
> a $ and do not

Starting environment variables with a dollar sign is the Unix
convention, used inside Vim. On Dos/Windows (but not inside Vim) you
bracket environment variables with percent signs, as follows:
the PATH environment variable is known by COMMAND.COM on the command
line as %PATH% and by Vim as $PATH
the HOME envionment variable, if you have one, is known by COMMAND.COM
as %HOME% and by Vim as $HOME
etc.

but when you set an environment variable in COMMAND.COM, you use the
bare name. For instance, to set the $VIM directory, you would tell
COMMAND.COM

set VIM C:\SOME\PATH\TO\MY\VIM\FILES

or you would tell Vim

:let $VIM = 'C:/SOME/PATH/TO/MY/VIM/FILES'

(forward slash separators is another Unix convention).

>
> ie vim and $vim. which is it.

Best regards,
Tony.

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

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

Saturday, February 18, 2017

Re: Highlight words not previously used.

On 11.02.17 11:37, Søren kjeil wrote:
> I'd like to highlight words that I have not previously used.
>
> This would let me know when if I misspelled a name.

By itself, that would also highlight the first use of every word in your
text, making it hard to spot misspellings, I expect.

> Is there a way to do this?

The above-mentioned drawback would be avoided by instead adding names to
a private spellfile, using "zg" on the first entry of each name.

> Since there is the option to autocomplete words previously used it the
> file, ...

Isn't that then the easiest way to ensure consistent spelling of the
names?

Erik

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

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

Developing a simple vim script:Program-test-tune-loop?

Hi,

I want a simple vim script to go into my .vimrc.
Nothing fancy...only a piece of code to parse and
extract parts of a system file.

But a recognized that for doing this efficiently
that I dont know a important thing: The workflow!

When developing the script in my .vimrc directly
I had to restart vim every time I changed the script
and will get nasty message if I had screwed up the
script.

The question: What is the recommended workflow to
develop a script (no plugin!) - how to do the
iteration of "program - test - correct" most
efficiently?

Thanks a lot for any help in advance !

Cheers
Meino



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

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

Re: [doc][patch] Fix usage of single quotations

Hi,

2017/2/19 Sun 11:16:16 UTC+9 Ken Takata wrote:
> Hi,
>
> Single quotations are used for options in the Vim documents. However, there
> are some parts which uses single quotations for non-option words. They might
> sometimes cause confusion, I think. Attached patch fixes them.
> It also fixes:
>
> * Add new tags in term.txt: *terminal-output-codes* and *terminal-key-codes*
> * Fix missing tags in term.txt: *'t_PS'* and *'t_PE'*
> * Fix typos in usr_02.txt and version8.txt

Sorry, I intended to post to vim_dev instead of vim_use.

Regards,
Ken Takata

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

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

[doc][patch] Fix usage of single quotations

# HG changeset patch
# Parent db60e75d61fc19a9161cd87e01f0c6ed1a4edc09

diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -3430,7 +3430,7 @@ execute({command} [, {silent}]) *exe
"" no `:silent` used
"silent" `:silent` used
"silent!" `:silent!` used
- The default is 'silent'. Note that with "silent!", unlike
+ The default is "silent". Note that with "silent!", unlike
`:redir`, error messages are dropped. When using an external
command the screen may be messed up, use `system()` instead.
*E930*
@@ -4032,10 +4032,10 @@ get({dict}, {key} [, {default}])
get({func}, {what})
Get an item with from Funcref {func}. Possible values for
{what} are:
- 'name' The function name
- 'func' The function
- 'dict' The dictionary
- 'args' The list with arguments
+ "name" The function name
+ "func" The function
+ "dict" The dictionary
+ "args" The list with arguments

*getbufinfo()*
getbufinfo([{expr}])
@@ -7729,7 +7729,7 @@ taglist({expr}) *taglist()*
may appear, they give the name of the entity the tag is
contained in.

- The ex-command 'cmd' can be either an ex search pattern, a
+ The ex-command "cmd" can be either an ex search pattern, a
line number or a line number followed by a byte number.

If there are no matching tags, then an empty list is returned.
diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt
--- a/runtime/doc/fold.txt
+++ b/runtime/doc/fold.txt
@@ -64,7 +64,7 @@ whichever is lower. These are empty or
with a character in 'foldignore'. White space is skipped before checking for
characters in 'foldignore'. For C use "#" to ignore preprocessor lines.

-When you want to ignore lines in another way, use the 'expr' method. The
+When you want to ignore lines in another way, use the "expr" method. The
|indent()| function can be used in 'foldexpr' to get the indent of a line.


diff --git a/runtime/doc/hangulin.txt b/runtime/doc/hangulin.txt
--- a/runtime/doc/hangulin.txt
+++ b/runtime/doc/hangulin.txt
@@ -81,8 +81,8 @@ And there should be no ':set guifont'.
':set guifontset'. It means VIM runs without fontset supporting.
So, you can see only English. Hangul does not be correctly displayed.

-After 'fontset' feature is enabled, VIM does not allow using english
-font only in 'font' setting for syntax.
+After "fontset" feature is enabled, VIM does not allow using english
+font only in "font" setting for syntax.
For example, if you use >
:set guifontset=eng_font,your_font
in your .gvimrc, then you should do for syntax >
diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt
--- a/runtime/doc/helphelp.txt
+++ b/runtime/doc/helphelp.txt
@@ -314,7 +314,7 @@ the applicable Vim version. The last fi
date of the file. Each field is separated by a tab.

At the bottom of the help file, place a Vim modeline to set the 'textwidth'
-and 'tabstop' options and the 'filetype' to 'help'. Never set a global option
+and 'tabstop' options and the 'filetype' to "help". Never set a global option
in such a modeline, that can have consequences undesired by whoever reads that
help.

diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt
--- a/runtime/doc/if_pyth.txt
+++ b/runtime/doc/if_pyth.txt
@@ -174,8 +174,8 @@ vim.eval(str) *python-eval*

:py tagList = vim.eval('taglist("eval_expr")')
< The latter will return a python list of python dicts, for instance:
- [{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name':
- 'eval_expr', 'kind': 'f', 'filename': './src/eval.c'}]
+ [{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name': ~
+ 'eval_expr', 'kind': 'f', 'filename': './src/eval.c'}] ~

vim.bindeval(str) *python-bindeval*
Like |python-eval|, but returns special objects described in
@@ -867,7 +867,7 @@ When compiled with both |+python| and |+
it is not available then Python 2. If 'pyxversion' is 2 or 3, it tests only
Python 2 or 3 respectively.

-Note that for has('pythonx') to work it may try to dynamically load Python 3
+Note that for `has('pythonx')` to work it may try to dynamically load Python 3
or 2. This may have side effects, especially when Vim can only load one of
the two.

diff --git a/runtime/doc/if_ruby.txt b/runtime/doc/if_ruby.txt
--- a/runtime/doc/if_ruby.txt
+++ b/runtime/doc/if_ruby.txt
@@ -72,7 +72,7 @@ To see what version of Ruby you have: >

*:rubyfile* *:rubyf*
:rubyf[ile] {file} Execute the Ruby script in {file}. This is the same as
- ":ruby load 'file'", but allows file name completion.
+ `:ruby load 'file'`, but allows file name completion.

Executing Ruby commands is not possible in the |sandbox|.

diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -1103,7 +1103,7 @@ items:
empty when non-zero this match will be added even when it is
an empty string

-All of these except 'icase', 'dup' and 'empty' must be a string. If an item
+All of these except "icase", "dup" and "empty" must be a string. If an item
does not meet these requirements then an error message is given and further
items in the list are not used. You can mix string and Dictionary items in
the returned list.
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -7096,7 +7096,7 @@ A jump table for the options with a shor
word. The expression must evaluate to a List of
Lists, each with a suggestion and a score.
Example:
- [['the', 33], ['that', 44]]
+ [['the', 33], ['that', 44]] ~
Set 'verbose' and use |z=| to see the scores that the
internal methods use. A lower score is better.
This may invoke |spellsuggest()| if you temporarily
diff --git a/runtime/doc/scroll.txt b/runtime/doc/scroll.txt
--- a/runtime/doc/scroll.txt
+++ b/runtime/doc/scroll.txt
@@ -221,7 +221,7 @@ past its buffer's limits.
However, if a 'scrollbind' window that has a relative offset that is past its
buffer's limits is given the cursor focus, the other 'scrollbind' windows must
jump to a location where the current window's relative offset is valid. This
-behavior can be changed by clearing the 'jump' flag from the 'scrollopt'
+behavior can be changed by clearing the "jump" flag from the 'scrollopt'
option.

*syncbind* *:syncbind* *:sync*
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -2646,9 +2646,9 @@ later, and part earlier) adds.

RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax*

-You may set what syntax definitions should be used for code blocks via
+You may set what syntax definitions should be used for code blocks via >
let rst_syntax_code_list = ['vim', 'lisp', ...]
-
+<

REXX *rexx.vim* *ft-rexx-syntax*

diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -252,7 +252,7 @@ But any non-empty string means that the
that the flag is not set. 't_CS' works like this too, but it isn't a termcap
flag.

-OUTPUT CODES
+OUTPUT CODES *terminal-output-codes*
option meaning ~

t_AB set background color (ANSI) *t_AB* *'t_AB'*
@@ -335,7 +335,7 @@ Added by Vim (there are no standard code
t_BD disable bracketed paste mode *t_BD* *'t_BD'*
|xterm-bracketed-paste|

-KEY CODES
+KEY CODES *terminal-key-codes*
Note: Use the <> form if possible

option name meaning ~
@@ -426,8 +426,9 @@ Note: Use the <> form if possible
t_KK <k8> keypad 8 *<k8>* *t_KK* *'t_KK'*
t_KL <k9> keypad 9 *<k9>* *t_KL* *'t_KL'*
<Mouse> leader of mouse code *<Mouse>*
- t_PS start of bracketed paste |xterm-bracketed-paste| *t_PS* 't_PS'
- t_PE end of bracketed paste |xterm-bracketed-paste| *t_PE* 't_PE'
+ *t_PS* *'t_PS'*
+ t_PS start of bracketed paste |xterm-bracketed-paste|
+ t_PE end of bracketed paste |xterm-bracketed-paste| *t_PE* *'t_PE'*

Note about t_so and t_mr: When the termcap entry "so" is not present the
entry for "mr" is used. And vice versa. The same is done for "se" and "me".
diff --git a/runtime/doc/usr_02.txt b/runtime/doc/usr_02.txt
--- a/runtime/doc/usr_02.txt
+++ b/runtime/doc/usr_02.txt
@@ -663,7 +663,7 @@ 21) Quickfix commands usually start with
22) Autocommand events can be found by their name: >
:help BufWinLeave
< To see all possible events: >
- :help autocommands-events
+ :help autocommand-events

23) Command-line switches always start with "-". So for the help of the -f
command switch of Vim use: >
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1588,7 +1588,7 @@ WHITE SPACE
Blank lines are allowed and ignored.

Leading whitespace characters (blanks and TABs) are always ignored. The
-whitespaces between parameters (e.g. between the 'set' and the 'cpoptions' in
+whitespaces between parameters (e.g. between the "set" and the "cpoptions" in
the example below) are reduced to one blank character and plays the role of a
separator, the whitespaces after the last (visible) character may or may not
be ignored depending on the situation, see below.
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -634,7 +634,7 @@ K Run a program to lookup the keyword
with the command >
:!{program} {keyword}
< There is an example of a program to use in the tools
- directory of Vim. It is called 'ref' and does a
+ directory of Vim. It is called "ref" and does a
simple spelling check.
Special cases:
- If 'keywordprg' begins with ":" it is invoked as
diff --git a/runtime/doc/version8.txt b/runtime/doc/version8.txt
--- a/runtime/doc/version8.txt
+++ b/runtime/doc/version8.txt
@@ -3436,7 +3436,7 @@ Files: runtime/doc/options.txt, src/
Patch 7.4.498 (after 7.4.497)
Problem: Typo in DOS makefile.
Solution: Change exists to exist. (Ken Takata)
-Files: src/testdirMake_dos.mak
+Files: src/testdir/Make_dos.mak

Patch 7.4.499
Problem: substitute() can be slow with long strings.
Hi,

Single quotations are used for options in the Vim documents. However, there
are some parts which uses single quotations for non-option words. They might
sometimes cause confusion, I think. Attached patch fixes them.
It also fixes:

* Add new tags in term.txt: *terminal-output-codes* and *terminal-key-codes*
* Fix missing tags in term.txt: *'t_PS'* and *'t_PE'*
* Fix typos in usr_02.txt and version8.txt

Regards,
Ken Takata

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

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

setup on dos machine

is this complicated directory hard coded into vim.
i would like to put all the files in one directory.

what are ALL of the environment variables?

the doc says that the environment both start with
a $ and do not

ie vim and $vim. which is it.

C

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

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

gvim display of contents disappears

Hello:

I use gvim on a Scientific Linux 7.3, which in turn runs in a VM under
Windows (Vista).

My problem: occasionally the display of the contents in the gvim window
disappears, leaving a blank space instead. Ctrl-L does not work to
restore the display. However, I've recently found that moving the
cursor in and out of the gvim window, twice, restores the display. I
haven't seen the problem occur with vim, but these days I use gvim much
more.

Moving the cursor over the missing text regions restores the text under
the cursor.

Duplicating this will be difficult as it can possibly depend on so many
things (vista, vmware, x drivers, SL 7.3, etc). Is there enough clue
above to help with this?

Regards,
Chip Campbell

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

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

Reschedule a timer?

Hi!

Is there a way to reschedule/delay a timer. Something like:

let t = timer_start(1000, 'DoSomething')

Then after, say, 500ms:

call timer_reschedule(1000)

Then wait another 1000ms for DoSomething to be called.

I could of course stop the old and start a new timer but I guess this would waste resources and be quite inefficient if being done very often.

Regards

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

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

Friday, February 17, 2017

Re: Cryptic Documentation under ":h python-dynamic"

Jason Franklin wrote:

> I thought I would clarify my post to summarize with the following two
> questions:
>
> (1) Can I only use the version of Python matching the name of the DLL
> that Vim was compiled with?
>
> (2) I have used pythonthreedll=python36.dll as my setting with no
> problem, even though the value that Vim was compiled with was
> python35.dll. Should I expect problems in the future?

We can't guarantee that the interface of the DLL has not changed.
Hopefully a higher version is backwards compatible.

if you run the tests and they pass it's probably OK.

--
Scientists decoded the first message from an alien civilization:
SIMPLY SEND 6 TIMES 10 TO THE 50 ATOMS OF HYDROGEN TO THE STAR
SYSTEM AT THE TOP OF THE LIST, CROSS OFF THAT STAR SYSTEM, THEN PUT
YOUR STAR SYSTEM AT THE BOTTOM OF THE LIST AND SEND IT TO 100 OTHER
STAR SYSTEMS. WITHIN ONE TENTH GALACTIC ROTATION YOU WILL RECEIVE
ENOUGH HYDROGREN TO POWER YOUR CIVILIZATION UNTIL ENTROPY REACHES ITS
MAXIMUM! IT REALLY WORKS!

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

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

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

Re: Cryptic Documentation under ":h python-dynamic"

I thought I would clarify my post to summarize with the following two questions:

(1) Can I only use the version of Python matching the name of the DLL that Vim was compiled with?

(2) I have used pythonthreedll=python36.dll as my setting with no problem, even though the value that Vim was compiled with was python35.dll. Should I expect problems in the future?

Thanks!
Jason

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

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

Cryptic Documentation under ":h python-dynamic"

Hey Everyone,

I've been switching to using Vim8.0 on Windows at work. Since UltiSnips requires Python, I installed Python 3.6. The process led me to arrive at the relevant documentation, which states:

----------

MS-Windows ~

To use the Python interface the Python DLL must be in your search path. In a
console window type "path" to see what directories are used. The 'pythondll'
or 'pythonthreedll' option can be also used to specify the Python DLL.

The name of the DLL must match the Python version Vim was compiled with.
Currently the name is "python24.dll". That is for Python 2.4. To know for
sure edit "gvim.exe" and search for "python\d*.dll\c".

----------

I find the second paragraph confusing. Does this mean that only python 2.4 can be used? For example, can I change the pythonthreedll setting to be python36.dll? If not, why even have a setting for the DLL name?

Thanks,
Jason

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

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

Thursday, February 16, 2017

Re: Buffer number explodes when :vimgrep is called.

Thanks for the suggestions. I generally prefer not to rely too much on Plugins, but I have used Command-T and found it to be amazingly fast and useful. If I were working on even larger projects, I'd make the switch for sure.

Jason

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

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

Wednesday, February 15, 2017

Re: W-word Boundaries



Den 13 feb 2017 19:52 skrev "Tim Chase" <vim@tim.thechases.com>:
On 2017-02-13 13:34, Shawn H Corey wrote:
>
> The two patterns, \< and \> match w-word boundaries. Is there
> something to match W-word boundaries? The best I came up with is:
>
>     \(^\|\s\)\@<=
>
> I'm writing a syntax file for G+ comments where in-line styles start
> with a W-word boundary, followed by a "*" for bold, "_" for italic,
> and "-" for strikeout. \< and \> only works for italic.
>
> Does anyone know a more elegant way?

Depending on how your final expression is, \S might do the trick, or
you can use a negative lookbehind assertion:

  \S\@<!

So for your markdown words, it could be something like

  \S\@<!\S\+

Or to match just the boundary \S\@<!\S\@= on the 'left' side and \S\@<=\S\@! on the 'right' side. This will work at the start/end of line too 

/bpj

(Doing my best to follow style etiquette in Gmail mobile :-)


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

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

Re: VIM scroll bar is missing scroll box

Thanks for the pointers.
gordon

----- Original Message -----
From: Tony Mechelynck <antoine.mechelynck@gmail.com>
To: vim_use@googlegroups.com
Date: Thu, 16 Feb 2017 01:30:46 +0100
Subject: Re: VIM scroll bar is missing scroll box

> On Wed, Feb 15, 2017 at 5:48 AM, <gordon55gg@gmail.com> wrote:
> > Thanks for reading.
> > I am using Terminal VIM and it works very well.
> > And the scroll bar for Terminal works fine.
> > But when I run VIM (from Terminal or batch file),
> > the scroll bar has no "scroll box".
> > The "scroll box" is that small rectangle indicating
> > the location of the current window.
> >
> > Batch file:
> > @echo off
> > chdir C:/cygwin64/bin
> > start mintty.exe -p 0,0 /usr/bin/vim.exe %1
> >
> > How can I get the scroll bar working for Terminal VIM?
>
> In Console mode, the scrollbar is a console feature, not a Vim
> feature. But Vim will tell you at which "percentage" of the file you
> are looking, usually in the bottom-right corner of the current
> split-window, where it says one of the following:
> All
> Top
> Bot
> nn%
> The first three tell you that you see one end, or the other, or both,
> of the file, Otherwise it tells you a percentage, from 01% to 99%,
> meaning you are at that "percentage point" within the file. If you use
> a custom 'statusline' setting, it is the %P element (or you can use %p
> instead, for more verbosity).
>
> To get a Vim scrollbar, use gvim (or, on the Mac, macvim) instead of
> vim. Then you can set 'guioptions' to have or not have scrollbars on
> the left, right and/or bottom depending on some conditions (see ":help
> 'guioptions' " with the single quotes but not the double quotes).
>
> Best regards,
> Tony.
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups
"vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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

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

Re-index before calling “his i”

Hi,

Is there any method to re-index history? I wanna do this to make history
index always start from 1 to the MAX history value.

Calling "his i" or "his @" to show input history.

For example, if set history=20, after reaching the max history items, input
new item will edge out the oldest history item, so the history index will be
:

# input history
2...
3...
...
21...

Calling histdel() will also make the index uncontinuous.

Is there anyway to re-index the history before calling "his i" ?
BTW, how to index from newest to oldest history?

Thanks,

Hangtian



--
View this message in context: http://vim.1045645.n5.nabble.com/Re-index-before-calling-his-i-tp5729018.html
Sent from the Vim - General mailing list archive at Nabble.com.

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

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