Re: Gvim message on XDG textedit URL link

2022-09-06 Thread Charles Campbell

Andrew Bernard wrote:
I have PDF's with links in them and XDG textedit URLs that can take me 
from the PDF to the source file (for lilypond music engraving if 
interested)., The links work and take me to the right line and column 
corresponding to the link in the PDF. But I am unable to turn off the 
lengthy and needless long cryptic message displayed at the bottom of 
the screen despite searching for answers. Having to see this and press 
enter every time is tedious. This is an example:


gvim message.jpg

Here's the sort of textedit link:

textedit:///home/acb/work/test.ly:4:2:3

What should one do?

I am unable to find a "textedit:" string in any of the vim runtime 
files. Sounds like you've installed a plugin to handle textedit links -- 
so I suggest finding out what the plugin name is and contacting its author.


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/d4f26911-123e-a70f-6bad-efc5733394b0%40drchip.org.


Re: Content of syntax regions

2022-08-23 Thread Charles Campbell

BPJ wrote:
For my DSL I have a syntax region for text between a pair of 
delimiters inside which other syntax items should come in a specific 
order, say first dslFoo, then dslBar, then dslBaz.
I can use nextgroup=dslBar to declare which item should come after 
dslFoo and so on, but how do I declare that the first item inside the 
region must be a dslFoo? Is there a better approach than defining the 
opening delimiter as a match item to be followed by a dslFoo item and 
so on, but doesn't that prevent me from using contains and 
containedin? I wish I could do something like firstcontained=dslFoo on 
the region.


What is the best way to do this?

/bpj

Good luck with getting this! I've asked for it over a decade ago. Bottom 
line: currently, you can't.


Uses: region would start properly but, since its a region, would allow 
it to be folded, syntax changed (perl/tex/sh) for start/end patterns, etc.


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/8baf4165-1e94-9032-3d83-15aee8a82f61%40drchip.org.


Re: Large file - Opening n head lines

2022-03-17 Thread Charles Campbell

Stan Brown wrote:

On 2022-03-17 02:55, Lifepillar wrote:

On 2022-03-17, Ni Va  wrote:

Is it possible to open a Large File Vim but just only few beginning lines
of it, edit one of these 50 first lines and then save and quit ?

I don't think that is possible with Vim without the help of some
pre/post-processing tool, but... Vim can edit pretty large files
relatively quickly, if set up properly. Have you tried playing with
Vim's settings already?

What settings do you have in mind? I wasn't aware that Vim needed to be
set up differently for files of different sizes.

Vim doesn't "need" to be set up differently for large files. However, 
options can be selected to make it faster.
See http://www.drchip.org/astronaut/vim/index.html#LARGEFILE for a 
plugin that helps with large files.


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/177e85f5-d1a2-abd1-d2db-29e7b2fde5bf%40drchip.org.


Re: Sven Guckes passed away

2022-02-21 Thread Charles Campbell

Christian Brabandt wrote:

On Mo, 21 Feb 2022, Bram Moolenaar wrote:


Forwarding this text from Antonio Colombo:

==

Our friend Sven Guckes died in Berlin on February 20, 2022.
He was diagnosed with a brain tumor in December 2021.
He went to a hospital, but surgeons could not do much for him.
At the end of January he was moved to a Hospice.
A group of friends has been with him as much as possible during all his
sickness.
He died while Pugs, one of his friends, was with him.
They had just finished a chat, and Sven was smiling, but then he quieted
down and in a few moments he did not breathe any more.

Sven (when he was still a student at the Free University of Berlin) was very
active in the Vim development team in the Nineties. He was the one who set
up the vim.org domain. Later on he had the idea of "What is Vim?", an
explanation of Vim in six kilobytes, and helped with some versions of
Vimtutor.

Sven worked (and gave talks) also on a lot of other free software projects,
let us remember here just "plain" vi and mutt, but there are several
others. He had friends all over the world, and helped them, for software
problems and for real life problems in any way he could.

Let us recall here just one of his "pet projects", the mythical
"alternate.fan.warlord" FAQ, in which appears one of his signatures,
in newsgroup alt.fan.warlord.

Vale, Sven!

==


I met Sven only a couple of times.  What I remember most is his never
ending enthusiasm.  He was a good person.

I would like to dedicate the upcoming Vim 9.0 release to Sven in his
memory.

Article in German: https://linuxnews.de/2022/02/sven-guckes-verstorben/
Hacker news: https://news.ycombinator.com/item?id=30410077


So sorry to hear of Sven's passing. He was always very informative and 
helpful.

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/156cff5c-9067-3668-be41-9a335f3c9aa2%40drchip.org.


Re: [VIM] Re: [VIM] Re: vim/colorschemes: Request For Comments

2022-02-14 Thread Charles Campbell

Walter Cazzola wrote:

Hi

On Mon, 14 Feb 2022, Maxim Kim wrote:


Hi Walter,

It should be identical in gvim and tui vim with t_Co=256:

[image: 2022-02-14_13-40-35.png]


How I should set/check for this? I do not have t_Co neither as an 
environment

variable nor in vim.

Walter

Bring up vim; then type  :echo _Co

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/62b5c1d9-de26-b019-f332-57f87467cc0f%40drchip.org.


Re: How can I undock a file panel from a split window?

2021-06-10 Thread Charles Campbell

L A Walsh wrote:

If I use split, I can create a separate panel that
is a view on a file.

How can I undock it?

Its not exactly what you're asking for, but I wrote something called 
"Detach" which will detach a tab into its own process. ctrl-w T will 
move a window into a new tab. The :Detach command will cause the 
currently visible tab and all its windows to be brought up in a separate 
gvim. Detaching a tab yields two independent instances of vim/gvim: they 
do not share variables, vim functions, etc. If you're interested, you 
may get it from http://www.drchip.org/astronaut/vim.index.html#DETACH .


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/f08e30d9-1ea0-f80e-d452-573a6465d0d3%40drchip.org.


Re: Dump help pages

2021-04-14 Thread Charles Campbell

Julius Hamilton wrote:
Thanks very much. Yes, that'll do the trick. Not all pages, but just 
any individual one I happen to be reading, so I can edit and take 
notes on it.


Thanks very much, really appreciate it.

Julius

I was surprised no one mentioned what seemed to me to be the most 
obvious -- just


    :w filename

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/2a3aac62-36ae-62bd-564b-209853de1b57%40drchip.org.


Re: [VIM] Re: How to have the spell checker ignoring URLs and acronyms

2021-04-06 Thread Charles Campbell

  
  
Walter Cazzola wrote:

Hi,
  
  thanks for the reply
  
  
  On Sat, 3 Apr 2021, Charles Campbell wrote:
  
  
  I suspect that you need to get your
matches contained in various groups. For

a start, consider also trying (in ~/.vim/after/tex.vim)

  
  
    syn cluster texFoldGroup
add=UrlNoSpell,AcronymNoSpell

  
  
  This mostly did the trick. It now works in some cases but not
  everywhere, see
  
  the minimal example below.
  
  
  You didn't provide any examples, so the
above is a guess.

  
  
  You are right, this is a MWE
  
  
     \documentclass[a4paper]{article}
  
     \begin{document}
  
    SUT (SUT) [SUT] {SUT} SUT,
  
    $SUT$
  
    \section{A section about SUT.}
  
    \begin{itemize}
  
   \item SUT
  
    \end{itemize}
  
    \begin{figure}\caption{whatever SUT is}\end{figure}
  
  
    ftp://erlang.org/doc/man/erl_tracer.html
  
    \url{ftp://erlang.org/doc/man/erl_tracer.html}
  
     \end{document}
  
  
  in this case, the acronym SUT and the URL are correctly ignored in
  paragraphs
  
  (also when followed by punctuation symbols) but not when in a
  command as
  
  \section, \url or \caption. What I see is in the attached pic.
  
  
  Currently, my .vim/after/syntax/tex.vim contains:
  
  
    syn cluster texFoldGroup add=UrlNoSpell,AcronymNoSpell
  
    syn match UrlNoSpell '\w\+:\/\/[^[:space:]]\+' contains=@NoSpell
  
    syn match AcronymNoSpell '\<\(\u\|\d\)\{3,}s\?\>'
  contains=@NoSpell
  
  
  Probably, there will be another group to add these patterns. Where
  can I read
  
  all the possible groups?
  

Well, all the groups are explicitly laid out in syntax/tex.vim,
albeit embedded with the rest of the syntax highlighting. What you
might consider doing is using hilinks.vim
(http://www.drchip.org/astronaut/vim/index.html#HILINKS, :HLT!)
which will then tell you what syntax and highlighting is currently
in-use under your cursor. Using your example I typed :HLT!, placed
the cursor on the f in ftp:... and noted that the syntax stack has
texDocZone->texSectionZone -- so you'll want to use
syn cluster texSectionZone add=UrlNoSpell,AcronymNoSpell

to your after/syntax/tex.vim file.

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/5fdcca7c-8885-9776-455c-135213dc66bb%40drchip.org.


Re: How to have the spell checker ignoring URLs and acronyms

2021-04-03 Thread Charles Campbell

  
  
Walter Cazzola wrote:

Dear
  Vim Experts,
  
  bored to have acronyms and URLs marked as errors in my LaTeX files
  I have
  
  looked for a solution. Here
  
  
    
http://www.panozzaj.com/blog/2016/03/21/ignore-urls-and-acroynms-while-spell-checking-vim/
  
  Suggests to add
  
  
     syn match UrlNoSpell '\w\+:\/\/[^[:space:]]\+'
  contains=@NoSpell
  
     syn match AcronymNoSpell '\<\(\u\|\d\)\{3,}s\?\>'
  contains=@NoSpell
  
  
  in ~/.vim/after/tex.vim but it doesn't seem to work.
  

I suspect that you need to get your matches contained in various
groups. For a start, consider also trying (in ~/.vim/after/tex.vim)

syn cluster texFoldGroup add=UrlNoSpell,AcronymNoSpell


You didn't provide any examples, so the above is a guess.

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/a0dd807a-26c9-53ce-696e-e1af17557077%40drchip.org.


Re: VimDIFF - ONLY on the first field of two files ?

2021-04-01 Thread Charles Campbell

'Philip Rhoades' via vim_use wrote:

People,

I live in vim and therefore use vimdiff most of the time for my needs 
but I have a use case where I only want to diff on the FIRST field of 
two files ie the files have lines that look like:


  [dir|file]name | [D|F] | mtime

and I need to be able to have vimdiff only working on the 
[dir|file]name and ignore the rest of the line - is this possible 
somehow?
Check into the NarrowRegion plugin by Christian Brabandt 
(https://www.vim.org/scripts/script.php?script_id=3075). I haven't used 
it to do what you're asking for, but it seems to me that this plugin 
might help you. Its worth a try, anyway.


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/da96fbad-41fe-bef8-6d0c-16e7ca78a8b6%40drchip.org.


Re: Use :bdel to close directory listing?

2021-03-08 Thread Charles Campbell

Roland Freikamp wrote:

Hi,

since this is still really annoying me, I have to ask again, if there is
*any* solution.


You can use :bd! to force a real deletion of a directory
as opposed to just hiding it.

Unfortunately, this does not work. No matter how often I type ":bd",
":bd!", ":bn", ":bw", ... nothing happens.
(VIM 8.2, netrw v168)

Example:

- directory structure:

 ./dir/
 ./dir/subfile
 ./file

- vim *

Result:
- vim shows the "dir"-directory-listing, and there is no way to (a) delete
   the buffer or (b) switch to the next buffer with :bd/:bn.
- :n switches to the next buffer, but does not cycle/wrap-around.
- The *only* way to close the directory-listing, is:
   - :buffers
   - look for the buffer-numer
   - :bdel 
   - :bn
   In earlier vim-versions, :bdel was enough.

So, is there *any* way to solve this, so that :bdel (or some other command)
closes the directory listing and switches to the next buffer?
(Or maybe a way to prevent "vim *" to open directory listings at all?)


Well, I just don't see that problem.

vim *
shows the dir/ and its file,
:bn then moves on to "file".

Repeating, and instead of :bn I used :bd -- and the "file" is opened 
with contents shown.


Perhaps upgrading netrw would be of assistance in this; its at 171g 
(v170 should be available as a regular vim update, and 171g is available 
from my website as http://www.drchip.org/astronaut/vim/index.html#NETRW).


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/79dd5d01-6f49-6f97-08ef-a3879c5a8a41%40drchip.org.


Re: Highlight email headers with different colors

2021-02-02 Thread Charles Campbell

Ian N wrote:

Thank you Christian!
This is exactly what I have already done.

Indeed, the mail.vim file highlights all the mail headers, with the 
same color (white in this case).


My question is about how to customize these colors (when writing the 
mail) - say From: field blue, To: field red, ...
I am trying to understand the mail.vim file. It seems it defines the 
mail header fields all together and colors them with one color.


I am looking for a way to customize the mail header fields
colors individually.
Ian

You'll need to make a customized syntax/email.vim file. I suggest going 
about this one field at a time.


Copy your system's email.vim into $HOME/.vim/syntax/email.vim.
Work with the copy:

Example:
    modify: syn region mailHeader ... remove "|from" from its start pattern
    new syntax: syn region mailHeaderFrom
    new highlighting: hi def mailHeaderFrom (whatever start= cterm= 
gui= stuff you want)

    quoted regions: include mailHeaderFrom in mailQuoted[1-6]

Rinse and repeat for whatever fields you want to modify the highlighting 
for.


Your version of email.vim will then override the system version, which 
you should NOT modify. Future updates to vim could easily wipe your 
modified email.vim away should you happen to modify the system version 
in place.


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/2cf3381f-b2d1-5547-1807-2ed04538d8b7%40drchip.org.


Re: do plugins affect performance?

2021-01-07 Thread Charles Campbell

gevisz wrote:

вс, 3 янв. 2021 г. в 14:09, meine :

Does anyone know if installed plugins affect the speed of Vim
when they are not used?


It is not clear what you mean by "not used plugins".

If "not used" here means that these plugins are not loaded
into the memory while Vims starts, I cannot see any reason
why they should have any influence on its performance.

If, however, "not used" means that they are loaded into
the memory while Vim starts but eventually are not used
by the user, then of course they can affect its performance,
for example, by constantly checking if the user has not
entered a sequence of symbols that should be processed
by them.

I agree with gevisz: a plugin could have an impact on performance even 
if not used. Just imagine that there's a busy wait loop that fires up 
when the plugin is loaded -- it would just hog the machine (well, at 
least a core).


Nonetheless, mostly what plugins do upon startup is:

  define functions
  define various mappings, commands

Vim, of course, does have to determine whether or not a given sequence 
of symbols invokes a command, function, or mapping. There are a number 
of ways to do this; some are log-m (m=qty characters in the string, 
n=qty of strings), so adding in extra mappings, commands, and functions 
should be negligible cost in time.


So, I would not expect unused plugins to exact a performance cost.

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/03ba79aa-8335-7195-7246-24609e988f9c%40drchip.org.


Re: syn region start="first line" end="first line"

2021-01-06 Thread Charles Campbell

Oskar Sharipov wrote:

Hi!

I'm doing a syntax file for my own silly made up filetype. The first
line of a file is always tag-section and I want to highlight it. There
is no special pattern for searching by regexp --- the aim is to
highlight the first line ALWAYS.

For example, in this context:

Blah-blah

foo, bar,
one, two, three.

only "Blah-blah" must be captured for highlighting with `hi def` later.

Could I use `syn region` for that purpose and how? If not what're other
ways to do that?


Hope the attached file helps. It uses syn match with a pattern using \%1l .

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/f89dfadb-c1c5-27b2-7923-93603ec5cf7c%40drchip.org.
if exists("b:current_syntax")
 finish
endif

syn clear
set ft=firstlineonly
syn match FirstLine '^\%1l.*$'

if !exists("did_firstlineonly_inits")
 let did_firstlineonly_inits= 1
 hi link FirstLine Comment
endif

" vim:


Re: why doesn't min take more than 1 parameter?

2021-01-04 Thread Charles Campbell

L A Walsh wrote:


Hey, do you know how to determine the number of columns taken up by
fdc?  Doesn't seem I can use fdc directly as a number though.


Try using  ; the ampersand means to grab the information from an option.

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/9fe56fc9-c4fe-bc97-bcac-53d123e62a2b%40drchip.org.


Re: Matching a non-match

2020-12-20 Thread Charles Campbell

A. Wik wrote:

Hi all,

Browsing a directory listing, sometimes I hit lines like these:
./spool/exim/input/1FM8sl-4n-Ix-H
./spool/exim/input/1FM8sn-4u-OF-D
./spool/exim/input/1E9dsQ-4f-MO-D
[... thousands of similar lines ...]

How can I use "/" to find the next line not matching the above
pattern?  I've tried the following (and several variations):
/\(.*exim.input\)\@
Hello:

You could use LogiPat: :LP !"exim/input" and find the next line. Or, you 
could use :LPE !"exim/input" and be given the expresson LogiPat used. 
LogiPat comes with vim, by the way.


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/e977745d-17e9-87ab-e057-992e622be1e7%40drchip.org.


Re: Vim-script question

2020-12-10 Thread Charles Campbell

aroc...@vex.net wrote:

I want to include in my .vimrc an autocommand that writes some new lines
into an empty file e.g. an zsh script.


A possible alternative is to use a "here" document containing whatever
boilerplate you want, in a shell script that then opens vim on the
resulting file.


Another alternative: in your $HOME/.vim/filetype.vim :

    au BufNewFile *.zsh  :0r $STUB/stub.zsh

You'll have to set up a STUB environment variable a path to a directory 
you set up.
Then, put stub.zsh in there with whatever you'd like to start your zsh 
file with.


Repeat for whatever other filetypes you want.

Regards,
Chip Campbell

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

--- 
You received this message because you are subscribed to the Google Groups "vim_use" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/78eb93bd-4092-a77c-f268-baf42ded1c5e%40drchip.org.


Re: help with map(), please!

2020-11-27 Thread Charles Campbell

Salman Halim wrote:

Dr. Chip,

I may be trivializing what's happening, but have you considered using 
\_s instead of just \s?


Or passing it to another map that calls trim before?

Something like split -> mapWithTrim -> yourOriginalMap

I'm sure I'm missing something obvious because someone with your 
experience wouldn't ask a question if it were this simple. Also, I'm 
using my mobile phone right now so I can't actually type the full syntax.


I would've used a join instead of the last map and just wrap the 
result in a <> pair.
Actually, a join is in use .. but it needed several processing steps. 
Thank you! I don't think I've ever used (or noticed) trim() before. 
Still plenty to learn, and trim did the trick. Still, I think an example 
using substitute with map would be a Good Idea. I did finally get it to 
work, but then your note about trim() appeared, and I switched to using 
that.


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/67a72d06-cc3a-9069-a928-0daf32cfa247%40drchip.org.


help with map(), please!

2020-11-27 Thread Charles Campbell

  
  
I'm having a bit of a problem with map(). I've had problems with
map() before, and consequently I really really hate to use it.
Here goes:

1: construct a comment:
"   Testing: one two | three four | five | six |
  "    seven | eight |;

2. grab characters: 
foj$"ay


3. convert to list:
let list= split(@a,'\s*|\s*;\=',' ')

4. Now, try to use map():
call
  map(list,"substitute(v:val,'<&>','','ge')")
  
  Intent: to put <...> around every argument. Now, this isn't
  really my final intent for this, but if I could get that
  substitute to work, it'd be a nice start. Please note, the request
  is on how to get a substitute() to work with map(), not to put
  angle brackets around every list element, for which :help map()
  already has an example.

5. Bonus request: my construction above carefully gets a newline
into the list. Using :echo string(list):
['one two', 'three four', 'five', 'six', '
  seven', 'eight', '    ']

    I cannot seem to get rid of the newline, but its probably due to
my lack of success with substitute().

I've spent about three hours on this so far, with multiple attempts,
all unsuccessful. Perhaps an extra example in help map()
illustrating how to do this would be of use?

Thank you,
Chip Campbell
  




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

--- 
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/91e26ba3-9e1b-19ad-3c43-ff7b42a0de3c%40drchip.org.


Re: Fwd: Selective spellchecking

2020-10-15 Thread Charles Campbell

BPJ wrote:
Another case of me not finding the relevant parts/tags in the 
documentation:


Where can I find out how to set things up so that spell checking 
ignores markup, or conversely so that it ignores everything except 
comments? I'm sure it works through associating spell check with 
certain highlight groups — I just can't find it!


That's a function of the syntax highlighting files; roughly:  syntax 
[match|region] SomeNameHere patterns/start=pattern/end=pattern ... 
contains=@Spell


So one specifies  that a syntax match or region will support spell checking.

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/d0ed781e-6208-9693-be3f-6ce5441b6149%40drchip.org.


Re: Use :bdel to close directory listing?

2020-10-11 Thread Charles Campbell

Richard Mitchell wrote:



On Saturday, October 10, 2020 at 5:40:00 AM UTC-4, Tony Mechelynck wrote:

On Sat, Oct 10, 2020 at 11:29 AM Tony Mechelynck
> wrote:
>
> P.S. I can get (from Belgium) to Dr. Chip's site with no problem
but
> downforeveryoneorjustme.com 
cannot.
>
> Best regards,
> Tony.

P.P.S. I tried to Cc Dr. Chip on the above message but I got a
bounce:
"drchip wasn't found at campbellfamily.biz
"

That message was headed "Office365" and its From: line was
postm...@ekghgbhkzak1qwzjttzjlplcfcx.onmicrosoft.com 

Best regards,
Tony.


I am intrigued DrChip.org failed for your test site.  It worked for "me".

I wonder if the dns server i'm using had a long TTL.  Currently I show:

;; ANSWER SECTION:
drchip.org.14374INA67.23.226.159

so, I have 14374 seconds to go before it updates again.
However, as Chip as already weighed in, if he had recently changed
anything, he certainly would have said so and he didn't.

I want to make it clear I never doubted Dominque was having a real issue
and was hoping the IP address would give him a work around and something
to check against his own query.

campbellfamily.biz.3600INA66.96.149.21

uses a different registrar and name servers.  doesn't mean anything, 
just an observation.



Some random thoughts in no particular order:

My email now is: NcampObell@SdrPchip.AorgM-NOSPAM (ie. remove the NOSPAM 
from the address).


It used to be drc...@campbellfamily.biz, though. I updated all the 
syntax files I support with it but then I updated syntax/vim.vim, and my 
script for the auto-generated portion hadn't been updated and I'm afraid 
I didn't notice and so syntax/vim.vim got left with a stale address.  
I've fixed that just this past week.


I myself didn't know that the www. in www.drchip.org was optional. I 
doubt that I can train my fingers to skip typing the www. .


14374 seconds -- well, that's only four hours!  What's the rush? :)

I just tried Tony's suggestion:https://downforeveryoneorjustme.com/
and it worked, both with www.drchip.org and with drchip.org.

Dominique -- did using the ip address directly help?  What did 
traceroute show? Does nslookup get the ip address?


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/8576fcb3-39bd-aa32-62df-704b2b58c59f%40drchip.org.


Re: Use :bdel to close directory listing?

2020-10-09 Thread Charles Campbell

  
  
Richard Mitchell wrote:


  
  
  

  
  
  On Friday, October 9, 2020 at 6:28:55 PM UTC-4, Dominique
  Pelle wrote:
  Charles
Campbell <camp...@drchip.org> wrote:


> You can get v171a from my website:

> http://www.drchip.org/astronaut/vim/index.html#NETRW
.


Hi Charles


The above URL and your website http://www.drchip.org/

do not work for me somehow. I get "The connection has

timed out".  It does not look like a temporary outage, since

I remember trying a few  weeks ago and it did not work
either.

I cannot ping www.drchip.org either.


Regards

Dominique

  
  
  
  
  
  Works for me.  DNS shows:
  
  
  
www.drchip.org is an alias for drchip.org.
drchip.org has address 67.23.226.159
drchip.org mail is handled by 0 drchip.org.

  

  

Richard's results look like what I see with nslookup:
www.drchip.org    canonical name = drchip.org.
  Name:    drchip.org
  Address: 67.23.226.159
  

That's been my website for years, too. Perhaps you can try
traceroute and find out what's dropping the link.

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/bb76d3f6-6e6a-3802-fc87-578f771dc672%40drchip.org.


Re: Use :bdel to close directory listing?

2020-10-09 Thread Charles Campbell

Roland Freikamp wrote:

Hi,

in earlier ViM-versions, :bdel could be used to close directory listings,
and e.g. :bn could be used to switch away from the directory listing to
the next buffer.
But with newer versions, this unfortunately does not work anymore, which
makes it really cumbersome to e.g. view/edit all files in a directory by
"vim *".

Is there a way to fix this?
So, that I e.g. can do "vim *", and then close directory-listings with
":bdel" or switch away from a directory-listing by ":bn"?


Hello:

Let me explain why it is that the netrw buffer is (normally) hidden.  
Originally netrw was written to handle file transfers over the network 
via ftp, ssh, etc, and it still does.  The next major feature was to 
have netrw display and work with remote directories; Bram asked me to 
have it do the same thing for local directories. Often enough one does 
not have password-free setups to do remote work, and so one can get 
pestered by the resulting need to have to enter passwords for every 
remote listing/file transfer/etc. To facilitate this, netrw supports 
"fastbrowse" (see :he g:netrw_fastbrowse) which keeps netrw listings 
hidden rather than destroying them; subsequent requests to re-list a 
directory then just bring up the appropriate hidden file instead.


See :he 'bh' and, while in a netrw listing, try :set bh; you'll find 
that netrw has bh=hide. You can use :bd! to force a real deletion of a 
directory as opposed to just hiding it.


Alternatively, you can put let g:netrw_fastbrowse=0 and :bd will then 
truly delete the netrw buffer -- if you have v171a (or later) of netrw. 
It was already supposed to be deletable when g:netrw_fastbrowse was 
zero, but s:NetrwSafeSetting() needed an update to force that "safe" 
setting for netrw buffers (hence v171a).


You can get v171a from my website: 
http://www.drchip.org/astronaut/vim/index.html#NETRW .


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/dc404e87-8692-032f-a37f-219b5a988986%40drchip.org.


Re: Error in bash syntax file

2020-08-04 Thread Charles Campbell

'J S' via vim_use wrote:

The following line of legal bash code gets flagged as an error:

echo ${@:i:1}

The above line displays the i'th command line argument.

I am running vim 8.1, with lots of patches applied.  My sh.vim files (3 of 
them) are all dated Jun 15, 2019.

Hmm, that format, ${@:var1:var2} doesn't appear to be explicitly 
mentioned in the bash man page (although ${parameter:var1:var2} is).
So, please try the sh.vim from my website: 
http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH (put it into 
your personal $HOME/.vim/syntax folder).


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/9c4ddd20-dafc-c7a0-47e1-da55b48d1e86%40drchip.org.


Re: persistent highlight between marks ?

2020-06-29 Thread Charles Campbell

M Kelly wrote:

Hi,

Anyone know of a way to set a start mark and then an end mark and then 
highlight all text between them ?
So that is stays highlighted, even if I move the cursor away or scroll 
etc.

Sort of like a visual mode selection that remains after you move away.


See :help matchadd for a general solution.

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/597b10a8-de2e-dc57-2e5f-a5bd14df43b8%40drchip.org.


Re: Input continuous stream of digraphs

2020-06-18 Thread Charles Campbell

  
  
Tony Mechelynck wrote:


  

  On Wed, Jun 10, 2020 at
12:06 PM Manas 
wrote:
  
  

  Hi guys, I want to know if it is possible to input
digraphs continuously.
  For example, when writing some math related assignment,
often I have to write many symbols which I do using
digraphs. But using  every time seems
tedious. Is there a way I can make  (or
anything else) work for infinite digraphs, until I
manually end it.
  Thanks
  
  -- 
Manas
CSAM Undergraduate 2022
  


  
  Rather than digraphs, maybe use a keymap (see :help
mbyte-keymap)? I use that (rather than strings of digraphs)
when writing Russian, or mixed Cyrillic and Latin as in my
Russian-French dictionary; and I have a different one for
Arabic, where there even aren't any digraphs (both of them
own-coded because the keybord layouts, if any, distributed
with Vim for these scripts don't suit me). It works quite
well.

For math, Dr. Charles "Chip" Campbell wrote a "math keymap
and menu". The following links are from his Vim page, http://www.drchip.org/astronaut/vim/
:
  
  • stable version: http://vim.sourceforge.net/scripts/script.php?script_id=2723
  
  • latest "beta" version: http://www.drchip.org/astronaut/vim/#MATH
  

  

Since you mentioned it, Tony -- I decided to update my website with
a new version of the "math keymap and menu" vimball.  Mostly just
the "mathify" has been updated.  With it, one could type 12345678,
then visually select the digits, and hit ^ to cause them all to
become superscripts.  Do the same thing with "abcdef" and hitting
&, result would be αβψδϵφ (ie. Greek variants).  Not quite the
same as a "digraph mode", but one does get a lot of conversion with
but a few keypresses.  Here's an example:

┌─┐
│  dilog  │
│  Li₂(x) │
│ │
│  ∞  xᵏ  │
│  ∑  ――  │
│ k=1 k²  │
└─┘

(I used DrawIt to do the box, btw, also available at my website:
http://www.drchip.org/astronaut/vim/index.html#DRAWIT )

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/29534d5e-2490-4fdb-d958-7db140c9f4b8%40drchip.org.


Re: Highlighting c-like for-loops in bash

2020-05-20 Thread Charles Campbell

Hakim Benoudjit wrote:

Hi,

Thanks for your email.
Please find attached the small script bash I tested where the 
variables i, j, limit_t, limit_j are unfortunately not highlighted in 
the standard for-loop, in contrast to the label variable in the 
for-each-like loop.


Hakim.

On Wed, May 20, 2020 at 4:47 AM Charles Campbell <mailto:campb...@drchip.org>> wrote:


Hakim Benoudjit wrote:
>
> Hi,
>
>
> I wasn't sure if this was a bug or not, so I've updated my Vim
version
> to 8.2 on Ubuntu 18.04.
>
> And, as you can see below, the variables in the standard for-loop
> aren't highlighted as they are in the following for loop:
>
>
Hello:

I'm the maintainer of syntax/sh.vim ; would you please send me an
attachment of the code snippet you're having a problem with?

With the script you sent I can use hilinks.vim 
(http://www.drchip.org/astronaut/vim/index.html#HILINKS) to see what's 
happening.


In the for (( ... )) loop, the items inside are highlighted as shForPP ; 
ie. as inside a region.  The variables themselves are not individually 
identified.  The "<=" and other operators are highlighted as shTestOpr 
(ie. operators).  All is normal.


In the first echo ... the variables are, again, not identified as 
variables; instead, they're being shown as 
shDo->shDo->shEcho->shDoubleQuote ; ie. regular string highlighting.


In the second outside loop (ie. the one with "label"), label is not 
recognized as a variable.  Instead, its being recognized as being inside 
a for loop (shFor), so its being highlighted correctly for that 
situation.  Copying the echo "i:..." into the body of the "label" for 
loop shows its highlighted the same as in the other place.


Generally, I try not to identify variables because of the potential 
problems (is it really an alias? a function? etc); remember, the syntax 
highlighter isn't a parser.  I do have a shVar; I'll have to see if 
including it in the for loops' containment lists causes problems.


So, insofar as the variables are concerned, the highlighting is 
performing nominally.


That said, there seems to be some unwanted highlighting associated with 
the double quotes, and I'll look into that.


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/8937bba7-1ece-8d2e-31c4-8731e37474fc%40drchip.org.


Re: Help: swap file created in vim each time I am editing code ?

2020-05-04 Thread Charles Campbell

George Dinwiddie wrote:

Kunal,

On 5/2/20 11:59 AM, Kunal Chauhan wrote:

Hi Team,

I am facing issue that each time a swp file is created as I am 
editing code.


The .swp file is a normal part of vim operation. If you exit the file in
a normal fashion, vim will delete the .swp file.





Description is below :

(1) Another program may be editing the same file.  If this is the case,

 be careful not to end up with two different instances of the same

 file when making changes.  Quit, or continue with caution.


If you open another window on the same file, then both windows will be 
fighting to edit the same file with indeterminate results.




(2) An edit session for this file crashed.

 If this is the case, use ":recover" or "vim -r 
/home/divyanshu/kunal/madLte/vRSC


-Client/oam/lte_tr069/cwmp/common/include/map_glue.h"

 to recover the changes (see ":help recovery").

 If you did this already, delete the swap file 
"/home/divyanshu/kunal/madLte/vRSC


-Client/oam/lte_tr069/cwmp/common/include/.map_glue.h.swp"


If you exit without letting vim do this cleanup, you'll get that 
warning when you reopen the file. This can happen if you shut down 
your computer with vim windows open. Exit all files before terminating 
vim and this won't happen.
If you insist on being unable to recover from various issues, you can:  
:set noswf  .  That will turn swapfiles off.


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/9f549c70-6d02-fd94-d784-4bd9f5505b13%40drchip.org.


Re: Help: ctags in vim ?

2020-04-29 Thread Charles Campbell

Kunal Chauhan wrote:
1. I have added simple a new function to my source dir and running the 
ctags - R but still at new functions tag is not working.?



2. At each time i opened my source code i need to execute ctags again ?

3. How Can I use  ctags and cscope while I have already opened my file 
in vim.


1: As I understand things, you haven't compiled your code (yet). Simple 
syntax errors, typically caught by a compiler, can occasionally cause 
problems for ctags.  Assuming that you've gotten rid of your "tags" 
folder so that the ctags can successfully generate a "tags" file, try 
running ctags on your C files one at a time.  Does that work (ie. tags 
are produced)?  Note that each invocation of ctags will wipe out the 
previous work, so this is not a suggestion of how to generate all the 
tags you want, rather a way to find what files are causing issues for ctags.


2. Only when you feel the need -- ie. when you've installed new 
functions, changed functions' argument lists/types, etc.  Of course, 
ctags can tag more than just functions -- local typedefs, etc.


3. When in vim, and editing one of your source files, use  :tag 
FUNCTIONNAME , for example, with FUNCTIONNAME being one of your 
functions' names.  That will exercise your ctags feature (assuming you 
have +tag_binary as a feature).
  For cscope, first check that you have +cscope as a feature (vim 
--version).  If you do, then read up on  :help cscope.


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/f990da08-a941-496b-446e-331fd4f256b1%40drchip.org.


balloon expressions and changing workspace

2020-04-14 Thread Charles Campbell

Hello:

I can use a balloon expression (onlookers: see :help 'bexpr') that 
creates a small balloon text -- but it persists when I change workspaces 
(Scientific Linux and I also use mate: yum -y groupinstall mate-desktop) 
(ie. ctrl-alt-arrow).  When its displayed on the wrong workspace, its 
annoying and sometimes covering up something I need to see.  Personally, 
I think vim ought to remove any balloon texts when the workspace is 
changed automatically; but nonetheless, it ought to be possible for me 
to clear them.  I've tried using FocusLost (the only autocmd event that 
fires on a workspace change), but I can't seem to clear the balloon.  
I've tried having the autocmd set nobeval and having a test in the 
balloon expression function do a if  == 0 | let mesg= "" | endif 
(and the function returns mesg).


No luck, the balloon insists on being displayed in the wrong workspace.  
Any known workarounds?


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/68bab8f1-9447-3782-49dc-8b68fbdc1a3a%40drchip.org.


Re: netrw#BrowseX fails when invoked from gvim on Ubuntu

2020-03-11 Thread Charles Campbell

Garvin Haslett wrote:

I am using Vim 8.2 on Ubuntu 18.04.3

If I launch gvim and enter

:call netrw#BrowseX('http://github.com', 0)

the window flickers instantaneously and nothing further happens.

Performing the same action in terminal vim opens the URL in the 
browser as expected.


It seems likely that this is an issue with how Gnome hands this off to 
Linux. But where do I begin to prove this?



Well, here's two issues:

1) netrw requires a trailing "/", so you need 'http://github.com/' .  
Didn't you get an error message at the bottom of the display?
2) unless you're hosting github.com on your personal pc, you probably 
want "remote"


When I tried this with gx with the cursor atop the (corrected) 
http://github.com/ string, I got the html source as expected; that's 
with Scientific Linux.
So, as Christian Brabandt said, use netrw's debug mode and find out what 
its doing on your system.  If doing like I did (with gx) works, then run 
debugging with that, too, and compare.


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/8c1f491f-7d93-9810-f4c8-78e5e7396a7e%40drchip.org.


Re: vim html highlight not work.

2018-01-23 Thread Charles Campbell
Zhe Lee wrote:
> The filetype is html, and syntax is on.
>
>  the html.vim is in the \Vim\vim80\syntax\. But the html still not highlight 
>
>
> why is that?
>
What does  vim --version  (or :version when running vim) show?  In
particular, do you have +syntax or -syntax?  You'll need to have the
former to be able to have syntax highlighting.  You do realize that
html.vim itself will be highlighted according to vim's own syntax rules,
not html's.

What does :echo $VIMRUNTIME show -- and do you a) have syntax files in
$VIMRUNTIME/syntax, and b) have permission to read them at that location.

By "html.vim" are you referring to the syntax highlighting file that
came with vim or are you attempting to make your own?  If the latter,
you really should not be overwriting the vim version, rather you should
be putting it into $HOME/.vim/syntax .

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


Re: Advice needed: best practices for vim plugin testing

2017-10-20 Thread Charles Campbell
Felipe Vieira wrote:
> Hi everyone,
>
> I've been trying to develop a plugin and I'm used to writing testing for the
> softwares I develop. The problem is that I cannot find a suitable testing
> platform for vim plugins. This makes me feel uncomfortable in pushing
> improvements made on my own fork of a bigger project (this may adversely 
> impact
> hundreds of users, and I think the codebase is complex enough; tests would
> force some adherence to what is already coded and improve the plugin itself).
>
> I have tried a couple of other vim plugins for testing with little/no success.
> 
Have you tried pchk?  (http://www.drchip.org/astronaut/vim/index.html#PCHK)

The idea: create a file with a number of commands.

 * Run :PChkTry and fix your plugin until you have it working.  (your
plugin will be running in a separate vim window)
 * Run :PChkMake  -- this will, at every PChkSnapshot, take a hash of
the display of the remote vim window's contents and save it (along with
some geometry information, such as qty of windows, size of windows, etc)
 * In the future: use :PChk  -- that will compare the current plugin
performance with that of its previous performance (ie. if the hash is
the same, pretty much the display has not changed)

An excerpt from its help:

*PChkTry* *PChkMake* *PChk* *PChkStep*
Start a test by editing it, then run one of the following four commands:

:PChkTry  : try the test.  Will stop at :PChkSnapshot lines
:PChkMake  : make an Expected/tst###.out file
:PChk  : compare snapshot hashes currently obtained
with previously obtained expected test results
:PChkStep  : step through each line of a test, not just at
  :PChkSnapshots.


Test File Commands *PChkSnapshot* *PChkFeedkeys* *PChkPause*

:PChkSnapshot  : runs a hashing algorithm over the remote display.
Result is saved in/compared with Expected/tst###.out
:PChkFeedkeys ... : send keys to server.  ^X transla  
*PChkTry* *PChkMake* *PChk* *PChkStep*
Start a test by editing it, then run one of the following four commands:

:PChkTry  : try the test.  Will stop at :PChkSnapshot lines
:PChkMake  : make an Expected/tst###.out file
:PChk  : compare snapshot hashes currently obtained
with previously obtained expected test results
:PChkStep  : step through each line of a test, not just at
  :PChkSnapshots.


Test File Commands *PChkSnapshot* *PChkFeedkeys* *PChkPause*

:PChkSnapshot  : runs a hashing algorithm over the remote display.
Result is saved in/compared with Expected/tst###.out
:PChkFeedkeys ... : send keys to server.  ^X translates to control
characters (ie. ^M is a ENTER)
:PChkPause  : pause the test (uses |input()|).  One may
*  =continue
* c=check
* s=step
* t=try
:..cmd  : send cmd to server to execute..
^\s*#...  : echomsg comment in client vim (will not be sent
to server)
..cmd..  : send cmd to server to execute as a normal command
*..reply..  : netrw issues prompt; reply to it with this string
tes to control
characters (ie. ^M is a ENTER)
:PChkPause  : pause the test (uses |input()|).  One may
*  =continue
* c=check
* s=step
* t=try
:..cmd  : send cmd to server to execute..
^\s*#...  : echomsg comment in client vim (will not be sent
to server)
..cmd..  : send cmd to server to execute as a normal command
*..reply..  : netrw issues prompt; reply to it with this string


An example of a test file (for netrw):  (in a file called tst003)

# Make a file: %  (called TmpFile)
# Delete the file
:let g:netrw_pchk= 1
:cd dir001
:e .
:PChkSnapshot
%
*TmpFile
:call setline(1,"testing")
:PChkSnapshot
:w
:e .
:PChkSnapshot
:call search("TmpFile","wc")
:PChkSnapshot
D
*y
:PChkSnapshot

The :... commands are vim commands.  Without a ":" are vim normal-mode
commands/maps.

Hope that helps,
Chip Campbell

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

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


Re: Cannot create diffs (E97) with Vim 8.0 on Windows 7

2017-07-28 Thread Charles Campbell
Hugo Gagnon wrote:
> Hello,
>
> When I pick two files in Explorer and then right click -> "Diff with Vim" I 
> get the E97 error. I did read the E97 help file and checked if I had diff.exe 
> installed but I couldn't find anything odd.

By "Explorer", are you referring to netrw?  If not, ignore the rest of
this note, please.

Netrw does not provide a "Diff with Vim".  It does allow you to select
files (shift-leftmouse  -or-  mf), then select [Netrw:Marked Files:Diff]
This process uses vim's diffthis on the marked files.
The self-installing version of vim under Windows includes a diff program
with it; vim doesn't do diff on its own.
If you have a diff.exe (from which I'm inferring that you're using
Windows) make sure that its on your Windows path.  My windows speak is
rusty; that may be %PATH% ?  Someone please correct me on that.

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


Re: Disabling persistent undo for a file mask

2017-02-23 Thread Charles Campbell
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
:w
i three four
: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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
set nocp
set undofile undodir=$HOME/.vim/VITMP// undolevels=1000
autocmd! BufRead,BufWrite *.sec setlocal ul=-1 noundofile


Re: Problem with redraw

2017-01-10 Thread Charles Campbell
mrjn wrote:
> I see a lot of problems with Vim showing me the characters pressed in Normal 
> mode. I have to continuously press ctrl-l to redraw vim. I *think* this 
> started happening since v8.0 upgrade.
>
> Here's a snippet from vim --version:
> VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 15 2016 18:04:06)
> Included patches: 1-86
> Compiled by Arch Linux
>
No idea why -- but some ideas on what to do to find out what's going on:

* use:  vim -u NONE This way of starting avoids all your plugins and
your .vimrc (if any).  Still have the problem?
* if no, move all your plugins somewhere that vim won't see them.  Still
have the problem?
* if no, then you likely have a  plugin issue.  Move half your plugins
back  and repeat until you locate the problem-causing plugin.
* if vim -u NONE worked but moving all the plugins out did not fix
things, perhaps your .vimrc may have a setting issue.  Try commenting
out your settings until you find a culprit.
* if vim -u NONE did not work,  then it seems likely to me that you have
a terminal-vim issue.  Presumably the problem would not in that case
appear when you use gvim rather than vim. Look into your termcap or
terminfo database, whichever is appropriate.  Try xterm; vim works well
with it. If your vim is working well with xterm, but not with your usual
terminal interface, then you need to check out the various terminal
parameters (or switch terminal emulators, of course).

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


Re: vim 8.0 file explorer restrictions

2016-12-27 Thread Charles Campbell
Musat Eduard wrote:
> hy, my question here is about the allowed locations in the new vim 8.0 file 
> explorer netrw 156.
>
> i'm running vim 8.0 on a windows 7 system and i'm having this issue whenever 
> i open gvim (the one that runs in a window as opposed to running in cmd) the 
> default path in :pwd is c:\users\"user". if i use the :Explore command it 
> brings up the file explorer showing all the files in there but i can only go 
> up in file paths up to c:\users and that's it, i can't go any upper than that.
>
> more than that if i use the :cd command to go to a different drive (d:), it 
> does change the directory successfully and it does show it if i use :pwd but 
> if i use :Explore it doesn't show anything, instead it just does a split 
> screen of the same file containing the same text i have in the initial file.
>
> more than that, if i create an asdasd.txt file in d:\ and open it with vim 
> and then use :Explore again it does nothing, just goes back to the same line 
> of text i was on in command mode, almost as if the program is looking for 
> access to that directory or cancelling the command because of something like 
> that.
>
> also, i used vim 7.4 before this and it would any of the commands mentioned 
> as expected. any ideas what the problem might be? does it need any special 
> configuration?
>
> thanks,
> edi
>
I suspect most if not all of these issues have disappeared with v162h of
netrw (http://www.drchip.org/astronaut/vim/index.html#NETRW).  Please
try it out and see if you're still having problems.  I don't have a
windows 7 system available to me at the moment to try this out, btw.

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


Re: Is there a way to run a shell script that "calls" VIM from outside, passing parameters to it (without to open yours interface)?

2016-07-22 Thread Charles Campbell
toothpik wrote:
> On Thu, Jul 21, 2016 at 01:40:52PM -0700, Michel Grassi wrote:
>> Em quinta-feira, 21 de julho de 2016 17:01:41 UTC-3, Tumbler Terrall  
>> escreveu:
>>> Sure, make a custom function that takes parameters. Then call it from the 
>>> shell like so:
>>> vim -c"call MyFunction(myParameter1, myParameter2)"
>>> You'll need to dynamically fill in the parameters, but that should be 
>>> manageable.
>>>
>>> On Thu, Jul 21, 2016 at 1:36 PM, Michel Grassi  wrote:
>>> Hi,
>>>
>>> I'd like to know if someone here can help-me.
>>> I need to store in a variable in the shell prompt the stdout of "vim -c 
>>> {parameters}".
>>> But to make it works and meet my need, the Vim must be run
>>> externally by the shell (something like "vim -c{input recognized by
>>> vim}"), passing it input parameters and the result of this output,
>>> store in a variable X.
>>>
>>> I tried using the command vim -c 'command vim' but this did not work
>>>
>>> Explaining what I need is:
>>>
>>> 1) The Vim must be "called" by a script.sh and should take
>>> parameters as input to do something.
>>>
>>> 2) This parameters, will be passed to vim in variables (three
>>> variables). The variables are: $A, that contains a file name, $L
>>> that contains the number of a line of this file and $C that contains
>>> column number (the cursor position on the line $L)
>>>
>>> 3) With those data, the vim will use this input shift the cursor to
>>> the line $L at position $C of $A file.
>>>
>>> 4) Once the cursor being in the requested position, the char
>>> contained in the specified position must be copied and assigned to
>>> the variable X shell.
> at the risk of uttering blasphemy on the vim-use list, wouldn't awk be
> better suited to this task than vim?
>
I agree that it sounds like awk would be better.

Nonetheless: if after looking at what awk can do, and it seems that vim
is still the way to go:

* use vim to generate a file script
* use your script and run that file script (using . scriptname   so the
variables are in the environment).
* I'm assuming by "kernel variable" you actually mean "environment
variable".  If you really mean a kernel variable, such as may be found
occasionally in files such as /proc/sys/kernel/core_uses_pid, this would
be a dangerous approach until you're absolutely certain that things are
working correctly.

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


Re: Spellcheck after Ellipsis again

2016-06-13 Thread Charles Campbell
David Woodfall wrote:
>>> Hi
>>>
>>> Someone on the list gave me a way to stop spellchecker picking up on
>>> uncapitalised words after an ellipsis, which I use in
>>> ~/.vim/ftplugin/tex.vim and it works great.
>>>
>>> However, I found that the same thing in txt.vim doesn't work.
>>>
>>> Any idea why this is not working?
>>>
>>> These are the lines:
>>>
>>> setl spell
>>> syn match Ellipsis /[.][.][.]\s\+\l.*\>/ contains=@NoSpell transparent
>>> syn match Ellipsis2 /[.][.][.]\n\s\+\l.*\>/ contains=@NoSpell
>>> transparent
>>> syn cluster Spell add=Ellipsis
>>> syn cluster Spell add=Ellipsis2
>>>
>>> I also put them in ~/.vim/plugin/settings but that doesn't seem to
>>> work either.
>>
>> OK I have found what the problem is, but haven't yet found a fix.
>>
>> In my txt file I have a modeline:
>>
>> % vim: syn=tex
>>
>> If I take that out it works as expected, but I want to use tex syntax.
>>
>> Any ideas? (Other than renaming my txt files to tex)
>
> Actually, renaming doesn't work either. It seems that some things are
> still spellchecked up the top of the document. If I put an ellipsis
> near the end it's fine.
>
> Stumped...
>
> I'm sure there is a setting for how much of the buffer is checked, but
> I haven't found it yet.
>
Spellchecking is specified on a syntax-region/syntax-match basis.  The
syntax-tex file has a lot of regions, and your Ellipsis match is not
contained in any of them; ie. it would apply only to wherever there is
no region/match in effect.

  * approach#1: use the hilinks plugin
(http://www.drchip.org/astronaut/vim/index.html#HILINKS) to identify
regions that you want modify contains lists:  ex. syn Ellipsis ...
containedin=texSectionZone
  * approach#2: add your region to one or more of the clusters that
syntax/tex uses: ex. syn cluster texFoldGroup add=Ellipsis

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


Re: How to detect the file type in vimrc?

2016-04-07 Thread Charles Campbell
Albert Berger wrote:
> On Wed, Apr 06, 2016 at 10:21:42PM -0700, Ben Fritz wrote:
>> On Tuesday, April 5, 2016 at 2:44:23 PM UTC-5, Albert Berger wrote:
>>> Greetings!
>>>
>>> How does one detect the file type in .vimrc? AFAIU, 'filetype' setting is
>>> not yet set when .vimrc is processed. The following check doesn't
>>> work in .vimrc:
>>>
>>> if ==cpp
>>> ...
>>>
>>> I want to distinguish between 'c' and 'cpp' for *.h files in which
>>> the file type is specified in the modline. Is there a function which
>>> can be called for reading the modline? I know that one can use autocmd,
>>> when the file type read from the modline is already set, but is there a
>>> way to get the modline variables in .vimrc?
>>>
>>> Thanks,
>>> Albert.
>> No, you'll need to use an autocmd. In which case you may as well use a 
>> FileType autocmd. The modeline, like the filetype, has not been processed 
>> yet while reading the .vimrc.
>>
>> Indeed, I'm pretty sure the file itself hasn't been read yet when reading 
>> the .vimrc, but I may be wrong about that.
>>
> Looks like this is the case. Will use FileType autocmd. Thanks.
>
Alternatively you may use a ftplugin file:  ~/.vim/ftplugin/cpp.vim  and
put whatever you want in there.

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


Re: Open All Folds When Opening a File

2016-04-04 Thread Charles Campbell
goldhexter wrote:
> Hello all,
>
> I've used VIM for basic editing, but am new to using it as a full fledged 
> development environment. Much of my coding is via Python so I've installed 
> the SimpylFold plugin via Vundle. All is fine, I can unfold and fold using 
> the "z" options. However, what I'd like to do is always have a python file 
> unfolded completely upon initial opening (or even better would be to save 
> state if that is possible). I.e. have VIM automatically execute a "zM" each 
> time a file is opened.
>
> Is there any straightforward way to do the above (am really a newbie at this 
> at the moment).
>
* you want to use zR to open all folds
* you want to have something happen just to python files, so therefore:
make a file called  .../.vim/ftplugin/python.vim .  This file will be
sourced whenever one opens a python file.
* Place   norm! zR  in the .vim/ftplugin/python.vim file.  This will run
zR as a normal command (as opposed to a command-line one).

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


Re: netrw :Explore setting current buffer to hidden

2016-02-29 Thread Charles Campbell
gt.ma...@gmail.com wrote:
> hello all,
>
> On Vim 7.4.1401 (OS X 10.11.3), netrw’s :Explore is acting very weirdly for 
> me.
>
> My workflow is to usually open some file, use :Explore to search for related 
> documents and switch between buffers as I need. Since at least 7.4.1401 
> calling :Explore hides the current buffer, even if it has been edited. 
>
> Steps to reproduce:
> 1. Start with `vim file1.txt`;
> 2. inside vim use `:Explore`;
> 3. open `file2.txt` and find that `file1.txt` is not available anymore and is 
> not displayed on`:ls` — the only way to access it is to use `:ls!`, check the 
> buffer number and use `b{buffer_number}`.
>
> Since I’m managing vim with homebrew, I reverted to the previous version, 
> 7.4.1345, and it seems to fix the issue at hand. It does not seem to be 
> related to plugins (have disabled most of them before posting this).
>
> any clues on what might be happening? is this an actual issue or was I 
> relying on faulty behaviour (seems unlikely since I've been netrw in this 
> manner for at least 2 years now)?
>
Hello!

I see the problem; I'll look into it.

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


Re: netrw :Explore setting current buffer to hidden

2016-02-29 Thread Charles Campbell
Justin M. Keyes wrote:
> On Mon, Feb 29, 2016 at 12:31 PM, Charles E Campbell
>  wrote:
>> Justin M. Keyes wrote:
>>> netrw is 11,000 (eleven thousand) lines of code without any automated
>>> tests.
>> That, as it turns out, is not the case.  I do have automated tests for
>> it.  The tests are based on pchk
>> (http://www.drchip.org/astronaut/vim/index.html#PCHK); however, ever
>> since patch#866, there's been a problem with hanging (probalby due to a
>> race condition in vim), so I haven't made the pchk-based test suite for
>> netrw available.
> I mean "automated" in the sense that any Vim regression would be
> immediately caught. How much coverage would you estimate?
>
I currently have 56 test files and am adding more as time goes on, with
over 930 lines in the test files.  "Any regression" is overly broad, as
I'm sure that there are cases that I haven't covered.  There are four
display types (thin, long, wide, tree).  Various patterns may be used to
include/exclude listings.  Trees have a lot of differences, as more than
one directory is being shown at a time (unlike thin, long, wide).  Users
may have differing settings with "interesting" interactions.  I'm going
over old bug reports and making pchk tests from them.

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


Re: Can you edit EBCDIC files on non-OS390 builds of VIM?

2016-02-08 Thread Charles Campbell
Justin Dearing wrote:
> I'd like to edit EBCDIC encoded files in VIM on windows vim --version shows 
> this:
>
> VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 16 2015 08:44:57)
> Included patches: 1-872
> Compiled by 
> Huge version without GUI.  Features included (+) or not (-):
> 
> -ebcdic  +mouse   +smartindent -xim
> 
>
> I cloned the git repo and configure --enable-ebcdic was not an option. 
> Looking at src/auto/configure, it looks like ebcdic support is enabled if 
> ASCII support is not present. Is there an option to turn it on?
>
I haven't used EBCDIC in decades, I'm afraid.   I mostly use Scientific
Linux.  I have some leftover script that still seems to work:

"  editing EBCDIC {{{2
augroup EBCDIC
 au!
 au BufReadPre  */EBCDIC/*  :let g:binkeep= |set bin
 "au BufReadPost */EBCDIC/*  :%!iconv -f EBCDIC-US
 au BufReadPost */EBCDIC/*  :%!dd conv=ascii
 au BufReadPost */EBCDIC/*  :let = g:binkeep|unlet g:binkeep
 "au BufWritePre */EBCDIC/*  :let g:binkeep= |set bin|%!iconv -t
EBCDIC-US
 au BufWritePre */EBCDIC/*  :let g:binkeep= |set bin|%!dd conv=ebcdic
 au BufWritePost */EBCDIC/* :let = g:binkeep|unlet g:binkeep
augroup END

So, I have an EBCDIC directory; anything in it is, presumably EBCDIC. 
Still works with the vim I use. Clearly, its using system tools (iconv,
dd) which you're unlikely to have under Windows, unless cygwin happens
to provide them and you use cygwin.

So, if its of use, enjoy!  If not, ignore at will.

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


Re: How would you repeatedly produce these lines?

2016-02-01 Thread Charles Campbell
etoipm...@gmail.com wrote:
> I'm coding in Python and need to produce a number of lines like the following
>
>> p3[0] = {'name': , 'symbol': , 'number': }
>> p3[1] = {'name': , 'symbol': , 'number': }
>> ...
> and I'm wondering the best way to go about this.  My main thought is to just 
> copy-paste and maybe fill the brackets with some kind of place-keeper and 
> then try to figure out a way to sequentially replace them with increasing 
> integers.  But somehow it seems like there out to be a more elegant Vim 
> solution.
>
> Any thoughts?
>
I'd write the first line:
  p3[0] = ...

Yank it (Y) and put it (say I wanted twenty copies:  19p
Then I'd use ctrl-v and highlight all the 0s.
Then I'd use  :I

The latter command is supported by visincr
(http://www.drchip.org/astronaut/vim/index.html#VISINCR).  It can do
incrementing/decrementing things with binary, octal, hexadecimal, roman
numerals, daynames, monthnames, and dates (ymd, dmy, mdy).

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


Re: detach current tab into a separate window

2016-01-15 Thread Charles Campbell
kamaraju kusumanchi wrote:
> window. This window spans across one whole monitor. Now when writing
> new code to call a function, I want to split two tabs from this window
> and move them to the second monitor. These tabs typically contain the
> header file, another C++ file where a function was used before. This
> way I can look at the API, sample usage and add code in the current
> window. thanks raju 
Hello:

May I assure you that, using vim terminology which seems apropos since
we're talking about vim, that you do not have a vim window spanning the
whole monitor containing tabs.  One may have several tabs; each tab
takes up the entirety of vim's display excepting: tab choice line, gui
icon line, and commands/status line(s).  Each tab may hold a
multiplicity of windows, NOT vice versa.  Hoping to straighten this out
before confusion sets in.

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


Re: Try this with release gvim74-1024.exe

2016-01-13 Thread Charles Campbell
Christian Brabandt wrote:
> Hi 'Suresh!
>
> On Di, 12 Jan 2016, 'Suresh Govindachar' via vim_use wrote:
>
>> On 1/12/2016 1:50 PM, Bram Moolenaar wrote [indicating need to send
>> files archived in a format netrw can read, which isn't .7z]
>>
>> Summary:  The following reproducible steps work as expected on
>> 7.4.0, but cause 7.4.1023 to go into an infinite loop!
>>
>> Setup:  Windows 7, 64 bit
>> cd 
>> dir will show folders vim74 and vimfiles:
>> vim74\[gvim.exe and other stuff]
>> vimfiles\[contains only 3 files, all named notes.vim, in
>> attached zip]
>>vimfiles/autoload/notes.vim
>>vimfiles/ftplugin/notes.vim
>>vimfiles/syntax/notes.vim
>>
>> Command: start vim74/gvim.exe -V20  -u none -U NONE
>>
>> Actions:  :find >   :set filetype=notes
>>   :source vimfiles\ftplugin\notes.vim
>>
>> Expected result -- seen in 7.4.0:  try_loading_me.txt will have folds
>>
>> Bug in 7.4.1023:  :source goes into infinite loop and never gets
>> back to user.
>>
>> Thanks for investigating this,
> You have a problem with your autoload script:
>
>while(textm =~ '^\s*$')  " will always exit from while
>if cline < i
>break
>endif
>let i = i + 1
>let textm = getline(cline-i)
>endwhile
>
> There is no exit condition, once cline-i is smaller than 1.
> In that case getline returns an empty string, which happens to match 
> your "^\s*$" and therefore the loop happily continues.
> Therefore add an extra condition like this:
>
>while(textm =~ '^\s*$')  " will always exit from while
>if cline < i
>break
>endif
>let i = i + 1
>let textm = getline(cline-i)
>endwhile
>
>
> Not sure, why this doesn't happen with the old gvim.exe
>
For those who were wondering -- the problematic autoload script fragment
did not have the

  if cline < i
 break
  endif

in it -- that's Christian's "extra condition".

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


Re: mysterious grey bar with symbols in it

2015-12-31 Thread Charles Campbell
Christian Brabandt wrote:
> Hi 'Andy'!
>
> On So, 27 Dez 2015, 'Andy' via vim_use wrote:
>
>> Thanks!
>> That was exactly it. I never would have connected that featurewith the 
>> symbols, otherwise.
>> To complete the answer for others reading: making the symbolsand bar go away 
>> mans doing this:
>> :sign unplace *
> You probably have a plugin installed, that you do not need. In that 
> case, simply uninstall it.
>
>
Look for a plugin that has the word "Mark" in it:  under Linux, from the
.vim/ directory, use:  find -L "$(pwd)" -name "*Mark*" -exec "echo" "{}"
";" 2> /dev/null

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


Re: Netrw: pressing `-` jumps to a different window

2015-12-14 Thread Charles Campbell
Nicola wrote:
> I have encountered the following problem: when I open netrw in a split
> window,
> pressing `-` (zero or more times) to go up in the directory tree makes
> the
> cursor jump to a different window. Besides, when this happens,
> mappings like
> `ctrl-w l` stop working. I have to close all but the current window to
> make
> them functional again. I can reproduce this with a fairly minimal vimrc:
>
>set nocompatible
>filetype on
>filetype plugin on
>filetype indent on
>
> Note that I use Pathogen, so the above does not load my plugins.
>
> Steps to reproduce:
>
> 1. Open Vim.
> 2. :Ex and open a file (it is important that you use :Ex).
> 2. Split the window vertically and move to the right split (i.e., the
> new split).
> 3. :Ex
> 4. Press - (possibly several times).
>
> Sometimes the cursor jumps even without pressing `-`.
>
> This seems to happen when I open netrw in different splits at different
> times, as in the steps above. Can you suggest a fix?
Hello!

Thank you for your report.  I'm planning on an overhaul of how netrw
handles positioning upon return -- so hopefully this issue will go
away.  Might be awhile, though.

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


Re: Why is :E an ambiguous command after upgrading to patches through 965?

2015-12-14 Thread Charles Campbell
Tony Mechelynck wrote:
> On Mon, Dec 14, 2015 at 5:00 AM, Tim Chase  wrote:
>> On 2015-12-13 21:02, boB Stepp wrote:
>>> Thanks, Tim!  I did not know that trick.  Apparently the new
>>> command is:
>>>
>>> :ELP {boolean-logic pattern} *:ELP*
>>> No search is done, but the conversion from the
>>> boolean logic pattern to the regular expression
>>> is performed and echoed onto the display.
>>>
>>> Which is apparently part of Logical Patterns, something I'm not
>>> familiar with.
>> This sounds suspiciously like something that might come from Dr.
>> Chip's "LogiPat" plugin, perhaps you have that installed and upgraded
>> it at some point (I have it available, but it's a pretty old version
>> without an ":ELP" command to ?
>>
>> If that's the case, and push come to shove, you can un-command it with
>>
>>:delcommand ELP
>>
>> to get your unambiguity back.  Alternatively, if you don't use the
>> LogiPat plugin, you should be able to disable it to cut it off at the
>> pass.
>>
>> -tim
> Yes, not only that's part of Dr. Chip's LogiPat plugin, but that
> plugin is now (I don't know since when) distributed with Vim;
> therefore it now lives in $VIMRUNTIME/plugin/ and its help in
> $VIMRUNTIME/doc/. If you want to use :delcommand on it, you would have
> to do that after the plugin has been sourced, thus maybe in a VimEnter
> autocommand set up in your vimrc, or else in some after-plugin (see
> ":help after-directory", and I disagree with the help where it says
> that after-directories are "rarely needed"), let's say (on Linux)
> ~/.vim/after/plugin/logipat.vim or (on Windows, but in Vim notation)
> $HOME/vimfiles/after/plugin/logipat.vim
>
To easily disable LogiPat: put 

  let loaded_logiPat= 1

in your .vimrc.  That will prevent logiPat.vim from loading.  Of course,
to re-enable it again, just remove that line (or comment it out).

OTOH, you might want to learn what logiPat provides.  For example,
assume you want to find a line with two patterns in it:

:LP "pat1" && "pat2"

will find such a line (assuming it exists, of course).

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


Re: WORK AROUND: How to copy and rename a file with netrw where the target and source directory are the same?

2015-10-08 Thread Charles Campbell
Shane Dev wrote:
> Hi Chris, 
>
> :cd [the directory of oldfilename]
> :call system("cp 'oldfilename' 'newfilename'")
>
> works as expected.
>
> After further testing, it seems I have to execute netrw-c (make browsing 
> directory the current directory) before the sequence -
>
> 1. move cursor to oldfile, 
> 2. mt 
> 3. mf 
> 4. mc 
> 5. enter newfilename.
>
> If I execute :cd (change to home directory) and repeat the above sequence, 
> then I get -
>
> **error** (netrw) tried using g:netrw_localcopycmd; it doesn't work!
>
> Is this part of netrw design?
>
Yes; you can change the current directory behavior by setting
g:netrw_keepdir= 0 in your .vimrc.

Vim v6.x's Explorer always kept the vim current directory separate from
its  browing directory -- netrw supports backwards compatability by also
doing so, by default; however, it lets you change that behavior.  I,
personally, prefer to have netrw's browsing directory and vim's current
directory be the same, myself.

Glad you found the problem, though.

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


Re: How to copy and rename a file with netrw where the target and source directory are the same?

2015-10-05 Thread Charles Campbell
Shane Dev wrote:
>> Copy a file using the usual netrw method for copying:  (assuming cursor
>> is atop the file to be copied, and that the file is a file, not a director)
>>
>> mt (mark target)
>> mf  (mark file)
>> mc
>>
>> You'll be given a prompt:  Copy [filename] to : [filename]
>>
>> Just edit the 2nd instance of [filename] to whatever you want, then hit
>> .
>>
>> Regards,
>> Chip Campbell
> Hi Chip,
>
> When do this, I get an error window with
> **error** (netrw) tried using g:netrw_localcopycmd; it doesn't work!;
>
> I am using vim 7.4
>
Netrw depends on the o/s to do a lot of things, including copying
files.  In this case, it is trying to use the "cp" command and its
failing when a system() call is taken...

  call system(g:netrw_localcopycmd." ".shellescape(fname)."
".shellescape(topath))

fname will hold the file's name that's to be copied, and
topath holds the target directory (and filename).

or an isexecutable(g:netrw_localcopycmd) indicates the command is not
executable.

Translated: put whatever your system uses for copying files as a command
and enter it into g:netrw_localcopycmd.  You may wish to modify the
other, related variables, too:
g:netrw_localmovecmd, g:netrw_localcopydircmd, g:netrw_localrmdir, etc.

If you're using windows, you ought to upgrade netrw (see
http://www.drchip.org/astronaut/vim/index.html#NETRW) because it has an
improved way to get windows to do what's wanted (fyi: using $COMSPEC).

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


Re: How can I enforce (perhaps in '.vimrc') all my Vim help pages to always open up as listed?

2015-10-05 Thread Charles Campbell
'Annis Monadjem' via vim_use wrote:
> Hi,
>
> How can I enforce all Vim help pages to be 'buflisted' so that when I open 
> any help topic it always opens up in the buffer list as 'listed' and to be 
> always visible in ':ls' listing? 
>
> I know how to list an unlisted buffer by applying the ':set buflisted'. This 
> is not however the solution to me (for help pages), bec. when I jump to 
> another help topic then the new help page is unlisted and if subsequently I 
> jump to any other buffer the position in the last unlisted help page will be 
> "lost" (bec. it is unlisted). Otherwise speaking, each time I open any topic 
> in help pages I would have to type/execute manually ':set buflisted', which 
> is too manual and would prefer to automate perhaps in my '~/.vimrc', but how?
>
> I also realize that I could have used the ':ls!' to list all listed/unlisted 
> buffers, but this again is not a solution, bec. my list of unlisted buffers 
> is very long and it would be very tedious to look for anything in my ':ls!'. 
> I would certainly want to only search in my ':ls' as it is much shorter.
>
> So back to my original question: How can I enforce (perhaps in '.vimrc') all 
> my Vim help pages to always open up as listed?
>
Note that help files have their own filetype:  help

Thus you may use autocmds:

  au FileType help :set bl

or you may use the  ~/.vim/filetype/help.vim file (put :set bl in it)
or set up a directory and put a file in it:

cd ~/.vim/filetype/help
echo "set bl" > somefile.vim

(you may need to create the directories).

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


Re: visincr and mswin not compatible

2015-09-25 Thread Charles Campbell
jordi_frei wrote:
> Thanks Chip!
>
> I tried this new version but I still get the same error. but on the web in
> says version 21d, I don't know if this is important.
>
> I commented the following lines from your script and then it works, but I
> don't know if this would mess up other functionalities.
>
>  " if  == "exclusive"
>  "  let rghtcol= rghtcol - 1
>  " endif
>
Hello!

Looks like my updating scripts had a glitch due to my website server
changing a path on me  (ie. the cd ... in the ftp failed, so the upload
went to the wrong directory, which isn't linked to by the html).  I
think I have cleaned up most of the situation; at least, visincr is now
showing as v21e and, when I downloaded it, I got v21e.

So if you'd try downloading visincr again, you should get the corrected
copy.

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


Re: visincr and mswin not compatible

2015-09-24 Thread Charles Campbell
jordi_frei wrote:
> I just installed the visincr script and it only works when I comment the
> following two lines:
>
> source $VIMRUNTIME/mswin.vim
> behave mswin
>
> When mswin is active the first line is changed instead of the selected
> column
>
> The thing is that, I really need to use cntrl-C, cntrl-V... in windows
> style. I am too much used to those commands and I am working with several
> applications that use these commands. I am copying pasting things from
> windows to vim and viceversa.
>
> Is there a way to use both mswin and visincr?
>
Hello!

Please try v21e of visincr which you can get from:

http://www.drchip.org/astronaut/vim/index.html#VISINCR

The problem was associated with set selection=exclusive (which :behave
mswin sets).  Visincr now works around that setting.

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


Re: gVIM Screen Corruption

2015-09-10 Thread Charles Campbell
Tony Mechelynck wrote:
> On Thu, Sep 10, 2015 at 5:25 PM, Tim Chase  wrote:
> [...]
>> (welcome back, Tony...been a while since I've
>> seen you here and glad to see you're okay)
> [...]
>
> Thanks, Tim. It's a really warming thing to see how many people were
> troubled by my disappearance (due to the fact that for months I
> couldn't find how to enable the Internet on my new machine. No way to
> get the old config back because the disk had crashed.) I left a post
> on my Facebook page but apparently not everyone saw it — even some of
> my Facebook "friends" went on asking each other what had happened to
> me.
>
Good to see you back, Tony!
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Solver in vim?

2015-08-26 Thread Charles Campbell
Erik Christiansen wrote:
 On 26.08.15 15:00, Uwe Husmann wrote:
 Those are textpads that will recognize and solve mathematical formulas and
 equations.

 I just wonder if there are similar plugins for vim that will do the same
 thing or at least go in the same direction?
 Sounds like an attempt to build a new emacs. Trying to imitate every
 application which passes by seems a strange practice when it is easier
 to use and manage a suite of applications, each of which caters well for
 one area of work - such as text editing.

 Take a look at the *nix application units. It'll take expressions
 like:

 You have: (400 W/m^2 / stefanboltzmann)^(1/4)
 You want: kelvin
 * 289.80881
 / 0.0034505507

 You have: 2 btu + 450 ft lbf
 You want: btu
 * 2.5782804
 / 0.38785542

 You have: 5 kg * 1 m * (10 radians/second)^2
 You want: newtons
 * 500
 / 0.002

 You have: wiregauge(22)
 You want: mm
 * 0.6438033
 / 1.5532695

 The nifty thing about units is that it protests if you muck up the
 dimensions. (Try leaving off the ^2 in the f = mrw^2 computation,
 above.)

 There doesn't seem to be much point reinventing the wheel when there are
 so many of them floating around already. Piping a line of text out to
 another application is something that Vim already does.

Along this line of reasoning:  check out sage or macsyma.  If you'd like
a commercial product, check out maple.

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


Re: vim - how to enable searching in vim editor and finding/highlighting pattern that is only in non-commented block/line

2015-08-24 Thread Charles Campbell
'Annis Monadjem' via vim_use wrote:
 Hi,

 I am looking for a way to search in vim editor and to find text highlighted 
 only for pattern found in non-commented blocks/lines.

 I often use *, #, g*, g# but these find every pattern also in commented 
 blocks/lines of code.

 Also, I frequently use plugins CltrP, CTags and taglist but these also have 
 the same problem of finding every possible found pattern also in commented 
 blocks/lines of code. Additionally, the Ctrl-] and Ctrl-T find the original 
 point where a variable was declared (in Java).

 When writing and reading through Java source code I find it necessary to 
 search for where in the file(s) a variable has been declared, initiated and 
 perhaps modified. Often variables/functions are modified not once and 
 initialization might not be done same place where it has been declared. 

 What current I do is to find the declaration of an existing variable by using 
 Ctrl-] then i come back using Ctrl-T. Then to see where it has been perhaps 
 initiated and changed I use * and #. But these last two find all patterns 
 also in commented blocks/lines (where compiler does not read and where I am 
 not interested to scroll/read). 

 Is there a more productive way of searching/highlighting patterns of text 
 that appear in a file only in non-commented blocks/lines.

Nothing perfectly attuned, but some notes:

* First, just in case you're not aware, :set hls  will turn highlighting
on for searched patterns
* One can avoid some comments with LogiPat:  :LP your-pattern-here 
!/\*  !\*/  !// (this is line based, however) 
(http://www.drchip.org/astronaut/vim/index.html#LOGIPAT)
* Dave Fishburn's  SrchRplcHiGrp.vim plugin
(http://www.vim.org/script.php?script_id=848) can search and replace for
specified highlighting groups.  Perhaps you could use it to do a
decorate, match/highlight your pattern not having the decoration
(perhaps with LogiPat), then remove the decoration.  The decoration
should be something unlikely to occur in your file (@@@, for example).

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


Re: Copying files with Vim's netrw on Mac OS X is broken

2015-08-07 Thread Charles Campbell
Mark McDonnell wrote:
 Hi, can anyone help me this issue with netrw?

 To copy a file in Vim using netrw I have to following these steps:

 1. Select the destination directory (using mt)
 2. Select the file to be copied (using mf)
 3. Proceed with copying (using mc)

 The commands to use in netrw are:

 - mt run while cursor is on top of the directory intended to be the 
 destination
 - mf run while cursor is on top of the file intended to be copied
 - mc run while cursor is on top of the destination (marked target) directory
mc requires that the target directory and source file have been
selected.  It doesn't require that it be done while the cursor is atop
the destination directory.

 If I do this on an example project, Vim will display something like:

 Copy foo.md to : bar.md

 Suggesting it's about to do what I want it to, but upon confirming this I get 
 the following error:

 1 **error** (netrw) tried using g:netrw_localcopycmdcp; it doesn't work!

This means that system(cp 'your-selected-file'
'your-target-directory') failed.  Check your permissions and path. 
What does  :echo executable(cp)  show?

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

--- 
You received this message because you are subscribed 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 Charles Campbell
Christian Brabandt wrote:
 Hi Olaf!

 On Mi, 05 Aug 2015, Olaf Hering wrote:

 Since some time cycling through variables in a shell file with the
 asterisk '*' key is broken for me. In the simple example like that:

 var=val
 echo $var.whatever

 I was able to move cursor to var=, hit * and saw all var strings
 highlighted. Recently that broken, only the assignment in above example
 is highlighted. If I put curly braces around the usage of var it gets
 highlighted as well. But if I move to whatever then var.whatever is
 highlighted. Surely thats wrong, var.whatever is not a word.

 After some poking I found that iskeyword= is likely the knob to change.
 First I did a test with a C file, like:

 struct var var;
 var.var = 0;

 Oddly enough, each var is highlighted right away, witout the dot. So
 it must be something special with files ending in .sh. Even in this
 mail each var is highlighted, without the dot itself.

 Looking through the files provided by the vim.rpm I dont spot the place
 where also the dot is considered a word.

 Why does that happen for shell files?
 Why would that behaviour desirable?
 Use

 :verbose set iskeyword?

 to find out, where it was last modified. I did so and it told me, it was 
 set by syntax/sh.vim

 Looking into the corresponding syntax file, I find this:

 ,[ syntax/sh.vim ]-
 |  AFAICT . should be considered part of the iskeyword.  Using iskeywords 
 in
 |  syntax is dicey, so the following code permits the user to
 |   g:sh_isk set to a string : specify iskeyword.
 |   g:sh_noisk exists: don't change iskeyword
 |   g:sh_noisk does not exist: (default) append . to iskeyword
 | if exists(g:sh_isk)  type(g:sh_isk) == 1 user specifying iskeyword
 |  exe setl isk=.g:sh_isk
 | elseif !exists(g:sh_noisk) optionally prevent 
 appending '.' to iskeyword
 |  setl isk+=.
 | endif
 `

 So simply put into your .vimrc:

 :let g:sh_noisk=1

One could always take the radical step of reading the help:  :help
ft-sh-syntax  !

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


Re: Spell checking in tex files

2015-08-03 Thread Charles Campbell
David Woodfall wrote:
 Spellcheck is turned off by default in tex files, so I have enabled it
 with 'syntax spell toplevel'.

 When I also try to add a new syntax cluster, like:

 syn match Ellipsis /[.][.][.]\s\l/ contains=@NoSpell transparent
 syn cluster Spell add=Ellipsis

 it seems to make no difference.

 Does toplevel override this cluster, or what is going on here?

* Spell checking is *not* turned off by default in tex files.  To enable
spell checking in English:

  :setl spell spelllang=en_us

  Of course, you may or may not be using English, so modify the above
command according to your preferences.

* You want Ellipsis not to be spell-checked, but to take on the
highlighting of whatever syntax it appears in.  You also want the
Ellipsis pattern to be in the Spell cluster, presumably so that it gets
treated as a correct spelling.  I tried it out and it seemed to work to
prevent ... b, for example, from being flagged as a spelling error. 
So more info, please -- what is it that seems to make no difference? 
Example, please.  I've attached a pair of files myself.

  vim woodfall.tex
  :setl spell spelllang=en_us
   (shows spelling errors)
  :so woodfall.vim
  (spelling errors gone)

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


woodfall.tex
Description: TeX document


woodfall.vim
Description: application/octetstream


Re: how to get the function:line of calling script

2015-07-17 Thread Charles Campbell
hermi...@free.fr wrote:
 Hello,

 If you figure out how to use this in a script, please post, I have
 wanted this ability as well.
 Yes indeed.

 I the past, I had to emulate similar features by preprocessing viml scripts 
 where I've been inserting line numbers and all. The result was extremly 
 cumbersome.

 (It was for my Unit Testing plugin: https://github.com/LucHermitte/vim-UT )

Hello:

I wanted to use it for my internal debugger -- it would append a ~###
string to the end of debugging lines (and they would have Ignore
highlighting).  That way I can (with another ftplugin I wrote) hit the
f9 key and get a split view; left side showing the debug trace and the
right side showing the code responsible for issuing that message.

I was going to use a command:

  com! -nargs=+ -complete=expressionDechocall
Decho(args,'~'.expand(slnum))

but this didn't work as I'd hoped with netrw.

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


Re: how to get the function:line of calling script

2015-07-15 Thread Charles Campbell
Nikolay Pavlov wrote:
 2015-07-15 18:01 GMT+03:00 Charles Campbell charles.e.campb...@nasa.gov:
 Hello!

 Is there a way for a function to know from where it was called?
 function:line, file:line, whatever (although if I had my preferences I'd
 pick the latter).
 You can know from which function some function is called by using
 expand('sfile') (will show full stack). But this is without lines
 and without files. There is also `slnum` for the current line, but
 not caller’s current line.

Thank you, Nikolay!

I'd forgotten about slnum and will look into using sfile for the stack.

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


how to get the function:line of calling script

2015-07-15 Thread Charles Campbell
Hello!

Is there a way for a function to know from where it was called? 
function:line, file:line, whatever (although if I had my preferences I'd
pick the latter).

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


Re: netrw hide files beginning with . while using the long liststyle

2015-06-25 Thread Charles Campbell
Rick Dooling wrote:
 On Monday, March 9, 2015 at 7:53:06 PM UTC-5, DrChip wrote:
 Rick Dooling wrote:
 I saw another thread herein where the conversation touched on this but 
 without a conclusive answer.

 I like the long list style in netrw, and I also like sorting by time 
 reversed (showing newest files at the top). However, when I switch to this 
 view all of the dot-files and dot-directories become visible and the 'gh' 
 command does not work to hide them.

 I am on MacVim, latest snapshop 74, but I think the same behavior happens 
 in Vim.

 Hello!

 I see the problem; unfortunately, I won't be able to look at it for a 
 couple of weeks.  Its on my to-do list, though.

 Chip Campbell
 No rush at all. It's a very minor issue. 

 I'm used to just opening files from iTerm2 on Mac, but over the last few 
 weeks I've seen the netrw light. Excellent plugin.

Hello!

I'm not sure if I responded to this earlier -- so please try netrw v154d
(http://www.drchip.org/astronaut/vim/index.html#NETRW).   It appears to
address this issue.

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


Re: Problem with netrw and buftype

2015-06-24 Thread Charles Campbell
Christian Brabandt wrote:
 Hi wednesday!

 On Mi, 24 Jun 2015, wednesday wrote:

 On Wed, Jun 24, 2015 at 02:25:03AM +0100, wednesday wrote:
 When I open up the explorer to put a new file into a split, once
 that new file is there the old one becomes unwritable due to buftype
 being set to nofile. This has been pretty frustrating and I have yet
 to find the answer. If this helps I'm using version 7.2.273 of Vim.
 Pretty stupid of me, I think I just found the issue was having set
 autochdir in my vimrc.
 Perhaps consider upgrading to a new Vim version (which should also 
 contain an updated netrw), since 7.2.273 is 5.5 years old.

I'd suggest that you try the latest netrw
(http://www.drchip.org/astronaut/vim/index.html#NETRW) but with such an
old vim (vim is up to 7.4 with 752 patches) it won't work (latest netrw
requires 7.4 with patches 1-213 and will benefit from having patch#656).

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


Re: How does vim determine the way the text is colored in the section of :help group-name?

2015-06-17 Thread Charles Campbell
Peng Yu wrote:
 Hi,

 I see the following text in :help group-name colored. But when I
 checked the file syntax.txt, I didn't see anything special for
 indicating the colors. Could anybody let me know how vim determines
 the colors? Thanks.

snip

Hello, Peng:

Syntax rules pick highlighting rules, which in turn are highlighted by
colorscheme rules.

  :help syntax
  :help colorscheme

If you'd like to see what in particular is happening in some file, you
may find

  http://www.drchip.org/astronaut/vim/index.html#HILINKS

to be of interest; in particular, try  :HLT!  with hilinks.vim.  This
command will show you the syntax stack, the highlighting trace, and the
resulting foreground/background color names as you move the cursor about.

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


Re: Execute command on multiple ranges found by regex

2015-06-10 Thread Charles Campbell
Tim Chase wrote:
 On 2015-06-03 16:03, BPJ wrote:
 You can define a range with regular expression(s) like:

  :/^beginfoo/+1,/^endfoo/-1!somefilter

 However if there are multiple ranges which would match only the 
 next one is filtered.

 Can you make Vim apply the command to all matching ranges 
 throughout the buffer in one go?  I'm sure there is some easy 
 solution I can't find...
 The :g command can use a range before its command, so you could do
 something like

   :g/^beginfoo/+,/^endfoo/-!somefilter

 (I'm using the shorthand of + == +1 and - == -1)

 I love this esoteric/underused corner of Vim and it's saved me
 countless hours of work since I learned about it.

I keep forgetting that its supposed to be esoteric, I use it so often.

Chip

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

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


Re: AnsiEsc can not show background

2015-06-01 Thread Charles Campbell
Peng Yu wrote:
 I got the following error. Do you know what is wrong?

 Also, could you please post it at
 http://www.vim.org/scripts/script.php?script_id=302.

 ***vimball*** Source this file to extract it! (:so %)
 removed 4 files
 Vimball Archive
 extracted plugin/AnsiEscPlugin.vim: 30 lines
 wrote /Users/pengy/.vim/plugin/AnsiEscPlugin.vim
 extracted autoload/AnsiEsc.vim: 1211 lines
 wrote /Users/pengy/.vim/autoload/AnsiEsc.vim
 extracted plugin/cecutil.vim: 536 lines
 wrote /Users/pengy/.vim/plugin/cecutil.vim
 extracted doc/AnsiEsc.txt: 175 lines
 wrote /Users/pengy/.vim/doc/AnsiEsc.txt
 did helptags
 Error detected while processing SourceCmd Auto commands for *.vba.gz:
 E444: Cannot close last window

I am able to duplicate the message Cannot close last window, so I'll
look into it.  Nonetheless, the AnsiEsc extraction was successful and
helptags generated.

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


Re: autocmd BufEnter * :set selection=exclusive

2015-05-28 Thread Charles Campbell
Paul wrote:
 toothpik toothpik6 at gmail.com writes:
 On Fri, Apr 24, 2015 at 10:29:00PM +, Paul wrote:
 Christian Brabandt cblists at 256bit.org writes:
 Check with :verbose set selection?  what caused the change of the
 selection.

 If a plugin is the culprit contact the plugin author. He should
 fix it.
 It shows that netrw is the last to change the selection option.
 However, the author confirmed that netrw saves and restores the
 original values.
 when working with said author you need to give specific details
 about how you invoke netrw and how you leave it -- that plugin has
 more entries and exits than a big block of swiss cheese and it's
 possible you've found a way to foil the expected behavior
 That would be challenging...I am not exactly sure *when* the selection
 option gets clobbered and not restored.  It's difficult to know which
 method of exiting is causing the problem.  And my methods of exiting
 are probably the same as most people's: Change windows, close window,
 close tab, switch tab, open a file, or preview a file.

You could put

  redir  $HOME/vss
   verbose set selection?
  redir END

in s:NetrwOptionSave().  That way a file, vss, will be created with
the output of verbose set selection? -- eventually you'll find a last
set message in that file that'll help point you where the problem occurred.

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


Re: Autocmd to have a mapping only for a specific file

2015-05-28 Thread Charles Campbell
alexandre viau wrote:
 But even if i put backspace instead of ctrl-enter it will not be
 executed, only one of the mapping is executed
 Le mer. 29 avr. 2015 à 17:05, Charles Campbell
 charles.e.campb...@nasa.gov mailto:charles.e.campb...@nasa.gov a
 écrit :

 av wrote:
  Le jeudi 23 avril 2015 09:25:11 UTC+2, av a écrit :
  Hi,
 
  I try to have an autocommand that would provide a mapping to
 the enter and c-enter keys only on a certain file name. Like
 myfile.txt for example.
 
  I have tried a test like this here, and it works for the
 c-Enter mapping but not for the Enter one:
 
  autocmd! BufNewFile,BufRead,BufEnter myfile.txt nmap
 buffer Enter :echo 'Hi!'cr
  autocmd! BufNewFile,BufRead,BufEnter myfile.txt nmap
 buffer c-Enter :echo 'Test!'cr
 
  And when I do :map enter vim says that there are No mapping
 found
 
  Any ideas why? And please tell me if I chose the right list of
 events.
 
  Thank you very much,
 
  Alexandre
  It seems I cannot use Enter and c-Enter at the same time,
 only one of the 2 works. Why is that?
 
 Go into insert mode.

 Type ctrl-v [return]
 Type ctrl-v ctrl-[return]

 You'll likely find that there's no difference between them.

Do the same thing with ctrl-v [backspace] and ctrl-v ctrl-[backspace]. 
Under gvim I do get a difference (BS vs C-BS) but not under vim.
btw, bottom posting is preferred on this list.

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


Re: Search pattern while excluding some words

2015-05-28 Thread Charles Campbell
kamaraju kusumanchi wrote:
 On Fri, Mar 6, 2015 at 2:58 PM, Charles Campbell
 charles.e.campb...@nasa.gov wrote:
 Hello!

 You might find LogiPat helpful; see
 http://www.drchip.org/astronaut/vim/index.html#LOGIPAT .

 :LP !RCMP  !QEII  !SPCA  [A-Z]\{4,\}

 LogiPat allows boolean logic to work with regexp patterns.

 Regards,
 Chip Campbell

 I am not the OP but just want to say ...

 LogiPat is one of those plugins I can't live without. It is super
 handy when coding... especially when you want to search for
 long_string_A but do not want to include prefixB_long_string_A_suffixC
 in the searches. Thanks for writing it.

 Is there any reason for it not to be included in default vim?

 You're welcome.  The question about including it in default vim is up
to Bram Moolenaar.

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


Re: Vim: Not able to activate plugins , ... missing vim folders? etc

2015-05-28 Thread Charles Campbell
FriendOfFatBeagle wrote:

 I am learning Vim  on Linux Mint Cinnamom Rebecca (17.1), 64 bits

 I am learning plugins for Vim from here: http://www.swaroopch.com/notes/vim/
 There is a free download book.

 Excerpts from page 60 of book 
 (http://files.swaroopch.com/vim/byte_of_vim_v051.pdf):
 “ 2. To install your own plugins or plugins that you have download from 
 somewhere, you can use your own plugin directory:
 • $HOME/.vim/plugin/ on Linux/BSD/Mac OS X
 … “

 The Vim help files also mentioned this via vim command, :help plugin
 USING A GLOBAL PLUGIN

 First read the text in the plugin itself to check for any special conditions.
 Then copy the file to your plugin directory:

 system plugin directory ~
 Unix ~/.vim/plugin/


 My $HOME is :
 ~ $ echo $HOME
 /home/foffb

 But there is no $HOME/.vim folder, even after I enable “Show hidden files”.
 The vim folder I found is here, and plugin folder also shown is like so:
 /usr/share/vim/addons/plugin

 So I downloaded highlight_current_line.vim (found here 
 http://www.vim.org/scripts/script.php?script_id=1652)
 as suggested in the book, and put it in the only Vim plugin folder I found:

 /usr/share/vim/addons/plugin/highlight_current_line.vim

 When I ran vim, and I moved cursor over a line of texts, the line is not 
 highlighted !
 Meaning plugin, highlight_current_line.vim, does not work.

 Questions … too many, but here are a few for now:

 1) Why do I not a have same folder structure for Vim
 as mention in the Vim's help docs and the “A Byte of Vim” book?
 Meaning there is no .vim under $HOME folder.
 AND 
 This is all the vim stuff I have under $HOME :
 ~ $ locate $HOME/.vim/plugin
 No returned result 
 ~ $ locate $HOME/.vim
 /home/foffb/.viminfo

 2) Where should I put the plugin?
 Where does your .vim folder reside in your Linux?

 3) What else did I missed?


1: that's not automatic; you need to   mkdir $HOME/.vim  yourself
2: depends on how your plugin is delivered.  A vimball will set itself
up, pretty much, for example, with a simple  vim plugin.vmb  and :so %. 
If its not a vimball, perhaps the plugin comes with directions. 
Tarballs need you to be in some directory (often $HOME/.vim) before
un-tarring.  The other distribution methods (vundle, etc) really need
you to install the associated plugin first --  but I'm sure that they
come with directions, so at least read their installation directions.
3: what kind of vim do you have?  try  using   :version   to see.   In
particular, you don't want a Tiny version if you're intending to use
plugins.  I myself use 7.4 with patches 1-725, Huge (for the nonce).

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


Re: Check spelling inside \textbf{} in LaTeX file

2015-05-14 Thread Charles Campbell
Paul wrote:
 Charles E Campbell drchip at campbellfamily.biz writes:
 paul wrote:
 Is there a simple way to get spellcheck to check the text inside
 \textbf{} commands?  I currently convert all occurances of textbf
 to a dummy command just so the spell check will look inside the
 braces.  I also sent a document to the boss with spelling errors
 before discovering the immunity of text inside \textbf{} to
 spell-check.

 Please try syntax/tex.vim v83 from my website:
 http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX.  You may
 put it in your $HOME/.vim/syntax directory; eventually it will
 appear with vim's distribution.
 Sorry for the tardy response.  I just tried it.  It certainly
 highlights spelling errors with textbf.  It seems to turn on italics
 and bold at random points in the tex file.  I think I can use it just
 for the spell-check phase.  I can disable it by simply removing read
 permission.

Would you give me a snippet where there's problematic italic and bold
highlighting?

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


Re: Autocmd to have a mapping only for a specific file

2015-04-29 Thread Charles Campbell
av wrote:
 Le jeudi 23 avril 2015 09:25:11 UTC+2, av a écrit :
 Hi,

 I try to have an autocommand that would provide a mapping to the enter and 
 c-enter keys only on a certain file name. Like myfile.txt for example. 

 I have tried a test like this here, and it works for the c-Enter mapping 
 but not for the Enter one:

 autocmd! BufNewFile,BufRead,BufEnter myfile.txt nmap buffer Enter 
 :echo 'Hi!'cr
 autocmd! BufNewFile,BufRead,BufEnter myfile.txt nmap buffer c-Enter 
 :echo 'Test!'cr

 And when I do :map enter vim says that there are No mapping found

 Any ideas why? And please tell me if I chose the right list of events.

 Thank you very much,

 Alexandre
 It seems I cannot use Enter and c-Enter at the same time, only one of the 
 2 works. Why is that?

Go into insert mode.

Type ctrl-v [return]
Type ctrl-v ctrl-[return]

You'll likely find that there's no difference between them.

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


Re: Subvert command not working - just opens current file in hsplit

2015-04-17 Thread Charles Campbell
Robert Balejík wrote:
 :%S/@user{,s}/@event{,s}/g 
 so this is my command -what this does it opens curerent file in the 
 horiozontal split but do not substitute anything, there must be smth 
 seriously worong with my vim 

By this is my command, do you mean that you've implemented a command
called S?  If so, please show it.

Otherwise, I'm going to guess that you want to do a substitute; in that
case, use s, not S.

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


Re: Syntax highlight problems

2015-04-08 Thread Charles Campbell
Alessandro Antonello wrote:
 Hi, Nikolay

 Thanks for your answer. Its a little bit strange how my brain works. I
 saw you
 version of the 'match' and I saw the solution right there. I didn't really
 need a transparent region. I just wanted that the highlighted area not
 leak to
 the start and end patterns. For that, Vim has 'hs' and 'he' pattern
 options.
 So I rewrote the region, got rid of the match and everything worked
 fine. I
 also included matches for bold, italic and code highlight in markdown
 style.
 Here they are:

 syn region doxygenUnderlined contained start=[\\@]uf{hs=s+4
 end=}he=e-1 contains=doxygenContinueComment
 containedin=doxygenBrief,doxygenBody
 syn match doxygenMarkdownCode contained /\W\@=`[^`']*`/ms=s+1,me=e-1
 contains=doxygenContinueComment
 containedin=doxygenBrief*,doxygenLine,doxygenBody,doxygen.*Desc
 syn region doxygenMarkdownBold contained
 start=\(\w\|_\)\@!__[^[:space:]_]hs=s+2
 end=[^[:space:]_]__[^[:alnum:]]he=e-3 end=[^[:space:]_]__$he=e-2
 contains=doxygenContinueComment containedin=doxygenBrief,doxygenBody
 syn region doxygenMarkdownBold contained
 start=\(\w\|\*\)\@!\*\*[^[:space:]*]hs=s+2
 end=[^[:space:]*]\*\*[^[:alnum:]]he=e-3
 end=[^[:space:]*]\*\*$he=e-2 contains=doxygenContinueComment
 containedin=doxygenBrief,doxygenBody
 syn region doxygenMarkdownEmph contained
 start=\(\w\|_\)\@!_[^[:space:]_]hs=s+1
 end=[^[:space:]_]_[^[:alnum:]]he=e-2 end=[^[:space:]_]_$he=e-1
 contains=doxygenContinueComment containedin=doxygenBrief,doxygenBody
 syn region doxygenMarkdownEmph contained
 start=\(\w\|\*\)\@!\*[^[:space:]*]hs=s+1
 end=[^[:space:]*]\*[^[:alnum:]]he=e-2 end=[^[:space:]*]\*$he=e-1
 contains=doxygenContinueComment containedin=doxygenBrief,doxygenBody

 And the test:

 /**
  * Brief description \uf{underlined}.
  * With body @uf{underlined too}. This is _italic_ and this is __bold__.
  * Both *italic* and **bold** works as of `monospaced font`.
  *
  * And with numbers: \uf{1.4}, _1.4_ and __1.4__.
  * Every thing seams to be perfect. Separated \uf{dd
  * ddd} in lines. We can have __bold separated
  * into multiple lines__. Starred version of **bold
  * can work** on separated lines. The *starred
  * italic* also works on multiple lines.
  * Bold __()__, **{}**, __[]__ __and,__ finally **.a.**.
  * Italic _()_, *{}*, _[]_ _and,_ finally *.a.*.
  */

 Only the backtick style code highlight doesn't work on multiple lines.
 Is very
 late and I need to sleep a little.
Hello:

You may find hilinks.vim helpful when working with syntax files.

   http://www.drchip.org/astronaut/vim/index.html#HILINKS

This plugin provides a syntax stack trace and a highlighting stack trace
as you move your cursor about.
As an example:

SynStack:  cBlock-cCppString HltTrace:
cCppString-cString-Stringfgyellow bgnavyblue

which I got with after using :HLT!  to turn hilinks' cursor tracking on
in a c file with the cursor over some code (a string, actually).  This
message showed up on the messages area at the bottom of my vim window
(and it changes as the cursor moves over syntax).

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


Re: How to indicate multiple window lines that belong to a long line in a file

2015-04-07 Thread Charles Campbell
'Paul August' via vim_use wrote:
 I just saw your two messages (for some reasons they were moved into a
 spam folder by my server). I understand what you meant. But I don't
 understand why you think the quoted paragraph changed the topic
 indicated in the subject line. Maybe we misunderstood each other.
 Maybe you meant my followup message about the digraph issue.

 Paul.

 On 4/3/2015 11:17 AM, Charles E Campbell wrote:
 Charles Campbell wrote:
 'Paul' via vim_use wrote:
 Currently I use set number for this purpose. But it takes a lot of
 window space. So I wonder whether there is a better way to do it, such
 as the way used in Emacs window (showing a little line wrap symbol at
 the end of a window line if it continues to the next window line), or
 maybe show alternative background colors for different long lines? Any
 ideas?

 Please don't hijack threads.

 Just in case you (Paul) don't know what I meant by that: please don't
 reply to a message and change its subject to something utterly
 unrelated. The result is that your message appears buried inside the
 original thread, and so others who may be interested in your topic won't
 see it because they're not interested in the original topic. Instead,
 send an email to the group with your new topic (not a reply).

The original subject: How to get to the helppage of shiftwidth in
options.txt?
After hijacking the thread, your new subject: How to indicate multiple
window lines that belong to a long line in a file.

These are different subjects.  Your hijacked thread still shows up
embedded in the old thread, hence its reduced visibility.

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


Re: How to get to the helppage of shiftwidth in options.txt?

2015-04-02 Thread Charles Campbell
Christian Brabandt wrote:
 Am 2015-04-01 04:27, schrieb Peng Yu:
 Check compgen in bash, then you will see what I mean.

 Please be more specific and say exactly what you want. Not everybody
 wants to install bash to check a manual page.

If this helps, here's the pertinent section from bash's manpage for compgen:


   compgen [option] [word]
  Generate possible completion matches for word according to
the options, which may be any option accepted by the complete builtin
with the exception of -p and -r, and write the matches to the standard
output.  When
  using the -F or -C options, the various shell variables
set by the programmable completion facilities, while available, will not
have useful values.

  The  matches  will be generated in the same way as if the
programmable completion code had generated them directly from a
completion specification with the same flags.  If word is specified,
only those completions
  matching word will be displayed.

  The return value is true unless an invalid option is
supplied, or no matches were generated.

Regards,
Chip

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

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


Re: How to get to the helppage of shiftwidth in options.txt?

2015-04-02 Thread Charles Campbell
Peng Yu wrote:
 On Sun, Mar 29, 2015 at 8:40 PM, Tim Chase v...@tim.thechases.com wrote:
 On 2015-03-29 20:22, Peng Yu wrote:
 On Sun, Mar 29, 2015 at 5:52 PM, Tim Chase wrote:
   :help listC-D
 Is there a way to somehow print the potential matches in the
 command to stdout.

 I am able to get vim print some arbitrary text. But I can not get
 the above printed to the command line.

 vim -T dumb -c echo\ \Hello\ World\!\ -c q
 Not that I know of.  If I aspired to do something like that, I'd start
 by using :helpgrep to find the matches of interest:

   :helpgrep \*[#-)!+-~]\+list[#-)!+-~]\+\*

 and then access the quick-fix window with :copen, extracting the
 matching contents.
 In bash, there is `compgen`. So, it might make sense to add something
 similar to vim as well?

Are you using a Linux/Mac?  Perhaps

  grep shiftwidth [path to vim's doc files]/tags

would get you a list.

Regards,
Chip

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

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


Re: How to indicate multiple window lines that belong to a long line in a file

2015-04-02 Thread Charles Campbell
'Paul' via vim_use wrote:
 Currently I use set number for this purpose. But it takes a lot of
 window space. So I wonder whether there is a better way to do it, such
 as the way used in Emacs window (showing a little line wrap symbol at
 the end of a window line if it continues to the next window line), or
 maybe show alternative background colors for different long lines? Any
 ideas?

Please don't hijack threads.

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


Re: How to avoid zip.vim being used when docx2txt is installed to open docx files?

2015-03-24 Thread Charles Campbell
Peng Yu wrote:
 Modify g:zipPlugin_ext to hold whichever suffices you want zip.vim to handle 
 and put it into your .vimrc.  This change will take effect only in 
 subsequent instances of vim, not a currently running one.
 What is the syntax for multiple suffixes? Should it be something like this?

 let g:zipPlugin_ext = '.gz,.zip'

Its set up in plugin/zipPlugin.vim (by default):  let g:zipPlugin_ext=
'*.zip,*.jar,*.xpi,*.ja,*.war,*.ear,*.celzip,*.oxt,*.kmz,*.wsz,*.xap,*.docx,*.docm,*.dotx,*.dotm,*.potx,*.potm,*.ppsx,*.ppsm,*.pptx,*.pptm,*.ppam,*.sldx,*.thmx,*.xlam,*.xlsx,*.xlsm,*.xlsb,*.xltx,*.xltm,*.xlam,*.crtx,*.vdw,*.glox,*.gcsx,*.gqsx'

Sorry about not getting back to you sooner; I've been out a lot lately.

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


Re: Looking for a simple LispIDE

2015-03-24 Thread Charles Campbell
meino.cra...@gmx.de wrote:
 Hi,

 I am starting to learn Lisp. And I want to use vim 
 for that, because there is no other editor... ;)

 I am looking for something simple, which executes my current
 lisp code in the buffer via sbcl (Steel Bank Common lisp).

 I tried to install slimv and limp and failed ... and I think,
 they are too big for me...I dont need hyperspec and thesaurus
 and...an embedded mp3 play with bluetooth (THIS IS NO IMPLIED
 CRITISM! It is only an expression of my helplessness... :)

 I onlu want:
 Edit Lisp code in vim (I installed pared and rainbox parens) and
 a way to send the code to sbcl in another buffer.

 What can I use for that?

Hello, Meino:

You might find RunView of interest:

You may get a new version of RunView from:

   http://mysite.verizon.net/astronaut/vim/index.html#RUNVIEW (beta)

To install, simply:

   vim RunView.vba.gz
   :so %
   :q

You'll want to put

  let b:runview_filtcmd= sbcl

in .vim/ftplugin/lisp.vim .  That way, when you edit a lisp file and
type  :RV  runview will know what command to invoke to run lisp on your
buffer.

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


Re: Netrw sorting of punctuations in file names

2015-03-06 Thread Charles Campbell
Paul wrote:
 I'm noticing that netrw v149 lists files sorted by name in the
 following order:

20140220.1112+20140224.1416.zip*
20140220.1112.zip*

 In contrast, bash and Windows Explorer lists the files in the reverse
 order:

20140220.1112.zip*
20140220.1112+20140224.1416.zip*

 I prefer the latter over the former.  Is there a convenient setting
 that will cause netrw to do this?

Netrw's sorting is done by vim's :sort command.  So I suggest looking at

  :help g:netrw_sort_options
  :help :sort

and see what you can do.

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


Re: Sort by file extension in netrw?

2015-03-06 Thread Charles Campbell
Ben Fritz wrote:
 Is it possible to sort by file extension in netrw?

 I cycled the sort sequence with 's' in my netrw tree and was surprised to see 
 by extension is not in the various sort methods. Only name, time, and size.

 I looked in the help found the g:netrw_sort_sequence but that just looks like 
 a way to pull out specific file patterns and put them at the top. I did 
 eventually accomplish the task I was trying to do using this option (actually 
 using the 'S' mapping), by pulling the one set of files I wanted to the top, 
 but I wonder in general if I can easily group all files by extension.

The g:netrw_sort_sequence is the current way to do sorting by
extension.  I'll put a exten sort method on my to-do list.
FYI: the * pattern for g:netrw_sort_sequence allows one to control
where all non-matching files go, so its not necessarily just put
[matching file patterns] at the top.

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


Re: Search pattern while excluding some words

2015-03-06 Thread Charles Campbell
John Cordes wrote:
  First a small bit of background. I have created a little
 bash script which runs pdftotext on a PDF file (containing
 obituaries, with surnames in upper-case), then invokes vim
 commands to massage the resulting text file, basically to
 break the file into paragraphs.

  I then open the resulting text file in
 vim and search for surnames which may have remained
 embedded within a paragraph; I use

  /[A-Z]\{4,\}

  for this (ignoring the occasional 3 letter surname).

  Here's my question: while running this search on 4 or
 more uppercase characters, I would like to be able to skip
 past (ignore) certain commonly occurring 'words' such as
 RCMP, QEII, SPCA and such. I want to jump immediately to
 the next occurring surname.

  I am not particularly good with regexes, and haven't found
 anything which seems at all close to being able to do
 this.

Hello!

You might find LogiPat helpful; see
http://www.drchip.org/astronaut/vim/index.html#LOGIPAT .

:LP !RCMP  !QEII  !SPCA  [A-Z]\{4,\}

LogiPat allows boolean logic to work with regexp patterns.

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


Re: what does iskeyword option do?

2015-02-25 Thread Charles Campbell
FlashBurn wrote:
 On Wednesday, February 25, 2015 at 11:31:36 AM UTC-5, Tim Chase wrote:
 On 2015-02-25 08:02, FlashBurn wrote:
 I'm trying to understand the meaning of 'iskeyword' option but I
 can't figure out from the help what it does. Any help in finding
 out of the meaning of this option is greatly appreciated.
 'isk' contains a list of characters (or character-ranges) for those
 characters that should be considered a word.  This comes into play
 when using \, \, \k and \K in a regular expression; what
 gets considered when you use * and # to search; what the iw and
 aw text-objects select; what's considered a word motion; how
 abbreviations are found; and plenty of other places.

 For example, by default - isn't part of the 'isk' setting, but if
 you wanted vip to highlight/select whole CSS selectors like
 background-color

   :set isk+=-

 to add the dash.  Now, if you do viw anywhere in the attribute,
 it will highlight/select the entire background-color not just
 background or color.

 It's a little tricky to add certain characters as they have special
 meaning.  The easiest way I've found is to make a range of length one
 for @:

   :set isk+=@-@add an at-sign, good for email addresses
and Python decorators

 -tim
 I was trying to understand if it has a meaning in the highlight context. I'm 
 going through an online book, Learn Vimscript the Hard Way and in the 
 following chapter, 
 http://learnvimscriptthehardway.stevelosh.com/chapters/46.html, it talks 
 about the # symbol not being in iskeyword in the context of comments and 
 highlighting and I can't figure out why this matters. I think I'm getting the 
 meaning of this option, i.e. it defines what a word is, but why it matters in 
 highlighting, that is not clear to me. 

Syntax highlighting is based upon regular expressions (see :he regexp). 
A commonly used thing to pick up on are: words.  Most variables,
function names,  and commands, for example,  fit into the description of
word.  Hence, the scripts that specify syntax highlighting often use
the \k atom (see :help /character-classes); and the \k atom depends upon
the iskeyword setting.  For example, syntax/latex.vim (by default)
removes the underscore from the iskeyword option because latex will
(usually) flag usage of it as an error.

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


Re: Editing tar file under osx

2015-02-20 Thread Charles Campbell
Subbu wrote:
 Hello Everyone!

 I have this strange problem editing tar file with vim. vim can edit and 
 update tar under Linux. But it might have some problem with osx. I could 
 reproduce this problem on simple tar file(like - tar has one text file). Does 
 anyone has problem using vim with tar file with osx (os x yosemite) ? Any 
 help really appreciated.
 Bellow is the error I am getting. 

 ***error*** (tar#Write) sorry, unable to update /Users/user/mytar.tar with 
 hello

 Output from :message is : 

 tarfile::hello [Not edited] --No lines in buffer--

 Here is a debug log for this problem : 

 hello
 hello [New] 1L, 6C written 
 Calling shell to execute: (tar --delete -f '/Users/user/mytar.tar' 'hello') 
 /var/folders/kr/4d2rsqs95bs1lv81d8jkkfwhgn/T/vbhpNWR/13 21
 ***error*** (tar#Write) sorry, unable to update /Users/user/mytar.tar with 
 hello
 chdir(..)
 /private/var/folders/kr/4d2rsqs95bs1lv81d8jkkfwhgn/T/vbhpNWR/12 
 Calling shell to execute: (/bin/rm -rf -- '_ZIPVIM_') 
 /var/folders/kr/4d2rsqs95bs1lv81d8jkkfwhgn/T/vbhpNWR/14 21

Hello:

Please try v30b of plugin/tar.vim, which you can get from my website:
http://www.drchip.org/astronaut/vim/index.html#TAR .  This version won't
actually solve your problem, but it might make it possible to do so.

I suspect that the tar command used:  tar --delete -f ...
doesn't work on your mac.  So I've made an option (a global variable,
really): g:tar_delfile, that by default is --delete -f.  If you can
find a mac equivalent, you can put   let g:tar_delfile=...   in your
.vimrc.  Please let me know if you find something that works.  What it
does is delete a file from the tar archive.

You already have the g:tar_writeoptions  variable, which by default has
the value uf, and causes tar to be updated with a given file.  You may
need to find a mac-ish substitute for that, too.

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


Re: navigation in diff mode with the csv plugin

2015-02-12 Thread Charles Campbell
kamaraju kusumanchi wrote:
 On Thu, Jan 1, 2015 at 7:39 AM, Christian Brabandt cbli...@256bit.org wrote:
 Hi kamaraju!

 The problem occurs only when the filetype is set to 'csv'. If I
 manually change it to 'text', then there is no problem.
 Up and Down have been mapped in csv mode (see :h csv-mapping)
 You can still use k and j to move up and down normally.

 Ok, thanks for the clarification. But IMHO this behavior is not
 intuitive. The keys should be mapped such that they respect the
 concept of folds, no?

 BTW, I meant up and down keys in my original email as opposed to left
 and right arrow keys.


In that case, please bring your concern up to the csv plugin's author. 
S/he may or may not look at this mailing list.

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


Re: missing diff.exe

2015-02-12 Thread Charles Campbell
FlashBurn wrote:
 On Thursday, February 12, 2015 at 3:09:58 PM UTC-5, Christian Brabandt wrote:
 On Do, 12 Feb 2015, FlashBurn wrote:

 I'm running gVim 7.4 on Windows 7. I've never used vimdiff command
 before and decided to use it now and as it turns out diff.exe is
 missing. Does anybody have the same issue? Is there a special flag I
 need to be using during compilation to have this executable?
 A diff is distributed along with Vim. It should sit in your vim/vim74 
 directory.

 Best,
 Christian
 -- 
 In Städten glaubt man, es gehöre zum guten Ton, nicht einmal zu
 wissen, wer in demselben Hause wohnt.
  -- Adolph Freiherr von Knigge
 Somehow I don't have it.

I'm not aware of a diff program that is distributed with vim; perhaps
some windows bundler does that.  Its not in the vim74.tar.bz2, though.

I suggest getting a diff -- try looking for one using Google/Yahoo/etc. 
Using Yahoo and searching for diff Windows yielded
http://gnuwin32.sourceforge.net/packages/diffutils.htm .

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


Re: Problem with AutoAlign

2015-01-28 Thread Charles Campbell

  
  
Cesar Romani wrote:


  
  I also discovered that the same problem happens when editing a
  latex
  
  file, i.e. when typing () and then typing = inside the
  parentheses, the
  
  cursor gets after the closing parenthesis.
  
  
  How can I disable this? I tried to put 'iunmap =' on
  
  vimfiles\after\plugin\tex.vim but it is of no use.
  
  
  Many thanks in advance,
  
  

Hello:

As before with html, there is no '=' map provided by AutoAlign for
latex.  The map provided for latex is triggered by a backslash and
aligns ""s (ie. for tables).

You should have

.vim/doc/AutoAlign.txt  
  .vim/ftplugin/c/AutoAlign.vim   
  .vim/ftplugin/eltab/AutoAlign.vim 
  .vim/ftplugin/maple/AutoAlign.vim  
  .vim/ftplugin/php/AutoAlign.vim  .vim/ftplugin/vim/AutoAlign.vim
.vim/ftplugin/bib/AutoAlign.vim 
  .vim/ftplugin/cpp/AutoAlign.vim 
  .vim/ftplugin/html/AutoAlign.vim  
  .vim/ftplugin/matlab/AutoAlign.vim 
  .vim/ftplugin/tex/AutoAlign.vim  .vim/plugin/AutoAlign.vim

Please verify that these are the AutoAlign files that you have in
the given directories (vimfiles instead of .vim for windows).

I can't really tell you how to disable the '=' mapping for latex or
html as AutoAlign does not make such mappings for those languages. 
If your set up does not have the AutoAlign files in the right
places, may I suggest removing them and re-installing AutoAlign
(http://www.drchip.org/astronaut/vim/index.html#AUTOALIGN).  Check
that your filetype (:echo ft) is correct when editing html and
tex files.

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


Re: Problem with AutoAlign

2015-01-22 Thread Charles Campbell
Cesar Romani wrote:
 I'm using vim 7.4.589 on Windows 7.

 I'm editing an html file and type '()' (without quotes)
 then go back one place and try to type 'a=' (without quotes), then I get
 immediately after the closing parenthesis!
 I have to go back one place to continue to type after '='

 I discovered that the cause of it is the imap:
 ino silent = =c-r=AutoAlign(1)cr

 on AutoAlign.vim (v15a)

 If I do 'iunmap =' I don't get this problem.

 Many thanks in advance,

Hello!

Using C, the cursor is left after the = sign.  The
ftplugin/html/AutoAlign.vim doesn't have any maps to handle '=', so I
don't see why it'd be involved.  Did you modify the distributed
ftplugin/html/AutoAlign.vim file?

Ex.  using C
a=1234;
();   (then perform esc0ib=esc)

this yields
a = 1234;
b = ();

with the cursor immediately following the b =.

Using iunmap = prevents the problem essentially by de-activating
AutoAlign, so its not particularly surprising that you are no longer
experiencing your issue.

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


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

2015-01-12 Thread Charles Campbell
Brice Burgess wrote:
 I'm having an issue trying to delete a file using netrw in column mode 
 (liststyle=2).

 My filelist is showing three columns, and when I place my cursor over any 
 file not in the first (leftmost) column and press delete, it tries to delete 
 the file in the first column.

 E.g.

 fileA   fileB   fileC

 if I highlight fileC, it asks to delete fileA. 

 Selection still works (pressing cr takes me to fileC)

 Many thanks for your thoughts,

Hello!

I'm sorry -- I am unable to duplicate this problem.

* what o/s are you using?
* do any of your filenames have two or more contiguous spaces in them?
* what version of netrw are you using?  Its up to v153 now. 
(http://www.drchip.org/astronaut/vim/index.html#NETRW)
* may I suggest that you look at :help netrw-debug

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


Re: Vim and Lisp

2015-01-12 Thread Charles Campbell
Matteo Cavalleri wrote:
 I don't write lisp, but I've found a couple of links which might be 
 interesting for you:

 http://usevim.com/2014/09/03/emacs-evil-mode/
 http://usevim.com/2014/07/04/lisp-tips/

You might find Rainbow.vim of interest:
http://www.drchip.org/astronaut/vim/index.html#RAINBOW

:Rainbow  -- turns rainbow highlighting of parentheses for *.lsp files
:Rainbow! -- turns rainbow highlighting off

It supports some other file types, too: C, C++, matlab, tex, and javascript.

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


Re: restrict searches by window

2015-01-08 Thread Charles Campbell
kamaraju kusumanchi wrote:
 Is it possible to restrict searches by window? For example, if I open
 two files by

 vim -o file1.txt file2.txt

 I want to search for expr1 in file1.txt, expr2 in file2.txt. The
 hlsearch option should work so that it will highlight different words
 in different buffers. Is anything like that possible currently?

 I am using vim 7.4.488 on Debian Jessie.

Use :match instead of hlsearch:

  :match Search /pattern/

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


Re: how to display different color in vi

2015-01-05 Thread Charles Campbell
skyworld wrote:
 Hi John,

 thanks for your help. I have tried several times, but always failed. 

 1. I first tried to set abc in my file to be red as:

 :match abc /\yellow\/

 the system seems to be idle and there is no response.

 2. I checked help with match command and tried its example:

 :highlight abc ctermbg=green guibg=green
 :match abc /\red\/

 still there is no reponse.

 could you give me some timps? thanks.

* its  :match {group} /{pattern}/
  (try using  :help :match)

  I seriously doubt that you've set up a highlighting group by the name
of abc if, in fact, that's what you tried.  Try using something
sensible; say  :match Error /\yellow\/ .  Its not likely to be yellow,
though, but it'll give you the idea.
  To set up color groups (red, yellow, ...), here's an example:

  hi Yellow   start= [m [33m  stop= [m [32m  
cterm=NONE  ctermfg=14  guifg=yellow   guibg=navyblue

  With that, you could use   :match Yellow /\yellow\/

* Its possible your vim does not support highlighting; for example,
perhaps not if its the tiny build.  If the above doesn't work, then use

   :version

  Under Compiled by... is a line that will say
[Huge|Big|Normal|Small|Tiny] version...

That command will tell you/us what you've got.

* You could try http://www.drchip.org/astronaut/vim/index.html#HIGHLIGHT
and get the highlight.vim plugin.  Place cursor over something and press
* on the numeric keypad to get that something highlighted.

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


Re: Smarter sintax coloring

2014-12-31 Thread Charles Campbell
Paolo Bolzoni wrote:
 I program in C++ using vim and, as most developers, I use syntax
 coloring. I have a weak spot for colorful terminal screens...

 However, I have the feeling that syntax coloring is little more
 than eye candy.

 Lets see this two lines of code:

 a -= b;

 against

 a =- b;

 The meaning is totally different, yet coloring won't help you at all.

 It is possible to setup syntax coloring so different operators
 have a different color?

Check on ,,,./syntax/cpp.vim (its part of your distribution; on linux,
its usually /usr/share/vim/vim##/syntax/cpp.vim. where ## is your vim's
version number).
Copy said file to your ~/.vim/syntax directory.
Modify it to suit you.

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


Re: Search and hilight in several buffers

2014-12-31 Thread Charles Campbell
ivan.merc...@gmail.com wrote:
 Hi,
 I'm looking for a command to search and hilight a pattern in several buffers.

 My problem is that the non-active splits don't move to the pattern found's 
 line when I use /pattern or * for example.

 Any idea?

I can help you with your first problem (search  highlight patterns in
several windows):

windo match Error /pattern-here/

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


Re: Problem with 'gx'

2014-12-10 Thread Charles Campbell
Cesar Romani wrote:
 On 08/12/2014 05:29 p.m., Charles E Campbell wrote:
  Cesar Romani wrote:
  I'm using vim 7.4.542 on Windows 7.
  When I do 'gx' on an url I always get:
  Press cr to continue
 
  How can I suppress it?
 
  Many thanks in advance,
 
  Try :set ch=2
 
  Regards,
  Chip Campbell

 It doesn't help. I always get:
 Press cr to continue

Some questions...

* What does:  :echo v:scrollstart   show when the message appears?
* What o/s are you using?
* Are you using ftp, scp, or what?
* You may want to look at :help netrw-debug' and use that to find out
which command netrw is actually using.  What happens when you try that
command manually?  From inside vim?

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


missing characters

2014-11-17 Thread Charles Campbell
Hello:

I just downloaded an upgraded Starry Night Pro (v7) -- and it demanded
an upgraded .NET and ASCOM.  It also heavily uses the NVIDIA graphics card.

I run linux via VmWare, and inside linux I run gvim.

Ever since the upgrade, gvim has been dropping characters.  It gets
them, it just does not display them (ex:  :s/test/TEST  shows up as  :  
est/ EST).  I suspect Starry Night Pro has changed some setting on the
NVIDIA card.

Any suggestions on how to get gvim working properly again?

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


  1   2   3   4   5   6   7   8   9   >