Control-V :w : how to write single character?

2021-11-03 Thread L A Walsh

I wanted to write out an unclear character that my
cursor was over, so I tried to go into character VISUAL
selection mode by pressing Ctl-v, then ':w! /tmp/ch'.
Instead of the single character at the cursor, I got
the whole line.  I also tried with a lower case 'v'.

When interactive, selecting with either 'v' or 'ctl-v'
and hitting 'y', then pasting it somewhere, only 1
character is selected. 


How would I write out only the 1 character I had
selected?

thanks,
-linda

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

--- 
You received this message because you are subscribed 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/6182E4DB.3040904%40tlinx.org.


Prob: won't run tty vim on windows

2021-09-03 Thread L A Walsh

The version listed below won't run inside a TTY.

Have tried "SecureCRT" (30 day free trial) that I've used for
many years, and tried "xterm" (runs via "X11").
SecureCRT can be setup to ssh back into localhost, or
you can setup rsh/rlogin to only allow login from localhost
(which is what i do).

With both I get:


 /prog64/vim/current/vim

Vim: Error: This version of Vim does not run in a Cygwin terminal

Any idea why it thinks everything is a cygwin terminal?

What terminal emulators does it work with on windows?

Maybe this  related to it not working w/24-bit color?





Version info:
/prog64/vim/current/vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 23 2021 22:02:48)
MS-Windows 64-bit console version
Included patches: 1-2803
Compiled by appveyor@APPVYR-WIN
Huge version without GUI.  Features included (+) or not (-):
+acl+ex_extra   +multi_lang +tcl/dyn
+arabic +extra_search   +mzscheme/dyn   +termguicolors
+autocmd-farsi  -netbeans_intg  +terminal
+autochdir  +file_in_path   +num64  -termresponse
+autoservername +find_in_path   +packages   +textobjects
-balloon_eval   +float  +path_extra +textprop
+balloon_eval_term  +folding+perl/dyn   -tgetent
-browse -footer +persistent_undo+timers
++builtin_terms +gettext/dyn+popupwin   +title
+byte_offset-hangul_input   -postscript -toolbar
+channel+iconv/dyn  +printer+user_commands
+cindent+insert_expand  +profile+vartabs
+clientserver   +ipv6   +python/dyn +vertsplit
+clipboard  +job+python3/dyn+virtualedit
+cmdline_compl  +jumplist   +quickfix   +visual
+cmdline_hist   +keymap +reltime+visualextra
+cmdline_info   +lambda +rightleft  +viminfo
+comments   +langmap+ruby/dyn   +vreplace
+conceal+libcall+scrollbind +vtp
+cryptv +linebreak  +signs  +wildignore
+cscope +lispindent +smartindent+wildmenu
+cursorbind +listcmds   +sound  +windows
+cursorshape+localmap   +spell  +writebackup
+dialog_con +lua/dyn+startuptime-xfontset
+diff   +menu   +statusline -xim
+digraphs   +mksession  -sun_workshop   -xpm_w32
-dnd+modify_fname   +syntax -xterm_save
-ebcdic +mouse  +tag_binary
+emacs_tags -mouseshape -tag_old_static
+eval   +multi_byte_ime/dyn -tag_any_white 
  system vimrc file: "$VIM\vimrc"

user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$HOME\vimfiles\vimrc"
3rd user vimrc file: "$VIM\_vimrc"
 user exrc file: "$HOME\_exrc"
 2nd user exrc file: "$VIM\_exrc"
  defaults file: "$VIMRUNTIME\defaults.vim"
Compilation: cl -c /W3 /GF /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32  
-DFEAT_CSCOPE -DFEAT_TERMINAL -DFEAT_SOUND  -DFEAT_JOB_CHANNEL 
-DFEAT_IPV6  -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 
/source-charset:utf-8 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG  /Zl /MT 
/D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -DFEAT_MBYTE_IME 
-DDYNAMIC_IME -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL 
-DDYNAMIC_TCL_DLL=\"tcl86t.dll\" -DDYNAMIC_TCL_VER=\"8.6\" -DFEAT_LUA 
-DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" -DFEAT_PYTHON 
-DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 
-DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python39.dll\" -DFEAT_MZSCHEME 
-I "C:\Program Files\Racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME 
-DDYNAMIC_MZSCH_DLL=\"libracket3m_a36fs8.dll\" 
-DDYNAMIC_MZGC_DLL=\"libracket3m_a36fs8.dll\" -DFEAT_PERL 
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL 
-DDYNAMIC_PERL_DLL=\"perl528.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY 
-DDYNAMIC_RUBY_DLL=\"x64-msvcrt-ruby240.dll\" -DRUBY_VERSION=24 
-DFEAT_HUGE /Fd.\ObjCULYHTRZAMD64/ /Zi
Linking: link  /nologo /opt:ref /LTCG:STATUS oldnames.lib kernel32.lib 
advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib netapi32.lib 
uuid.lib /machine:AMD64   libcmt.lib  user32.lib  
/nodefaultlib:lua53.lib  /STACK:8388608  /nodefaultlib:python27.lib 
/nodefaultlib:python39.lib   "C:\Tcl\lib\tclstub86.lib" winmm.lib 
WSock32.lib Ws2_32.lib /PDB:vim.pdb -debug



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

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

To unsubscribe from this group and stop receivin

Re: repost in new thread...how does Vim open a TTY window?

2021-09-03 Thread L A Walsh

On 2021/08/18 11:43, Bram Moolenaar wrote:

Does vim do it's own TTY / terminal extension, or does it use the one
in Win10.


What do you mean with "terminal extension"?  Vim runs in the console,
can use the Windows terminal and also has a built-in terminal emulator.
  


   Sorry I meant the graphical version of vim -- gvim.
This came out of the note entitled
"RedHat Athena: GUI vim is extremely slow using terminal"
by "Aleksandr Jakušev", date+time 2021/05/07 07:57(PDT).

He said the new ":term" function in Gvim_v8 (wasn't in V7) was
really slow, example:  ":term ls -l" takes several minutes to run.

I couldn't try to repeat his problem at the time because I still
was running gvim 7.x on my linx at the time.

Anyway, got that upgraded and realized I could also use the
gvim running natively on Windows as it was also at 8.2.2803.
(running on linux, displaying on Windows).

I.e. I thought someone said they didn't think it would work under
Win7?


The Windows terminal is not available in Windows 7.
  

yeah, but the gvim ":term" feature doesn't use the Windows
terminal feature, so it works regardless.

What I notice as a bit 'odd' is that the emulated
terminal feature set isn't consistent. For example,
I have a shellscript to show 24-bit color (attached).
The native Win version, _maybe_ has 256 colors at most.
but definitely not 24-bit:

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 23 2021 22:01:55)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-2803
Compiled by appveyor@APPVYR-WIN
Huge version with GUI.


But in the Cygwin version:
VIM - Vi IMproved 8.2.486
Mod+compiled by 
Huge version with GTK3 GUI.

as well as a linux version(s) (displayed on same cygwin-X):
Vim 8.2.3204
Compiled by 'http://www.opensuse.org/'
Huge version with GTK3 GUI.

24-bit color fully works and is fast!

Why would vim's terminal emulation be different and
less capable using native Win calls, vs.
when it's displayed via 'X'?












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

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/61321612.7040201%40tlinx.org.


24-bit-color.sh
Description: Bourne shell script


repost in new thread...how does Vim open a TTY window?

2021-08-17 Thread L A Walsh

Does vim do it's own TTY / terminal extension, or does it use the one
in Win10.

I.e. I thought someone said they didn't think it would work under
Win7?


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

--- 
You received this message because you are subscribed 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/611C369A.7020609%40tlinx.org.


Re: RedHat Athena: GUI vim is extremely slow using terminal

2021-08-14 Thread L A Walsh

On 2021/05/07 11:56, Bram Moolenaar wrote:

Aleksandr Jakušev wrote:

  
Which makes me thing that the problem is GUI/X server related. And true, 
this does not happen in the console verion of vim.  FYI, My X server is one 
of the latest versions of vcxsrv running on Win 10.


Any advice would be appreciated.



You are using an X server running on MS-Windows?  I have had nothing but
problems with that.  I haven't tried for years though.  Can you run with
a native X server?
  

Finally got to trying an 8.x running on my Linux (SuSE) w/display
on Windows 7SP1 (64bit) using Cygwin's Xserver.

I guess vim isn't using the win10-only terminal functions since it is
working on Win7

For speed testing, I did a full ls listing of /usr/lib64 w/6917 entries and
used 'dd' to sync.  In bash, I used it's time function (and format:
TIMEFORMAT="%2Rsec %2Uusr %2Ssys (%P%% cpu)"  ).
ran the whole thing under " bash -c 'cmd'":

time bash -c 'ls --quoting-style=literal --show-control-chars 
--color=always -lgG /usr/lib64|dd oflag=dsync'


So besides the color output in the terminal window (TERM=xterm-256color),
I got 2 timings:
1164+1 records in
1164+1 records out
596002 bytes (596 kB, 582 KiB) copied, 3.49621 s, 170 kB/s
3.51sec 0.04usr 0.05sys (2.60% cpu)

So about a 17 million baud equivalent (this is over my 8Gb ethernet link).



I'd try a different X-server and I assume you have a 1Gb wired connection?

Best of luck!

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

--- 
You received this message because you are subscribed 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/6118548F.1060702%40tlinx.org.


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

2021-06-30 Thread L A Walsh

On 2021/06/29 03:05, rwmit...@gmail.com wrote:
The source code is available - you're free to use to make what ever 
changes make you happy.


How many people do you think would be capable of making such changes?

At least I know programming, unlike some poor soul on a list who
was telling me that his 'Object Class' should act like a language native
array because his documentation said so.  I asked how he told
the language-translator that his Object should be treated as though
it was derived from the native array implementation.  He said his
documentation should be all that was necessary.

So if I write that gvim already has this feature because my .vim
file's documentation says so, do ya suppose it will automatically
appear?  :-)


As far as me making changes in vim, it would be easier for me to
write a module plugin for the linux kernel that I could load &
unload.  Does vim have such a compiled plugin system with which
the windowing API can be called to provide the necessary support?
If so, then maybe your statement is reasonable.  But if I have to
know all the internals about what I am adding to, then it seems
that modular extensibility wasn't part of the core design either.

Lack of that would seem to make your statement a bit unrealistic
in a reasonable timeframe.

FWIW, that vim can runtime-load language extensions makes it much
ahead of most sw projects.




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

--- 
You received this message because you are subscribed 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/60DC9890.3020307%40tlinx.org.


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

2021-06-29 Thread L A Walsh

On 2021/06/28 21:07, Tony Mechelynck wrote:


Well, one copy of Vim means one panel and that's that, 

but I can use split and get 4 panels open in 1 copy of vim.
Already I can do multiple panels with 1 vim, just not disconnected.



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

--- 
You received this message because you are subscribed 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/60DADFD6.7010904%40tlinx.org.


Re: Introducing a dedicated unicode mode in Vim

2021-06-28 Thread L A Walsh

On 2021/06/26 23:02, Manas wrote:

Hi folks, I was thinking about the following idea.
As Rust introduced usage of non-ascii characters as identifiers
  


   You do realize perl has had that for over a decade?

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

--- 
You received this message because you are subscribed 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/60DA8050.7030403%40tlinx.org.


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

2021-06-28 Thread L A Walsh

On 2021/06/16 03:45, rwmit...@gmail.com wrote:


Campbell has a very  straightforward approach of accomplishing the 
same end result by saving the contents of the current buffer, and then 
starting a new instance of gvim with that buffer. (I don't use gvim, 
so I hope I got that right.  I did get it work to my satisfaction with 
MacVim).


Is there a reason Campbell's solution does not work for you? 
 Ultimately, isn't the end result the most important part?


   Because starting a separate copy of Vim isn't what I asked for.  I 
want separate,
windows onto the same file -- one vim, but with splits I can 
undock/detach and
move around as separate windows (but still on the same buffer in the 
same copy

of vim).

   I.e. if I split gvim into 4 panels, on the same file, and focus
at the same area, I can type in 1 window and see results in the other 
panels.
Now I just want to detach one or more of those panels -- they will still 
be on
the same file using the same copy of vim -- just that they can be moved 
around

separately from each other.

   Does that explain why/how Campbell's solution isn't solving the same 
problem?


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

--- 
You received this message because you are subscribed 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/60DA7FB8.4010200%40tlinx.org.


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

2021-06-15 Thread L A Walsh

On 2021/06/10 09:44, Bram Moolenaar wrote:

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

How can I undock it?



That is not supported, Vim only works with one toplevel window.
  



Why can't it allow undocking like other GUI apps?  I'm not wanting
it to be a separate instance of vim -- since I want it to be a
different view on the same file -- so it's not like something that
would need interprocess communication -- but really just another GUI
window like browsers (like firefox or palemoon), like, I think,
Visual Studio, or Thunderbird.  Seems like its not an uncommon feature,
and certainly would fit well with the idea of being able to undock
separate windows or tabs from the main window, no?
I.e. might it not be supportable?


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

--- 
You received this message because you are subscribed 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/60C971D5.5000605%40tlinx.org.


Re: RedHat Athena: GUI vim is extremely slow using terminal

2021-06-09 Thread L A Walsh

On 2021/05/07 11:56, Bram Moolenaar wrote:


You are using an X server running on MS-Windows?  I have had nothing but
problems with that.  I haven't tried for years though.  Can you run with
a native X server?
  

I've never had problems with running X on Win.  Have done
so since XP days, and still do so under Win7.

I use cygwin's 'X', but it supports glx/3D graphics accel as
well so even glx progs run fairly well.

Of course much depends on network speed as well, but
anything on a local connection w/gigabit speeds should
be fine.  A 100Mb connection was easily fast enough for
editing/vim work.

Recompiling gvim on my linux box is on my todo list.  Suse's
gvim implementation is slightly broken if you don't have
their version of perl installed since they refuse to use
dynamic loading for perl (they do for other langs but not
perl!).  I tried to give them a patch a few years back to
put perl in the same group as python/ruby, et al. by only
trying to dynamically load it if the user used a perl feature,
but they refused -- which made their version useless for
text editing if you didn't have their perl version installed
(cuz vim wouldn't start).

Anyway, my vim is still in the 7.x era, I'll be interested
to see if the 8.x version works as well.



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

--- 
You received this message because you are subscribed 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/60C1109C.2090600%40tlinx.org.


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

2021-06-09 Thread L A Walsh

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

How can I undock it?

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

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/60C109C8.4030107%40tlinx.org.


Why can't I "split" off a window from the main? Why only panels?

2021-06-07 Thread L A Walsh
I had maybe 4-5 panels open on a file but couldn't really get the 
display the way I wanted...   Alot of GUI's have options to dock a 
window or panel in 1 main window, as well as the ability to split the 
window off so that it floats independently.  How difficult (or would it 
be difficult) to do this with gvim?


The split window would be part just as much a part of the initial 
vim-instance that spawned it -- just as split windows are now.


Only difference is that a detached window could be moved independently.  
Given the number of GUI's that implement such a feature it doesn't seem
like it should be too difficult in gvim 


Possible?  Doable?  If not, why not?  How would it be different from
a popup in any other gui?

Thanks...
Linda

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

--- 
You received this message because you are subscribed 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/60BF0E85.7020507%40tlinx.org.


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

2021-01-06 Thread L A Walsh

On 2021/01/06 12:28, Salman Halim wrote:
While I can't explain why things work the way they do, here is a 
custom function

---
   That's just the thing -- the functions in Vim should be the most general
possible so custom solutions are rarely, if ever needed.

On 2021/01/06 13:16, Salman Halim wrote:


Of course, if you have dozens and dozens of arguments, you could wrap 
them in a [] pair to convert it into a list of arbitrary length (that 
process isn't limited by the 20 function parameter limit). 
Programmatically speaking, if you're doing this dynamically, it seems 
to me as if creating a list of arbitrary length is better than 
creating an execute statement that takes a large number of individual 
parameters.

---
   But non-programmatically, when you just want the min/max of 2, wouldn't
handling both cases be best?  So other functions could pass large numbers of
parameters in a list, but simple cases wouldn't need the overhead or special
syntax.

   If the function handled both cases min(3,4,5,[1,2]) would become
min(3,4,5,1,2) or min([3,4,5,1,2]) and either format would work.  Then users
expecting simple like 'min(1,2)', would just have it work, while those
wanting more complex, could use the equivalent min([1,2]);  Either way, it
would just "do the right thing" and not require the user to conform to one
one syntax or the other.

   As you point out -- it can be done today -- it just hasn't been,
yet.  :-)



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

--- 
You received this message because you are subscribed 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/5FF67D00.1030209%40tlinx.org.


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

2021-01-06 Thread L A Walsh

On 2021/01/02 08:01, Tim Chase wrote

though a lot of vim stuff takes inspiration from
Python where min() is a vararg function letting
you do as the OP requests

  min(arg1, arg2, arg3, arg4, …)

so it's a reasonable sort of hope/expectation.
It just doesn't happen to be a vim thing.
  

---
   Is there any reason why vim couldn't have a simplified
version, "Min" that takes a variable number of args
rather than its current behavior of taking a fixed
number (1) of "list-args"? 


I.e. it sounds like, by being declared "varargs",
that min could take a variable number of args (?).

   Is a vim function capable of determining the type
of the arg(s) passed to it?  Like if I passed
min(3,4,[1,2]), can vim determine that it got 3 arguments,
where it knows that they are two "plain" args, and
1 is a "List" such that it could automatically expand "List" args,
and "inline" its elements into 1 longer set of arguments
that 'min' can return the value of?  


   I.e., it seems like "min", rather than returning an "Error"
when presented with multiple-args, could simply return the
minimum of those args, _and_, if any of those args were a "List",
like [1,2], then merge those args into the set of multiple
args that was passed.  This would mean that ([1,2]) would
automatically expand its List into multiple arguments (1,2), and
then return the "min" value,  i.e. "doing the right thing", while
keeping compatibility with current behavior (except for returning
an error when unnecessary).

Wouldn't that be possible for "min" and similar functions
that can tell what the user wants, and just do it? (rather than
returning an error that doesn't seem necessary or useful)

-tim
  

---
   Thanks for the explanations!  As you point out, vim, it
seems, could do the right thing while remaining functionally
compatible with older vim script. 


-Linda

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

--- 
You received this message because you are subscribed 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/5FF6110E.7050102%40tlinx.org.


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

2021-01-04 Thread L A Walsh

On 2021/01/02 08:01, Tim Chase wrote:

On 2021-01-02 16:48, Tony Mechelynck wrote:
  

Using a single list-like argument is more general: it allows
determining the minimum of any number of values. If it accepted only
two Float arguments, then to determine the minimum of 8 values you
would have to do for instance



   I asked why it didn't seem to take more than one parameter.
That ':help min' shows min({list}), which really means
min([itema, itemb...]), is what was throwing me. 

:let result = min(min(min(arg1, arg2), min(arg3, arg4)),
min(min(arg5, arg6), min(arg7, arg8)))

while now you can do

:let result = min([arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8])

which is much more elegant.


True.  Even more elegant, might have been:
result = min(1,2,3,4,5,6,7,8);
(  = 1)


On 2021/01/02 08:01, Tim Chase wrote:

though a lot of vim stuff takes inspiration from
Python ...
  

I think vim was around before python.  vim would have drawn from
'vi' and, earlier, 'ed', sorta like early perl was an attempt to
mix early shell tools (sed, tr, sort, etc), with a shell like
language.  Passing args in a list seems more like lisp -- maybe
drawing examples from emacs?


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.

Thanks!






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

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/5FF39360.20002%40tlinx.org.


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

2021-01-03 Thread L A Walsh

On 2021/01/02 06:57, Yongwei Wu wrote:

Just do ":help min()", it will tell you:

min({expr}) Return the minimum value of all items in {expr}.
{expr} can be a |List| or a |Dictionary|.

So the simplest solution seems to be:

trunc(min([3, float2nr(1+log(1+line('$'))/log(10))]))


---
Thanks, when I typed ":help min()", I got
min({list}), and didn't know if the curly braces, "{}"
were needed, but never would have guess I needed
square brackets "[]".

I had 'trunc' to convert from float to a truncated
integer, but notice that you are using "float2nr".

Didn't know I would have needed that either (I had
used the output of 'printf' to go from a number to
a string.

Thanks for the hints and, especially, the example.

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

--- 
You received this message because you are subscribed 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/5FF25BC2.8020208%40tlinx.org.


why doesn't min take more than 1 parameter?

2021-01-02 Thread L A Walsh

I have the expression:

trunc(1+log(1+line('$'))/log(10))

to give me the width of the number columns when numbering is
on.  Seems that it is reserving a minimum of 3 columns, so I tried
using the 'min' function:

trunc(min(3,1+log(1+line('$'))/log(10)))

but I get E118: Too many arguments for function: min.

huh?  so how does one use 'min' to determine the lowest of 2 or
more numbers, or why doesn't the above work? :-(


*sigh*,
tnx


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

--- 
You received this message because you are subscribed 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/5FF08799.3040702%40tlinx.org.


Re: SOLVED+new Q: Re: How to re-indent text according to type...

2020-10-13 Thread L A Walsh

On 2020/10/12 23:34, Gary Johnson wrote:
  

Anyone seen such fun?  And thanks again gary, for the '=',
don't recall ever seeing that.



You're welcome.

I am no expert in XML, but I thought that closing tags began with
a slash, not a backslash; that is, with "  


   Some days,  just shouldn't get out of bed.
Sigh.  Sorry for the unnecessary  bother. And
thanks again for the various clue sticks...

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

--- 
You received this message because you are subscribed 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/5F85A4A0.50809%40tlinx.org.


SOLVED+new Q: Re: How to re-indent text according to type...

2020-10-12 Thread L A Walsh

On 2020/10/10 23:10, Gary Johnson wrote:

On 2020-10-10, L A Walsh wrote:
  

:%s/>/>^M/g
:%s/<\([^>]\+\)>\n\([^>]\+\)<\/\1>/<\1>\2<\\\1>



I don't know of a way to do that with one command, 
then execute the following
normal-mode command.

gg=G
  

---
close enough, as I gave 'ggap' as an example for text.


You might also search the web for HTML Tidy.  I think it will
reformat an HTML file.
  

---
   yeah, but it was xml and main requirement was to run
pretty much in (g)vim.  You got like 100% for my original
question!  But ran into a quirky special case that fails with
normal vim indenting as well (works if I split all
lines 1st), but if some of the close tags are on same line
as open, doesn't seem to unindent...

Example, starting with:

2952962267<\totalbytes>

13363<\dircount>
64267<\filecount>
11707704502<\totalbytes>

0x01cb8936<\highpart>
0x131f339a<\lowpart>


0x01cb8950<\highpart>
0xbc4d774b<\lowpart>


9<\arch>
acpiapic<\hal>

en-us<\language>
en-us<\default>

doors<\systemroot>

4497873056<\hardlinkbytes>



Running '=' over that, (filetype=xml, syn=xml) using expand tab, I get:


 2952962267<\totalbytes>
   
 13363<\dircount>
   64267<\filecount>
 11707704502<\totalbytes>
   
 0x01cb8936<\highpart>
   0x131f339a<\lowpart>
   
   
 0x01cb8950<\highpart>
   0xbc4d774b<\lowpart>
   
   
 9<\arch>
   acpiapic<\hal>
 
   en-us<\language>
 en-us<\default>
 
 doors<\systemroot>
 
 4497873056<\hardlinkbytes>
 
   


Seems if I have some closing tags on same line it doesn't
unindent (happens in normal insert as well).  Seems unrelated
to the method you gave.  I have seen the indent problem in other
languages as well, but am stymied coming up with
an example off the top of my head.

To emphasize, if all the tags (open+close) are on their
own line, it works just fine.  But when some matching tags
are on same line, I get mixed/weird results.

Anyone seen such fun?  And thanks again gary, for the '=',
don't recall ever seeing that.

*cheers*
-linda




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

--- 
You received this message because you are subscribed 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/5F8543B5.6030500%40tlinx.org.


How to re-indent text according to type

2020-10-10 Thread L A Walsh

Sometimes, I get some unformatted text, like HTML or XML that has all
the newlines removed.

To make it easier to read, I'll sometimes add newlines and pair
up adjacent tags, using something like:

:%s/>/>^M/g
:%s/<\([^>]\+\)>\n\([^>]\+\)<\/\1>/<\1>\2<\\\1>

But then I have an unindented file like:



xxx
yyy



Where if I had typed it in by hand, with auto indent and syntax set, I'd
get:


 
   xxx
   yyy
 



To get the above, for very short examples, I can just
join 1+2nd line, then hit enter with cursor before "", join nxt lines
and hit enter and so on.

A __kludgy__ way for longer methods is to put the original in a file,
then in a non-paste aware TTY running vim, I can put all of the code
in my cut buffer, and paste it into the TTY window.  It then acts like
it would if I'd typed it in, as it is unaware of the paste-mode (play
with paste/nopaste mode).

How can I just reformat the file as if I'd just typed it all in by hand
without making use of a TTY window running vim and pasting all the text?

Is there a format-type command as there is for text, where I can set
'tw' (:set tw=72), select a paragraph or whole page, and use:

:gqap to reflow the text.

Thanks MUCH, if there is an easy command to do this!












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

--- 
You received this message because you are subscribed 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/5F823BC9.5090809%40tlinx.org.


increasing default read size? & using direct read?

2019-08-22 Thread L A Walsh
I was noticing that it took a LONG time to read in a 606.9MB file in
a "local" gvim session (local meaning gvim running on same machine
as file is located).

I finally figured that it was reading 64KB at a time
using async reads.

That is really slow compared to using a direct
read of say, 16M at a time

I.e. using the async reads, for a 8M file takes 2.14s.
It averages 4MB/s,

Using a direct read of 16M/read takes .18s averaging 3.5GB/s.

Is there anyway to speed up vim's reading of large files?


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

--- 
You received this message because you are subscribed 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/5D5F0AD4.8050003%40tlinx.org.


Re: (Obscure) problem with bash syntax highlighting

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

ok, though isn't it more important to prune unnecessary content?
:-|



On 2019/05/21 13:17, 'J S' via vim_use wrote:
> But is also allows the offset (and then length, too, but ignore that
> for now) to be negative.  But, alas, as noted in "man bash", if the
> offset is negative, you have to
> put a space after the :, in order to avoid ambiguity with the usual
> ${var:-xxx} construct.  So, you have to write:
>
> $ echo ${var: -9:5}
>
> Alas, vim flags this as an error.  If I take out the space before the
> -, the highlighting is OK.  But with the space, it is flagged as error.
>
> Can this be fixed?
Not that it fixes the syntax, but I've always used "${var:0-9:5}" so the
field
would clearly stand out as starting with an integer and not the ambiguous
'dash'.  Is that flagged as an error too? 

Just curious

-l

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

--- 
You received this message because you are subscribed 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/5CE8295A.80606%40tlinx.org.
For more options, visit https://groups.google.com/d/optout.


possible RFE - open existing window w/file already being edited

2019-02-24 Thread L A Walsh
Very often I have many gvim windows open -- sometimes for unrelated
projects because I hit a snag in 1 project that sends me off to another.

Add that to breaks, and I forget which windows are minimized over in the
the tray.

Just like now, I wanted to open a file that has a list I wanted
browse to find the right error code for a program I was working
in.  I tried to open errnos.shh but got the message it found a
.swp file, I scan for the process info to see if it says it is
still active.  It is.  So then 'abort' that and then go
to taskbar and only see 1 icon for vim with 5 files hiding
under it.

I move my mouse over the taskbar icon and it displays the names
each of them is editing, then I click on it to open and continue work.

What would really speed up my work flow is if it would behave like
some apps (like web browsers), where if I already have the file
open in a gvim instance, if my 'invocation' of a new gvim on the
same file could send the other one a command to restore itself to the
desktop and pop-to-the top.

Then I can just skip all the reading on the duplicate scanning for pid,
scanning for 'still running', then going to find the current one.

Is that possible or is it something that might be added?

Currently running gvim via 'X' from a linux machine but
displaying on a windows machine, but we're really talking about
an 'X' window being bumped to the top, though the same situation
could arise if I was using the Windows GUI version (just that most
of my editing is of files on the linux machine).

Might this be possible?

Thanks!

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

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


Re: slight correction in online help under Magic \V

2018-12-24 Thread L A Walsh

On 12/24/2018 10:16 AM, Bram Moolenaar wrote:

Use of "\V" means that in the pattern after it only the backslash and the
terminating character (usually / or ?) has a special meaning.  "very nomagic"

  

"Use of "\V" means that in the remaining pattern, only a backslash and
terminating character (usually / or ?) have special meaning.  "Very 
nomagic"


1) 'comma' after first clause
2) 'a' instead 'the', as the use of a backslash isn't limited to one usage,
3) 'terminating character' ("specifier dropped" as specifier for other 
subject

  ('a') is distributed over both subject-nouns;
  (OR: "the corresponding, terminating character"; felt it read better 
without

  the extra word)
4) 'have' instead of 'has' (subject-verb quantity agreement)
5) "special meaning" is a property, not a thing,
  like "has magic" or "does not have magic", but not
  "has a magic" or "does not have a magic"



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

--- 
You received this message because you are subscribed 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.


slight correction in online help under Magic \V

2018-12-24 Thread L A Walsh

This sentence:

Use of "\V" means that in the pattern after it only the backslash and the
terminating character (/ or ?) has a special meaning.  "very nomagic"

Should be:

Use of "\V" means that in the pattern after it only the backslash and
terminating characters have a special meaning.  "very nomagic"

Example:
   pattern:"The example file is /etc/passwd?"
   :s!\V/etc/passwd?!/etc_passwd\!!
   Becomes:"The example file is /etc_passwd!"

(Point: terminator is not always '/' or '?')
-linda


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

--- 
You received this message because you are subscribed 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.


failing: attempt to embed perl in bash (sh)

2018-11-26 Thread L A Walsh

Have tried several variations for the SingleQuoted(SQ)
script...including
 perl -e ''
or just 
 '#!/usr/bin/perl

on the 1st line, but nothing seems to work.

I probably have scores, of shell scripts that use this
type of construct.  Some are called by putting the prog
in a "var" 1st, others, I've done inline...  but getting
that syntax, is a bit challenging...(sigh)...

Any ideas?  Files of interest (using vim7.4) below.
Thanks!
-linda


I have this snippet in my test file:

---/tmp/perl_in_bash
#!/bin/bash

# path goes from curdir (topdir) through file repomd.xml

for path in "${paths[@]}"; do
 my dir=${path%/*}
 my repo=${dir#tumbleweed/repo/}
 repo=${repo%%/*}
 array names=()
 my p_prog='use strict; use warnings; use P;
   my $dir = $ARGV[0];
   while (<>) {
 chomp;
 if ( m{} ) {
   my $file=$1;
   unless ($file =~ m{-susedata\.[^.]+\.xml\.gz$} ) {
 P "%s/%s", "$dir", $file;
   }
 }
   }'
 P "dir=%s, repo=%s", "$dir" "$repo"
 readarray -t names< <(perl -e "$p_prog" "$dir" "$path")
 raw_repomd_files[$repo]="${names[*]}"
done
# vim: ts=2 sw=2 et ai number


and I have a perlembeded vim-syntax file like this:

--- perlembed.vim ---
" in ~/.vim/after/syntax/sh as perlembed.vim

   if exists("b:current_syntax")
 unlet b:current_syntax
   endif
   syn include @PerlScript syntax/perl.vim
   syn region PerlScriptCode matchgroup=PerlCommand start=+[=\\]\@skip=+\\'+ end=+'+ contains=@PerlScript contained
   syn region PerlScriptEmbedded matchgroup=PerlCommand 
start=+\+ skip=+\\$+ end=+[=\\]\@contains=@shIdList,@shExprList2 nextgroup=PerlScriptCode

   syn cluster shCommandSubList add=PerlScriptEmbedded
   hi def link PerlCommand Type
--



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

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: syntax highlighting not correct in bash script

2018-08-10 Thread L A Walsh




May not be related to your problem, BUT you also need to tell vim that 
you are

using bash, as it shares syntax with 'sh'.

In my ~/.vimrc, I have
let g:is_bash=1
let b:is_bash=1


kamaraju kusumanchi wrote:

On Sun, Jul 29, 2018 at 7:37 AM, John Little  wrote:
  

With the vim 8.1.0224 from git, I see the problem.



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

--- 
You received this message because you are subscribed 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.


font specifiers and options on Windows version of vim

2018-07-23 Thread L A Walsh

I'm running a native version of Vim on windows and had some
questions regarding the font dialog

It shows 3 list boxes at the top: Font: Font stye: and Size.
On the 2nd "row" there is a Sample box.
and on a 3rd row, there is a 1-line list box, "Script:" with
the only options being: Western, Greek, Turkish, Baltic, Central 
European Cyrillic.


toward the bottom there is a blue link
"Show more fonts"
followed by (Ok) and (Cancel)

Maybe 1st question is how can I select script 'Unicode' or UTF-8?

Second question is -- if I click on "Show more fonts", how do enter
one of those fonts into the font dialogue or how do I use one of
those fonts in vim?

Third question... if I select a font via the Edit->Fonts menu,
like "Ubuntu Mono", it translates it into
Ubunto_Mono:h11:cANSI:qDRAFT

I get that it is using underscore instead of the more
literal "Ubuntu\ Mono", h11 has something to do with the
height, and q has something to do with the rendering quality,
but where does it get the cANSI?  When I look at the vim
options, I see encoding and file-encoding both set to utf-8.
But where does ANSI come in?  I don't remember that even
being a windows codepage.  I don't see anyplace that explains
what these are.  The win32_gui certainly seems to support
UTF-8 these days...so how do I get that?

I guess that's enough questions for this email -- hopefully not
too many.  Thanks!

Linda

version:
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 20 2016 22:02:37)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-6
Compiled by appveyor@APPVYR-WIN
Huge version with GUI.  Features included (+) or not (-):
+acl+eval   +mouse  +syntax
+arabic +ex_extra   +mouseshape +tag_binary
+autocmd+extra_search   +multi_byte_ime/dyn +tag_old_static
+balloon_eval   +farsi  +multi_lang -tag_any_white
+browse +file_in_path   +mzscheme/dyn   +tcl/dyn
++builtin_terms +find_in_path   +netbeans_intg  -termguicolors
+byte_offset+float  +num64  -tgetent
+channel+folding+ole-termresponse
+cindent-footer +packages   +textobjects
+clientserver   +gettext/dyn+path_extra +timers
+clipboard  -hangul_input   +perl/dyn   +title
+cmdline_compl  +iconv/dyn  +persistent_undo+toolbar
+cmdline_hist   +insert_expand  -postscript +user_commands
+cmdline_info   +job+printer+vertsplit
+comments   +jumplist   +profile+virtualedit
+conceal+keymap +python/dyn +visual
+cryptv +lambda +python3/dyn+visualextra
+cscope +langmap+quickfix   +viminfo
+cursorbind +libcall+reltime+vreplace
+cursorshape+linebreak  +rightleft  +wildignore
+dialog_con_gui +lispindent +ruby/dyn   +wildmenu
+diff   +listcmds   +scrollbind +windows
+digraphs   +localmap   +signs  +writebackup
+directx+lua/dyn+smartindent-xfontset
-dnd+menu   +startuptime-xim
-ebcdic +mksession  +statusline +xpm_w32
+emacs_tags +modify_fname   -sun_workshop   -xterm_save
  system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\.vimrc"
2nd user vimrc file: "$HOME\vimfiles\vimrc"
3rd user vimrc file: "$VIM\.vimrc"
 user exrc file: "$HOME\.exrc"
 2nd user exrc file: "$VIM\.exrc"
 system gvimrc file: "$VIM\gvimrc"
   user gvimrc file: "$HOME\.gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\.gvimrc"
  defaults file: "$VIMRUNTIME\defaults.vim"
   system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32  
-DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL   -DFEAT_XPM_W32  
-DWINVER=0x500 -D_WIN32_WINNT=0x500  /Fo.\ObjGXOULYHTRZAMD64/ 
-DHAVE_STDINT_H /Ox /GL -DNDEBUG  /Zl /MT -DFEAT_OLE -DFEAT_MBYTE_IME 
-DDYNAMIC_IME -DFEAT_MBYTE -DFEAT_GUI_W32 -DFEAT_DIRECTX 
-DDYNAMIC_DIRECTX -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL 
-DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl86.dll\" -DDYNAMIC_TCL_VER=\"8.6\" 
-DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" -DFEAT_PYTHON 
-DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 
-DDYNAMIC_PYTHON3-DDYNAMIC_PYTHON3_DLL=\"python35.dll\" -DFEAT_MZSCHEME 
-I "C:\Program Files\Racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME 
-DDYNAMIC_MZSCH_DLL=\"libracket3m_a0solc.dll\" 
-DDYNAMIC_MZGC_DLL=\"libracket3m_a0solc.dll\" -DFEAT_PERL 
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL 
-DDYNAMIC_PERL_DLL=\"perl524.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY 
-DD

vimvars: maxmem+maxmemtot dflt: xxkB or .5*totmem, whichever is what?: larger|smaller?

2018-06-25 Thread L A Walsh

subject is the question.  for vim vars', maxmem, maxmemtot,
default is says XX(some os dependent value in kB) or half of memory.

Doesn't say if it picks smallest or largest.

Like: for read-only files , only create a swapfile
if it needs more than the given 'maxmem' or 'maxtotmem'.

Might make sense in some cases to use .5*(totmem), but
not so much these days.  Might make more sense to use
.5*(tot_availmem), but even that might not be good on
systems with many background processes that vary, largely
on the amount of memory used.

So first Q is, "for default, does it use the smaller or larger
value?"

If it uses "freemem", does it add the cache-memory
back to 'free' to get the "real free"

Thanks




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

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Vim 8.1 is released!

2018-05-17 Thread L A Walsh

Bram Moolenaar wrote:

Bram Moolenaar wrote:


Hello Vim users!

Announcing:  Vim (Vi IMproved) version 8.1


This is a minor release with many small improvements and lots of bug
fixes.  The main new feature is the terminal window.  I have put up a
few screenshots on the Vim website:
https://www.vim.org/vim-8.1-released.php
  
  


It's not clear if this that binary is a 64-bit version ...
32-bit runs between 10-15% slower on 64-bit machines.



It is 32 bit.  Previous comparisons show that the 32 bit version is a
bit faster.  Where do you get the information that it would be slower?
  

---
   Various places and own benchmark.  It depends on which operations
you are doing and if the program can use more data.  If you take
a 32-bit prog and keep all the data at 32-bit sizes, then you have alot
of masking and shifting.  In those cases  64-bit can run 1-7% slower,
but I tend to work with larger files and being able to edit those
with out using a swap or cache file noticeably speeds things up.  Less
so today with SSD's, but unless you are using the PCI-based SSD's, that
are really non-volatile ram-disks attached to the system-bus -- those
operate on a similar order as SSD's.

Going back to 2005, some numbers:
(https://www.passmark.com/forum/performancetest/283)

Intel:
*TEST: CPU - Integer Math*
PT6 64bit, Win2003 64bit, Result = 193.3
PT6 32bit, Win2003 64bit, Result = 92.9
PT6 32bit, WinXP 32bit, Result = 92.9

*TEST: CPU - Find Prime Numbers*
PT6 64bit, Win2003 64bit, Result = 217.7
PT6 32bit, Win2003 64bit, Result = 158.2
PT6 32bit, WinXP 32bit, Result = 157.9

*TEST: CPU - Data compression*
PT6 64bit, Win2003 64bit, Result = 2584.6
PT6 32bit, Win2003 64bit, Result = 2578.6
PT6 32bit, WinXP 32bit, Result = 2582.77

AMD:
*TEST: CPU - Integer Math*
PT6 64bit, Win2003 64bit, Result = 210.0
PT6 32bit, Win2003 64bit, Result = 111.6
PT6 32bit, WinXP 32bit, Result = 112.7

*TEST: CPU - Find Prime Numbers*
PT6 64bit, Win2003 64bit, Result = 254.7
PT6 32bit, Win2003 64bit, Result = 192.4
PT6 32bit, WinXP 32bit, Result = 191.8

*TEST: CPU - Data compression*
PT6 64bit, Win2003 64bit, Result = 4846.1
PT6 32bit, Win2003 64bit, Result = 3244.5
PT6 32bit, WinXP 32bit, Result = 3125.6


Apple tends to distort their test results though -- it turns out when they
went with x86, they had wait loops in x86 drivers so the Windows versions
of the same program would run 15-20% slower.  People found out when they
loaded 3rd party drivers and the same programs were now 10-15% faster. 
Created a minor squawk at the time, but Apple customers tended to see

what they wanted to see.

Another: (5 yrs ago)
https://www.viva64.com/en/k/0003/
... in general you may expect a 2-20% performance gain from mere 
recompilation of a program - this is explained by architectural changes 
in 64-bit processors [1]. (on the referenced page:)
Adobe Company claims that new 64-bit "Photoshop CS4" is 12% faster than 
its 32-bit version.


This site: 
http://www.iinuu.eu/en/it-guru/windows-7-32-vs-64-bit-performance-benchmark
shows a mix, but they show slowdowns even on math functions, so I wonder 
if they

were using single-precisions or 32-bit integers rather than larger numbers.

The areas where 32-bit was faster -- had 64-bit being 1-7% slower in 
some tests,

but where 64-bit was faster -- multimedia by 30-50%, SSL connections/crypto
were an average of 15-20% faster.

In many cases, 32-bit SW running on 64-bit ran slower due to all the
translation overhead.

Look at a 32-bit programs stack sometime -- nearly every stack level 
requires
another level just to align the data. 


If you have low-memory (<=4GB), which was true even for many 3-5 years ago,
32-bit may have an edge, but if your system has >=16G, it's likely to have
notably better perf on 64-bit.  There's where your perf can really shine --

If you have a large amound of memory -- more things can be kept in 
memory even when the app is not running -- linux is real good about this 
-- it will use all of free memory for filesystem caching.  Windows -- 
not quite as much, but most

of window's cache memory is hidden on the "free list" -- and will show up as
"free memory" -- even though cache memory on linux is also effectively free
as well -- they just count it as being used -- but both can be reallocated
to program nearly instantaneously (nothing is written to disk -- the 
memory just

has to be zeroed, at most and sometimes not even that).

Another factor -- is how much of the application can be done 
asynchronously --
in the background so the user doesn't have to wait.  Adobe went to 
background saves in PS6 -- so the save dialogue came back immediately.  
In PS5, it could take 20-40 seconds for a 4GB file.


In the firefox family, they hurt possibilities for faster I/O by using 
small
I/O sizes.  They use a 4k read/write size for everything (disk and net), 
whereas

optimal is closer to 16M for fast links.  So there 64-bit won't help due to
the small I/O sizes.

So t

Re: Vim 8.1 is released!

2018-05-17 Thread L. A. Walsh

Bram Moolenaar wrote:

Hello Vim users!

Announcing:  Vim (Vi IMproved) version 8.1


This is a minor release with many small improvements and lots of bug
fixes.  The main new feature is the terminal window.  I have put up a
few screenshots on the Vim website:
https://www.vim.org/vim-8.1-released.php
  


   It's not clear if this that binary is a 64-bit version ...
32-bit runs between 10-15% slower on 64-bit machines.

Thanks!
-l

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

--- 
You received this message because you are subscribed 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 seems to use perl options not in my perl

2017-06-05 Thread L. A. Walsh

aroc...@vex.net wrote:

Seems like vim is requiring some specific versions/features
of perl?


Which features? What is happening?
  
During the initial build, vim passes the "-prototypes" flag to perl when 
building it's XS module.  That fails with the message:

   "Unrecognized switch: -rototypes  (-h will show valid options)."

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

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


vim seems to use perl options not in my perl

2017-06-05 Thread L A Walsh

Seems like vim is requiring some specific versions/features
of perl?  Is it possible for it to read the version and only
use the features the installed perl has? (like -prototypes --
gets message of "rototypes" being a bad switch or similar)...

Makes it hard to build vim when one has to match it to some
specific version.

Thanks,
-linda

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

--- 
You received this message because you are subscribed 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: RFE: enable gvim to open a buffer or tab in a new window

2017-04-10 Thread L. A. Walsh




 


Ben Fritz wrote:
This part is easy: ":set textwidth=80" and make sure
the 'formatoptions' setting contains 'c' or 't' or both. You also might
be interested in the 'colorcolumn' option to draw a line at a specific
column, for example column 80, to show when you're getting near to the
80-character boundary.


    I never use those, as "autowrap" always wraps at the wrong
place.
Consider (code typed with tw=80+fo_ops c+t): 
(numbers included to show 80-columns).
01234567890123456789012345678901234567890123456789012345678901234567890123456789

    for ( int i_fld = 0, o_fld = 0;
i_fld
              o_fld

    Vs.

     for ( int i_fld = 0, o_fld = 0; 
               i_fld
               ++i_fld, ++o_fld) {

The latter is a preferred code-style with the 3 clauses of a 'for'
loop all on 3 lines (when they don't fit on 1 or don't look right on 1).

Also, of note, though is that the window doesn't resize when I type
set tw=80 -- in order to have well-formed code, seeing the screen width
is needed.

As it is, vim comes up in an 80 char window (when launched from an
80-col
terminal).  If my files have "gvim=:SetNumberAndWidth" in a comment
near the top, then my *gvimrc* (not vimrc) will resize the window
to allow for the numbers.  The current code blindly adds an extra column
for 'fdc' whether it exists or not (need to fix that ;-) :

func! SetNumberAndWidth()
  set number
  if (! exists("g:added_numwth")) | let g:added_numwth=0 | endif
  if (g:added_numwth < &numberwidth)
    let g:added_numwth = &numberwidth
    " adding 1 to allow for 'fdc' width;
    let &columns = 1 + g:added_numwth + &columns
  endif 
endf
if !exists("g:autocommands_loaded")
  let g:autocommands_loaded =1
  au VimEnter,WinEnter *   let ln = line("'\"") | if
search("vim=:SetNumberAndWidth",'n') | call SetNumberAndWidth() | endif
endif




 
  I'd suggest just keeping a bunch of tabs open in ONE Vim and switching between the tabs, here. If you need to reference more files at the same time you can even open them as additional windows in the same tab. I frequently have 4-6 windows or more open in my Vim as I edit. But I understand more now why you wanted to be able to quickly spawn a new application window!

There is a --remote-tab flag you can use from the shell command line when launching Vim to open a tab in an existing Vim application window instead of launching a new Vim.


    Looked into that hoping the server would open a new window
for each edit, but that doesn't seem to be the case (right?)?



   See :help clientserver, it might be worth experimenting with and making some mappings to get what you want via mappings instead of mouse dragging. 


    See note where I said using commands to navigate doesn't work well:
---
  On Sun Apr 09, 2017 @ about 8pm, Linda wrote:
 Here's another rub -- and why I like the mouse for navigating.
  using the keyboard for navigating is too analytical and is more likely
  to interfere with the thinking about what I'm doing, which is rather
  analytical.  Compared to mouse moving, which doesn't seem to use
  my analytical-verbal skills so much and feels more unconscious -- in
  so much as I don't have to think about it, so it doesn't cause much
  "crosstalk" in my analytical thinking.
--



  
I occasionally bring up multiple Vim application windows when I'm switching between multiple unrelated tasks. But I like to keep everything related to my current task in one application window. I can see you're using multiple unrelated application windows for that, and understandably want to link them together more efficiently.

In the picture I posted of my desktop, all of those vim windows
were from
the same application.  Those were about half of the open vim-windows
with the others being minimized -- but ***all*** were from 1
application.

FWIW -- I was looking at a multi-desktop manager -- as for me, I tend
to want to keep everything related to my current task on my desk(top).
Then I could switch to another desktop to switch projects.




   Unfortunately Vim was not designed for that and the underlying assumption that there is ONE application window to worry about is pretty deeply ingrained in Vim, so it will take a LOT of time and effort to add such a feature, and the benefit over using multiple "tab pages" instead may not be worth that effort.
  

  If it was something easily doable "in vim", I wouldn't be
wanting changes in for the GUI... ;-).

  But hey, at one time, vim couldn't handle unicode or variable
char-cell
spacing (was said to be too big of a change in vim to do).  But that
works now.  If no one makes clear what is desired, no one will know
it is wanted or why.  Many people get used to doing things a specific
way and stop thinking about how their work-flow might be better.

  I've tried using more tabs and splits, but found it more confusing --
a problem w/tabs -- when I only see the window header (especially 
true wh

Re: RFE: enable gvim to open a buffer or tab in a new window

2017-04-09 Thread L. A. Walsh

Michael Henry wrote:

- You can create Gvim menus for any of the commands that you've
  seen suggested here, so you can use the mouse instead of the
  keyboard.
  

But can't arrange the separate files in staggered windows as shown
in a previous post.

- You may want to take another look at tabs.  In Gvim, you can
  switch between tabs by clicking on the tab, instead of using
  your desktop window manager to switch between Gvim instances.
  


   I do that... but generally only have main+header (2 files)/window,
each in a tab.


- You might also look into the Project plugin
  (http://www.vim.org/scripts/script.php?script_id=69), which
  gives you a menu of files in your project that you can select
  from.  This can help you reduce the amount of typing to select
  a file.
  
 
   I'm wanting something like that but at a desktop level w/multiple

windows...

- I use Derek Wyatt's "fswitch" plugin to switch between
  "companion" files (as he puts it):
  https://github.com/derekwyatt/vim-fswitch
  


   Whenever I edit a source (.c/.cc/.cpp, etc or header (.h)),
my gvim is invoked via a function -- and that automatically opens
the "other" member of a pair in a 2nd tab.  So I already use the tab
switching (w/a mouse) to go between tabs to look at base file+header.


  If you have a .cc file open and you want to open the
  corresponding .h file, fswitch can find it and open it for
  you.  There are other similar plugins to try as well.

- I greatly enjoy fuzzy file finders.  I routinely use CtrlP
  (https://github.com/ctrlpvim/ctrlp.vim.git) and LustyExplorer
  (https://github.com/sjbach/lusty.git) to avoid having to type
  all the characters in a filename.  If you are trying to reduce
  the amount of typing, you may want to consider such a plugin.
  
--- 
   In bash, I have file completion, which helps.



- Similarly, if you aren't already using tags, you may want to
  consider installing Exuberant Ctags and generating a ``tags``
  file for your entire project.  I find this feature
  indispensable for navigating through my codebase.  When I want
  to find the definition of a function, I just place my cursor
  on the identifier in my current file and press a key; but in
  Gvim, you can use the mouse to follow the tag as well, saving
  keystrokes.
  


   I've tried that a few times, but never found the tags to be
that useful -- required too much thinking to use and that distracted
me from the task.

   Here's another rub -- and why I like the mouse for navigating.
using the keyboard for navigating is too analytical and is more likely
to interfere with the thinking about what I'm doing, which is rather
analytical.  Compared to mouse moving, which doesn't seem to use
my analytical-verbal skills so much and feels more unconscious -- in
so much as I don't have to think about it, so it doesn't cause much
"crosstalk" in my analytical thinking.

Michael Henry
  

Thanks for the pointers & suggestions -- appreciate them, even if
they don't solve my immediate problem, I still tend to file things
away to investigate and maybe use in other ways later...

-linda



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

--- 
You received this message because you are subscribed 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: RFE: enable gvim to open a buffer or tab in a new window

2017-04-07 Thread L. A. Walsh

Ben Fritz wrote:


Is maximizing for the split view and then restoring the application window an 
option? If not is there a reason you need specifically 80-character application 
windows? Or do you just like that size?
  


   I never use full screen unless I'm not doing work (movies/games).
   80-chars -- many projects require lines to fit in an 80-char
width.  It's a standard in the software world (not so much in the web
world).

   And there's the final 'rub'... I'll try the other commands
you mention -- but I gave 1 example (that can't even be
handled w/80 column widths).  When I'm working on a project
with >50 file-pairs, working to resize any of them manually is a
pain -- thus my comment that it was easier to quite and restart both
files in separate 80 column windows (FYI -- my window columns are
adjusted for the line numbers, automatically, so if a file has
line numbers turned on in the header, a vim-function takes care of
resizing the windows wider to handle the extra columns needed for
the numbering).

   Also, side-by-side is one of the simplest to describe, but
many times, I'll have windows staggered so a quick click can
switch me to a different file.  

Re: RFE: enable gvim to open a buffer or tab in a new window

2017-04-06 Thread L. A. Walsh

Jacky Liu wrote:
Just in case, you know that the split columns and lines in Gvim can be 
dragged by mouse right? And this is still not what you want ?

Thanks Jacky, but no.  I _do_ use that to adjust the
split lines after the split, but just now, I was editing
2 files (C++ & header: file.cc + file.h).  They were each
in a tab with line numbering + fdc=1 turned on and each
had 80 columns for the text. (I try to keep my windows
sized @ 80 columns so I know when I enter code, where it
is going to wrap).

I was switching back and forth adding some code, then realized
something was inconsistent, so now I want to see them side by
side.

If I could drag a tab out and have it display itself in a new
window, that'd be great -- 2 windows side-by-side, each
80-text columns wide.

If I used a vertical split, first problem is I have 2 vertical
panes with the same file.  How do I switch?  If I click on the
other tab, it switches to the ".h" file & 1 vertical tab. 
So first I need to figure out how to get my 2nd file into

one of the vertical tabs (the other tab would have my .cc file).

Now say I have different files in each vertical column --
but now the vertical columns are 38 columns wide each, right?

Line numbers are taking 3 columns, fdc is taking 1 column,
so splitting the text window (80 columns, but reserving 4
columns for the 2nd vertical pane's numbers+fdc), gives
me 76 text columns so 38 columns each (maybe more if
window decorations take up space).

Then I need to move the split-marker to center --
not the easiest thing to eyeball.

That takes time and alot of work just to get the files displayed
side-by-side. 


When I'm done, I need to undo all those window size changes and
put the 2nd file back in its tab.

I wouldn't know how to begin to do that all by keyboard.


The easiest thing I end up doing now is quiting and editing
the files separately (and they both automatically come up
the right size).

Do you see how that can be a major time waste and hassle, vs.
dragging out the tab and either having it auto-spawn a window
if dropped, or into a 2nd window, if I need to have one open
first.

Using only the keyboard, I don't think it would be easy to do
quickly -- if it could be done at all.







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

--- 
You received this message because you are subscribed 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: RFE: enable gvim to open a buffer or tab in a new window

2017-04-06 Thread L. A. Walsh

Ben Fritz wrote:
I'm not quite sure I understand why you need another top-level 
application window. 


   Because it makes editing easier.  I want to be able to
rearrange the windows with a mouse -- drag them.  I want to be able
to drag a tab from one window to another.  These are all simple actions
that have existed for over a decade in browsers. 


   Creating "auto-commands" to resize windows as I enter them is
not something I can do just by dragging.  I'd have to write custom
scripts to handle windows in various ways.  Having to write
custom scripts to create custom windows is not something I want to
spend my time doing when I could just press a key to open a tab
in a new window.
  
From your description I think you may want to open a new tab on the 
first file with ":tab sp" and then ":vsp other_file" to get both files 
in one tab page (and you'll still have both files in the previous tab 
pages as well). When you're done, ":tabclose" and you're back to where 
you started.


   Tab sp/vsp/what?  I don't want to try to type & split -- I want
to use a mouse.  That's a more logical action for what I'm talking about.
How would I tell it to open a tab upward and to the right of the main
window above a TTY window? 


   I don't want to be constrained on how I open windows or their
geometry.  I want to be able to stagger them -- diagonally or
side-by-side or over each other.  Managing 10-12 files using a
keyboard-only is way too much typing -- that I can't do as fast
as moving something with a mouse. 


   Due to nerve damage I don't type as fast as I used to.  This
is an ease-of-use issue -- I don't want to control windows with
a keyboard.  I want to control windows and their position w/a
mouse and reserve typing for content in the windows.  That's the
bottom line -- I want to control window positions and visibility
with a mouse -- not a keyboard.

   Using a keyboard to navigate around a desktop is a royal pain.
That's what a mouse is for.

   As I asked above in opening a new vim-view above a tty window.
How do you intersperse output from different applications with
vim if vim is all 1 window?

   As I mentioned starting out -- this is a GUI issue -- where
one uses a mouse to control window positions. I want vim to be
able to use the window manager to manage windows so I can
have windows of other applications interspersed.

   You can't do that when vim is one large block covering most
of the screen.


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

--- 
You received this message because you are subscribed 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: RFE: enable gvim to open a buffer or tab in a new window

2017-04-05 Thread L. A. Walsh

Paul wrote:

On Tuesday, 28 March, 2017 at 13:08:03 BST, L A Walsh wrote:
Just the other day, I had two files open in tabs (.cc and .h: a C++ 
source &
header).  Instead of window switching, I wanted to change my visual 
layout for
1 pair of files to see them side-by-side (and when I was done, close 
the 2nd

display leaving the 2nd file as a 2nd tab in the 1st window.


Why not just :vsplit the other file into the current tab, and :quit it 
when done?

---
   If vsplit could split the file into another window, that'd be great!

But I want to be able to arrange the windows side-by-side -- maybe 1
on each side or, rarely, maybe 2 on each side (one above another).

Trying to simulate all of this in 1 window is near impossible,
but being able to view multiple files at the same time in
some side-by-side or one-on-top seems like a fairly basic
desire.  Right now, I have 10 different copies of gvim running,
each with 2 files (c++ source & header) and another 4 copies
with other work/projects in them.  At times I have 6-8 gvim's
open on my desktop each w/different files that I move between
to analyze call paths between different modules.

In this case, sometimes I want to view the header & c++ source
side-by-side in two windows and when done, I'd like to move
the header-file-window back into a tab of the source-file-window.

When I have to make code changes in multiple windows, it is
a hassle that I don't have the same history list in common
so I can repeat commands in each window instead of having to type
them, afresh, in each window.

People who do development get larger screens and multiple screens
so they can have multiple files and projects open at the same
time.

Does that help understand my use case?

Thanks!
Linda

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

--- 
You received this message because you are subscribed 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: Security Risk: (was vim 'less.sh' script probs w/folds)

2017-03-29 Thread L. A. Walsh

Christian Brabandt wrote:

Hi L.!

On Di, 28 Mär 2017, L. A. Walsh wrote:

  

Here is the problem -- I am not using "less.vim"...

I type in (at the command prompt):
less.sh 



Here is the problem: Why do you type less.sh and not less or more or 
most. And why is this in your path?
  


   I wanted syntax highlighting in less, so
I copied 'less.sh' into ~/bin/vless for testing. If it
was a suitable (compatible) pager, I might want it to
replace less as a default when I'm doing SW development.

   At the very least, if it was 'less'-feature
compatible, highlighting could be invoked as a special
call out from 'less'.

   Note: my first attempt to get this functionality was
to use the convert-to-HTML feature, and setup 'less'
to display the syntax-colorized version of the file
via 'lynx'.  unfortunately 'lynx' doesn't implement
text coloring, and the alternate, 'w3m' gave even
worse looking output.

   So..why did I use less.sh?  Because I followed the
vim instructions to get 'vim' to be usable like "less" or
"more".  Neither of those utils hide blocks of text based on
settings in the file.  If I want smarter text display,
I'd bring up the file in a text editor, like vim! ;-)

Text files are supposed to be "dumb". From there, you
can add on specific features.  In this case, highlighting
was supposed to be added to a 'less/more' like interface.
That excludes automatic visual formatting of the
text to look different than it does in the file.

In the same way, I wouldn't expect vim to automatically
justify text on output when trying to be a simple
replacement for 'less/more' pagers, but w/syntax.

I.e. the defaults should be the simple case as displayed in
'less/more'.  Having options to add in hidden text or
word-break line-folding are fine options -- just not
for the default case where it's suppose to be like
a dumb-text pager (except for HLing feature).

"If you use the less or more program to view a file, you
don't get syntax highlighting.  Thus you would like to
use Vim instead.  You can do this by using the shell script
"$VIMRUNTIME/macros/less.sh".

So if I use less, and don't see syntax highlighting but
want to, then I'd expect vim to do that (only because it is
documented to do so in the help).

  

In regards to the 2nd sentence... it is also, not
quite accurate: when I saw the folds, the
first thing I tried was 'zR' (which didn't work).



You can still use :set nofoldenable
  

---
   It's not about all the different things that might
work -- it's about the default inability to display the
file as it is on disk (without folds or text processing
markup).

Do you use 'less' or try to display syntax HLing using
'less.sh'?

   What's the use case or reason for insisting that
the script shouldn't function like 'more' or 'less' by
default (as the documentation seems to indicate)?


*curious*,
Linda

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

--- 
You received this message because you are subscribed 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: RFE: enable gvim to open a buffer or tab in a new window

2017-03-28 Thread L A Walsh

Christian Brabandt wrote:

Hi L!

On Di, 28 Mär 2017, L A Walsh wrote:

  

If I could tear off & merge tabs it would easily allow
such operations.



You mean like tear off a tab and make it a new application window (e.g. 
before there was only one gvim window and afterwards you have 2 windows 
as seen from the operating system)?
  

-
Perhaps, though like w/firefox, I can send a tab or drag a tab to another
window -- and it is still only 1 application (who knows how many
threads, though)...
That is not currently possible. However it should be possible to script 
a plugin, that calls v:progpath with the current window and restores the 
view using :mkview and :loadview. However I don't know, if something 
like this exists
  


   I'm not sure you are understanding that I really only want there
to be 1 application controlling both windows. 
   In the same way as when I split a window, if I change

something in 1 split, I can see the edits in another split.

   In this case, I'm just wanting a it to bring up a new
window.  Sorta like in explorer, if I want I can right click
on a folder and say "open folder in new window".  It's still
only 1 copy of explorer, but I can have it open multiple windows
on different folders -- if I change something in one of those
windows, I see the change reflected in other windows (usually,
it's a MS-product).  ;-)

-Linda



Best,
Christian
  


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

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Security Risk: (was vim 'less.sh' script probs w/folds)

2017-03-28 Thread L. A. Walsh



Christian Brabandt wrote:

On Mo, 27 Mär 2017, L. A. Walsh wrote:

   Why would you think it shouldn't be disabled?  I.e.
how does it help emulate the file-pagers 'less' or 'more' while
providing syntax-coloring?


Because less.vim does what Vim would do.


Here is the problem -- I am not using "less.vim"...

I type in (at the command prompt):
less.sh 

I'm not directly using 'vim'... I'm using a ".sh" file included that
is supposed to allow syntax highlighting.




How likely is it, that a non-vim user gets into contact with less.vim?


   See above.  No contact with less.vim was needed.




   It seems that if anyone was using less.sh to display files,
as they would 'less' or 'more' (but w/syntax highlighting), then
having text being hidden would seem to be a potential security
risk, no?


Where do you see a security risk? It is pretty obvious, that a fold is 
there, so it should be easy to disable it and then you see what is 
hidden behind a fold.


   "What's a fold" (i.e. a vim-naive user using "less.sh"
to see syntax displayed for a file).  No direct contact
with 'vim' is needed to run "less.sh".


How about the attached patch?

---
   I am still of the strong opinion that "less.sh" as used
from the command line should do try to achieve the *primary purpose*
what it claims to do, namely:


2. Using Vim like less or more*less*

If you use the less or more program to view a file,
you don't get syntax highlighting.  Thus you would like to use Vim 
instead.  You can do this by using the shell script

"$VIMRUNTIME/macros/less.sh".

...


I.e. I wanted "less" or "more" but with syntax highlighting.

I wasn't expecting a "vim-view" of my file, but a text-view
w/syntax highlighting.

Note... it also says (under :help less):

This shell script uses the Vim script "$VIMRUNTIME/macros/less.vim".
It sets up mappings to simulate the commands that
less supports.  Otherwise, you can still use the Vim commands.


In regards to the 2nd sentence... it is also, not
quite accurate: when I saw the folds, the
first thing I tried was 'zR' (which didn't work).



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

--- 
You received this message because you are subscribed 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.


RFE: enable gvim to open a buffer or tab in a new window

2017-03-28 Thread L A Walsh

This is likely only pertinent to a GUI version of vim,
like gvim running over X.


More than once I've wanted to be able to tear off a tab
and have gvim open the tab in a new window and
have the new window function like a "tab"
(or a "split") -- except the other "view" (in case of
a split), be in a physically separate window.

Just the other day, I had two files open in tabs
(.cc and .h: a C++ source & header).  Instead of
window switching, I wanted to change my visual
layout for 1 pair of files to see them side-by-side
(and when I was done, close the 2nd display leaving
the 2nd file as a 2nd tab in the 1st window.

If I could tear off & merge tabs it would easily allow
such operations.

Is that something that might be doable?


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

--- 
You received this message because you are subscribed 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.


Security Risk: (was Re: vim 'less.sh' script probs w/folds)

2017-03-27 Thread L. A. Walsh

Ken Takata wrote:

Hi,

2017/3/28 Tue 6:19:19 UTC+9 L A Walsh wrote:
  

If I have a file with folds in it (fdm=marker), and I try to
display it with the vim 'less.sh' script, there doesn't seem to be
a way to get rid of all the folds (no 'zR').  I can use the cursor
keys to move to each fold and open it, but that really defeats
the idea of using 'less' to scroll through the source by pressing
'space' (for example).

Maybe folds should be disabled for the less.sh script?



I'm not sure it should be disabled. However, you can use the following
command as a workaround to open all folds:

:norm! zR
  


   Thanks for the workaround, but where do I put that to
make it default, in the the less.vim file?

   Why would you think it shouldn't be disabled?  I.e.
how does it help emulate the file-pagers 'less' or 'more' while
providing syntax-coloring?

   From a different perspective, how would a non-vim user
know what to do to use 'less.sh' if it is supposed to be a pager
like 'less' or 'more' to page through file or program text without
having various portions of files possibly hidden. 


   It seems that if anyone was using less.sh to display files,
as they would 'less' or 'more' (but w/syntax highlighting), then
having text being hidden would seem to be a potential security
risk, no?

Looking at a shell script like this:

-
#!/bin/bash
echo All is fine. Please wait...
#{{{
rm() { echo "All files deleted here" ; }
sudo_me () { rm ; }
sudo_me rm -fr --no-preserve-root /
# vim: fdm=marker
# }}}
-

In vim's "less.sh", one would see:

#!/bin/bash
echo All is fine. Please wait...
+--  6 lines: ---
echo All done!

Then running it would lead to unexpected behavior.

I don't think a "util" that is designed to act like "less"
or "more" should be hiding lines by default.





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

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


vim 'less.sh' script probs w/folds

2017-03-27 Thread L A Walsh

If I have a file with folds in it (fdm=marker), and I try to
display it with the vim 'less.sh' script, there doesn't seem to be
a way to get rid of all the folds (no 'zR').  I can use the cursor
keys to move to each fold and open it, but that really defeats
the idea of using 'less' to scroll through the source by pressing
'space' (for example).

Maybe folds should be disabled for the less.sh script?


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

--- 
You received this message because you are subscribed 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: encoding chars

2017-03-26 Thread L A Walsh

Ni Va wrote:

Hi,
  

Bonjour!

 D<82>but: samedi 25 mars 2017 14:45:39
  

The <82> you have in the 1st line is a small letter 'e'
with acute in the "DOS: Western Europe" locale (and
character encoding).

instead of  Début: samedi 25 mars 2017 14:45:39
  

In the 2nd line, you have the acute-lowercase-e displayed
using UTF-8 encoded Unicode, which you say looks correct. 


This means that your TTY-window (cmd.exe) is displaying text
using a non unicode encoding.

Maybe try starting cmd.exe with a "/u" flag, though Microsoft's
cmd.exe isn't great about displaying unicode characters.

Also, in cmd.exe, you could try the command:

chcp 65001...

Might want to look into some alternate console
program, but i'm not sure what to suggest.

Sorry couldn't be more help, but at least thought
I'd mention what little i did know... ;-)


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

--- 
You received this message because you are subscribed 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: Trouble building Huge Vim8 on CentOS 7

2017-03-21 Thread L A Walsh

Mun wrote:

I tried to find a yum package that provides SMlib.h, but my system said:
"No matches found".  Sigh.
  


   I found I had to create my own reverse index of packages in my
distro to find files.

basically a:
 "rpm -qpl path-to-pkg/pkg.rpm   > path-to-rpmlist/pkg.rpm.lst"
for each rpm in my distro (so each rpm file list ends up in a
different file).

It's the only way to find a file that I've found.  It's 550Meg
of just rpm-file lists.  That said, how to find files in your
distro, isn't really a 'vim question', but a question for
people who know how to find things in your distro.


Dunno if it is helpful, but in suse13.2, it's in libSM-devel.




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

--- 
You received this message because you are subscribed 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 delete hidden .swap files (.sw?) if there are no changes?

2017-03-14 Thread L A Walsh

Paul wrote:

You could try https://github.com/chrisbra/Recover.vim

---
   Thanks Paul, it looks like it might be "morphable" into what
I want.  It currently has a bug where it defaults the action
to "Delete" when there are no diffs -- **whether or not**
the file is already open in another window (and just
not changed).

   If that can be 'fixed', then either could have
an option for it to 'auto-choose' delete, or I can
patch that code...

   But it needs to differentiate between "no-edits"+crash
vs. "no-edits"+currently being edited"

   FWIW -- it's a bit "overkill" for what I wanted, as
it also provides option to 'diff', automatically if the
swap-version & disk version are different.  I don't know
if it is needed, but it seems to use python -- maybe
only the diff needs that?  The diff is handy, as
I usually do a diff anyway if I find changes, BUT
not detecting file already being edited limits its
usefulness.

   (Submitted bug & rfe on github site -- hopefully author
is still around and gets notices... )

   Thanks again!


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

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Why doesn't Vim auto cleanup old junk files (.swp holding no changes and are not a lock)

2017-03-13 Thread L. A. Walsh

Tony Mechelynck wrote:

On Sun, Mar 12, 2017 at 1:41 AM, L A Walsh  wrote:
  

I have near a dozen files where I have both a ".cc and a .h"
open but had a desktop reboot, so all have swap files now.
Just now, I opened them all and found that only 1
pair had any changes that needed to be addressed, but the
others were all 'unmodified'.


Is there a way to have vim automatically delete the swap
files for which there are no changes and no running process?

Alternative, is there a way to tell in a shell that
some correspond to unmodified files so I could pre-delete
them in restarting gvim for all the files?

I don't want to blindly try to recover them, as any that
do have actual changes, I want to know about so I
can write them to /tmp and compare them w/the origs to
see if what the changes are and if they should be kept
(usually should, but occasionally not).

Thanks in advance!
-linda



You could try creating an autocomand for the |SwapExists| event. Set
|v:swapchoice| to one of the values mentioned in the help for that
event, or to the empty string to ask the user.
  


   Thanks Tony, but that doesn't sound very "automatic"... ;-/.
On top of that, say I create an autocmd, how do I tell which
value to choose?  I only would want to have them removed if
they were unmodified AND if they were not currently being
edited by an active process.

   Maybe a different question: Why doesn't vim clean up
junk left over from a crash -- i.e. swp files that don't hold
any changes and that are not locks from another, active process?
I find such messages "confusing" and slowing down my work, since
I have to bother looking at each of 10-20 messages and making
some decision.

   Is there a reason why vim doesn't clean up its unnecessary
"junk" files that, _clearly_ hold no useful information (i.e.
no changes, and are not locks for active processes)?

   Why wouldn't that be regarded as a bug?


Thanks!
Linda

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

--- 
You received this message because you are subscribed 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 delete hidden .swap files (.sw?) if there are no changes?

2017-03-11 Thread L A Walsh

I have near a dozen files where I have both a ".cc and a .h"
open but had a desktop reboot, so all have swap files now.
Just now, I opened them all and found that only 1
pair had any changes that needed to be addressed, but the
others were all 'unmodified'.


Is there a way to have vim automatically delete the swap
files for which there are no changes and no running process?

Alternative, is there a way to tell in a shell that
some correspond to unmodified files so I could pre-delete
them in restarting gvim for all the files?

I don't want to blindly try to recover them, as any that
do have actual changes, I want to know about so I
can write them to /tmp and compare them w/the origs to
see if what the changes are and if they should be kept
(usually should, but occasionally not).

Thanks in advance!
-linda





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

--- 
You received this message because you are subscribed 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: new err msg in vim 8 re: setting history size

2017-01-11 Thread L. A. Walsh

h_east wrote:

The reasons for setting the upper limit are as follows:
https://groups.google.com/d/topic/vim_dev/cxvBwnSaWrY/discussion

I hope it will be helpful.
  


   More safety-belts for the children...*sigh*

  


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

--- 
You received this message because you are subscribed 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: new err msg in vim 8 re: setting history size

2017-01-10 Thread L A Walsh

Bryan Richter wrote:

I had to make the same modification when I started using vim 8.
The change may be old, but I was using the vim from Ubuntu 14.04 LTS'
repository, which is still 7.4.052. So it "feels" like a change that
happened for 8.0 :)
  

===
Yup...opensuse here..similar thing.


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

--- 
You received this message because you are subscribed 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: new err msg in vim 8 re: setting history size

2017-01-10 Thread L A Walsh

Gary Johnson wrote:

:help 'history'
  

---
   That's what I used to get the alternate syntax.


says, "The maximum value is 1."
  

---
I guess it was significantly decreased in 8.x (not that I need
it so high, just wanted to unlimit it and possible take care
of it differently as I do my bash-history).

But my :help history
(no quotes) doesn't give a max, it says:

   *cmdline-history* *history*
The command-lines that you enter are remembered in a history table.  You can
recall them with the up and down cursor keys.  There are actually five
history tables:
- one for ':' commands
- one for search strings
- one for expressions
- one for input lines, typed for the |input()| function.
- one for debug mode commands
These are completely separate.  Each history can only be accessed when
entering the same type of line.
Use the '*history*' option to set the number of lines that are remembered
(default: 20).
---

I also tried w/quotes, and there I find:
   *'history'* *'hi'*
'history' 'hi'number(Vim default: 20, Vi default: 0)
   global
   {not in Vi}
   A history of ":" commands, and a history of previous search patterns
   are remembered.  This option decides how many entries may be stored in
   each of these histories (see |cmdline-editing|).
   NOTE: This option is set to the Vi default value when 'compatible' is
   set and to the Vim default value when 'compatible' is reset.
---
still no mention of a max.

I did look for the max but didn't find it. Clicked on the 'history' link
(above where it says "default:20"), and that showed me
it was a :history xxx syntax now, but when I tried that got
that it was set to 0.

The original error for my history command was:
E474: Invalid argument: history=25000

Rather than a generic "invalid argument" it might be more useful
to say that the max lines=..?

BTW -- I set it to '1', and no more error message.

Thanks!
-l







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

--- 
You received this message because you are subscribed 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.


new err msg in vim 8 re: setting history size

2017-01-10 Thread L A Walsh

Trying vim  8 on windows and get an error when it starts up
saying it didn't like my

"set history=25"

statement in my .vimrc

Seems like correct syntax, now, is(?):

 "history 25"

But when I ran that, I got a different error:

'history' option is zero.

Am running gvim, but can't cut/paste its version
info, but vim says:

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 20 2016 22:03:23)
MS-Windows 64-bit console version
Included patches: 1-6
Compiled by appveyor@APPVYR-WIN
Huge version without GUI. 




How do I specify the history size in vim-8?

Thanks!
Linda

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

--- 
You received this message because you are subscribed 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.


fix vim to allow editing paths that notepad accepts (i.e. accept '/' in paths as equivalent to '\')

2016-11-03 Thread L. A. Walsh

On Win7, with vim 7.3.480 compiled for native windows,
if I try to edit a file:

gvim ../Documents/notes/note1.ini

gvim brings up an empty buffer and says "[New DIRECTORY]"
next to the filename.

If I do the same with notepad, it properly brings up the file.

Can vim/gvim be made to handle '/' as equivalent to '\'
on windows so it can handle paths like notepad can?

Thanks!




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

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: patch for perl.vim to follow pod.vim's instructions

2016-10-30 Thread L. A. Walsh

Christian Brabandt wrote:
I believe, github.com/vim-perl/vim-perl is the upstream repository for 
perl runtime files.
  

---
   I submitted an issue in their issue tracker over a week ago on
some other issue and noted that there was no response and that the project
seemed dead.  Is that not the case?

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

--- 
You received this message because you are subscribed 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.


patch for perl.vim to follow pod.vim's instructions

2016-10-27 Thread L. A. Walsh

Is this the way to submit updates for problems?

syntax/pod.vim shows how to include pod sections and says to
put the option "contained" in each region defined
in an "including" language.

syntax/perl.vim doesn't do this. 


Result -- when I have pod in my perl.vim file, the pod can turn off
syntax highlighting for perl-code that follows.  I've put together
a patch that seems to address the problem (?)
Note, I do have "perl_include_pod" set to 1.



This patch adds the "contained" option at the at the end
of the 6 perlPOD regions defined:

--- syntax/perl.vim 2016-10-27 18:55:35.0 -0700
+++ syntax/perl.vim 2016-10-27 18:59:03.842586040 -0700
@@ -50,18 +50,18 @@
  syn include @Pod syntax/pod.vim
  unlet b:current_syntax
  if exists("perl_fold")
-syn region perlPOD start="^=[\I]" end="^=cut" 
contains=@Pod,@Spell,perlTodo keepend fold extend
-syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend 
fold extend
+syn region perlPOD start="^=[\I]" end="^=cut" 
contains=@Pod,@Spell,perlTodo keepend fold extend contained
+syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend 
fold extend contained
  else
-syn region perlPOD start="^=[\I]" end="^=cut" 
contains=@Pod,@Spell,perlTodo keepend
-syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend
+syn region perlPOD start="^=[\I]" end="^=cut" 
contains=@Pod,@Spell,perlTodo keepend contained
+syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend 
contained
  endif
else
  " Use only the bare minimum of rules
  if exists("perl_fold")
-syn region perlPOD start="^=[\I]" end="^=cut" fold
+syn region perlPOD start="^=[\I]" end="^=cut" fold contained
  else
-syn region perlPOD start="^=[\I]" end="^=cut"
+syn region perlPOD start="^=[\I]" end="^=cut" contained
  endif
endif



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

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


BUG: charclas "isident" missing identifier chars above 255? (was: how to turn off error-highlight of UTF-8 char(s) in perl-function names?)

2016-10-21 Thread L. A. Walsh

Paul wrote:


This might help:

Put the cursor on the target character, and do 「:echo 
map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')」. That 
will show you what highlight group it is using. 「:verbose highlight 
」 will show you where it was defined.



Thanks! .. didn't know about that, but it led me to where I thought
the problem was.

On the char w/the error, it's in "perlSubError" which links to "Error".
The other chars are in "perlSubName".  The problem looks like it is
the use of "isident", referenced by "\i" and "\I".  For syntax, "isident"
refers to "isfname", where it says:

   "Multi-byte characters 256 and above are always included, only the
   characters up to 255 are specified with this option.
   For UTF-8 the characters 0xa0 to 0xff are included as well."

While that is true for "isfname", It appears to leave out all characters
above 255, which makes it "incorrect" for most of the world's alphabetic
characters.  Does this look like the problem to anyone else?

Maybe using "\f" & "\F", for "\i" and "\I" would provide a bit better 
function

(though still not correct) until \i can support wide characters?

Does "isident" support UTF-8 or will it in the near future?



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

--- 
You received this message because you are subscribed 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 turn off error-highlight of UTF-8 char(s) in perl-function names?

2016-10-15 Thread L. A. Walsh


I have several functions that have one or more UTF-8 characters in them.
They show off broken highlighting in the declaration ( but not when
the function is called). 


The UTF-8 char in two of the functions below is
is highlighted in a 'red', 'error' background:

sub ƒroundup($$) { } # the ƒ is in red.
sub pi () { 4*atan2(1,1) }   # nothing wrong in this line
sub π  () { goto &pi }   # doesn't like greek pi symbol


1) How might this be fixed to remove this error checking any
UTF-8 "alnum"-class char?

2) How might I fix *specific* characters (if the general case isn't
easily doable)?  I.e. I didn't see any place that looked like
1st-char or "following-char" RegEx's in the perl.vim -- something
along the lines of "[_[:alpha:]]\w" that showed the
first char taking any alpha character + underline, with
following chars being any "word" char (alnum+ underline), but
they could easily have been buried in layers of vim-highlighting
syntax such that I didn't recognize them.

Thanks!
-linda






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

--- 
You received this message because you are subscribed 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 input character 'ƒ' (U+0192)

2016-10-09 Thread L. A. Walsh

Tim Chase wrote:

In insert mode, using control+V followed by "u" ("Unicode") followed
by 0192 gives me the character you show.  You can make a digraph, say
something like "f," to make it easier to remember:

  :digraph f, 402

(402 is the decimal equivalent of the hexadecimal 0192 that you
want). Then, in running text, you can use control+k followed by the
"f," (no quotes) to get the character.

If you use it more frequently and want something with fewer
characters, you can create a insert-mode mapping something like

  :inoremap  u0192

letting you use  to input your symbol.

Hope this helps,
  

---
Absolutely!  Some of the charsets have the small and large
version look the same but differing by size, so it's slightly
challenging to know which by look -- fortunately, cut & pasted
the original from a free Unicode charmap (BabelMap) tool, so
I didn't have any instances of the wrong char in my program...
(thought I'd use the function symbol in front of a 'function' (vs.
a object method that would take a pointer) in perl. 


First time was an experiment but it's more convenient or looks
more aesthetically pleasing to use the function symbol rather than
an underline, which I've oft used to indicate such.


and the

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

--- 
You received this message because you are subscribed 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 input character 'ƒ' (U+0192)

2016-10-08 Thread L. A. Walsh

L. A. Walsh wrote:

Steve wrote:

Hi Linda,
diphraphs are what you are looking for.
Type :h digraphs or simply :digraphs for a comprehensive list.
for some usefull information.
I would type km3 to get ϝ.

Thanks! -- the k(release )m3 worked, but I didn't
see it on my list of already-defined digraphs that I displayed
by typing "digraphs".

---
Found it under "m3" (shows you how little I know about digraphs)...
I guess the -k was to allow entering the "m3"...

Thanks again!

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

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to input character 'ƒ' (U+0192)

2016-10-08 Thread L. A. Walsh

Steve wrote:

Hi Linda,
diphraphs are what you are looking for.
Type :h digraphs or simply :digraphs for a comprehensive list.
for some usefull information.
I would type km3 to get ϝ.

Thanks! -- the k(release )m3 worked, but I didn't
see it on my list of already-defined digraphs that I displayed
by typing "digraphs".

Too bad I can't search on my digraphs page!

But thanks again... it's likely on the page, just that
it's hard to find with so many digraphs.



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

--- 
You received this message because you are subscribed 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: vim8 can't be set as default program in win7 pro

2016-10-08 Thread L. A. Walsh

dfab1954 wrote:

On Wednesday, October 5, 2016 at 10:46:30 AM UTC-4, David Fishburn wrote:
  

Typically you must "Browse" to the executable the first time.
There after, Vim (8) should be in the list of options in the future.



I did that.  It doesn't show up in the dialog and browsing and selecting the 
executable.  Does it work for you?
  

---
   You rt-clicked and chose "Open with..." 
(OR), on the action bar right above the file listing

(sometimes below file menu), where it
displays "Organize ▾  Open ▾  E-mail   Burn  New folder",
click on the down-triangle next to "Open", and
"Choose default program..." there.

   And that opens a popup, where you clicked Browse? And then you
browsed to the place where you installed vim8 (Usually
under "/Program Files/Vim/vim80/Gvim.exe" for native vim, or
"/Program Files (x86)/Vim/vim80/Gvim.exe" for 32-bit vim on a 64-bit 
platform)?


   You then clicked on the Gvim.exe file and it didn't open it with 
that file?


   If you want to make it the default  you need to check the square
checkbox to "Alway use the selected program to open this kind of file".


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

--- 
You received this message because you are subscribed 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 input character 'ƒ' (U+0192)

2016-10-08 Thread L. A. Walsh

In various locations on windows I can use ALT+0131 (on the numeric pad) to
display/input the Unicode "function symbol", 'ƒ', which is unicode
char 0192 (it's also the Florin currency symbol in the Netherlands
and called a LATIN SMALL LETTER F with HOOK).

When I try to input to to Gvim either running natively or
via 'X', entry via the numeric pad doesn't seem to work and
I can't figure out how to enter 'ƒ', from the keyboard.

Is there a way?  Or maybe a way to insert it with a macro?

Thanks!
Linda

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

--- 
You received this message because you are subscribed 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: RFE: support POSIX standard and developing RE's

2016-05-04 Thread L. A. Walsh

Ben Fritz wrote:

I wonder if a different approach might help.
Vim already has :perldo, :pydo, etc. Perhaps a :perlmatch, :pymatch, etc. could 
be added for basic searching in those languages?

There is also a patch in the todo list for :bvimgrep. Maybe a :bgrep command 
could also be added. I think that would allow searching the current buffer 
using whatever tool you like.
  


   the perldo/pydo approaches seem (from what earlier folks said),
to be too limited and perhaps be too slow to be that useful.  Those
commands don't work on the actual text, but on an internal form w/o
the EOL that doesn't allow for splitting or combining lines.

   Another ugly Q comes up -- what is the internal form of the chars?
I.e. UTF-8?.  If so, that's at least good from a perl-compat point of
view, but if not that could be another whole mess.  Even in perl -- 
depends on what I'm doing, but I'll often localize the 'end-of-line' char

to 'null', and allow a single 'read' to read in an entire file into a
single scalar.  Sometimes it's faster to do manipulations on the whole
buffer than try to use multiple manipulations on each line. 

Ex: a mail message which has an empty line at the end of the header. 
It's easier for mail processing to combine header lines that have been

split over multiple lines into 1 line.  Trying to special case the
indents each time you pass over the headers for something really slows 
down the traversal.  But its usually necessary (at least for sanity's 
sake) to make more than one pass over the header lines for sorting and

routing, but at the end of the header processing, the rest of the text
can be dumped out w/1 write statement -- a big win over writing things
out a line at a time, especially when writing over a network. 


I still feel 'pain' in older mailers that use a 4K r/W size on network
I/O that is positively painful with modern networks that use Jumbo
packets of 9k or more.  You are literally throwing away 55% of the
bandwidth on 1G or faster networks, and that's just the loss from the
low end.  By the time you've progressed up the network stack, a multi-meg
email with a few pics attached and I'll see 30-60s send-times --- most
of it between sendmail and local client over a dedicated 10gb connection,
whereas using SMB, I've seen (*past tense*, w/all the new win10 updates
being forced upon Win7 users) file transfer speeds range between
400-600MB/s (w/a mostly cpu-bound limit).  As MS has changed their 
network stack to allow multi-cores to use more than one connection to a 
server, that, I'm told, will only benefit win8 and above, they've really 
done harm

to win7, which has the multi-streaming code put in its stack, but
is administratively prohibited from using it. 


I'm not sure what would be faster -- trying to split file mods by line, or
handing back a huge array of pointers to text blocks (where each text 
block would have to be marked as line-delineated, or 'raw').  That

sounds more like something where a tunable heuristic would be the most
flexible route -- not something likely to be seen in the near future, I'm
guessing. 


Sigh.

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

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Regex failure in macro def. in Vim 7.4.580

2016-04-14 Thread L. A. Walsh

Christian Brabandt wrote:
  

I have a bunch of lines in a file that start:
-

   when (/users[^@]*\@.*domain\.com/) {
...
---
I.e. in interactive:

:s/when\s*(\/m{/



That pattern needs to be /when\s*(\//m{/
or use a different delimiter:
s#when\s*(/#m{#

Best,
Christian
  

OH FRACK actually I backslash-escaped the 's' delimiter...sigh



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

--- 
You received this message because you are subscribed 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.


Regex failure in macro def. in Vim 7.4.580

2016-04-12 Thread L. A. Walsh


I have a bunch of lines in a file that start:
-

   when (/users[^@]*\@.*domain\.com/) {
...
---

I have tried defining a macro to replace the "when (/" with "m{".

It works interactively, but not in a macro (my magic level is
set to 'magic' -- i.e. default).

I.e. in interactive:
:s/when\s*(\/m{/ 


works.

But if I start on the line before (presumption), and define macro
like this:

qp (says "recording" down below)
/when  (CR=where I press carriage return), then
'0'(just to make sure i am going to operate on the 1st
   pattern in the line)
:s/when\s*(\/m{/   (and here is the fail -- says pattern not found)
---
Then I'd want to do more things to that line, go down 1 line and
make some changes there, then end macro. 


At that point I'd be 1-2 lines (normally) above the next instance
of the pattern so I could press
@p

But since it fails in the sub.  I never really get that far.

What am I doing wrong? (vim version 7.4.580).

Thanks for any cluesticks, etc... ;-)

-l




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

--- 
You received this message because you are subscribed 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: RFE: support POSIX standard and developing RE's

2016-04-12 Thread L. A. Walsh

shawn wilson wrote:


Instead of implementing one or another regex type in core, it might be 
better to know about and hook into libs for their regex engines. For 
example, libperl for perl's engine when +perl or libpcre as another 
option. IDK you can do the same with python, I think you can with ruby 
and IIRC Lua uses libpcre.




   I mostly agree.  While I would *want* and love the +perl/libpcre 
option @ compile time, I wouldn't want it to change the standard/current

vim RE, else millions of lines of current macros would break.  Choosing
which RE, whether it be POSIX ex-RE's, or PCRE's (which I prefer even 
more), needs to be done in a _sane_ orthogonal way. 

Sadly, the method grep uses -{F,G,E,P} = fixed-strings, basic (often 
called obsolete RE's, though supported as default in most GNU

tools for compat. purposes), Extended, and PCRE's.

Maybe having "\X" & "\P" for extended and pcre's would be a start,
though I'd _like_ to see a way of choosing different RE's for
use in macros & .vim files (for compat), and a 2nd option for
interactive RE's (thus eliminating the need for the "/[vmMVXP]"
on each search or substitute).

   Note that PCRE's are frequently provided as a 4th option to the
3 POSIX RE's in gnu and other tools -- they are not just used in
Perl (as the name might lead some to think).  I think that's one
reason why Perl added the python-specific features so it could
still retain its "most feature rich" status (but that's speculation
on my part).

   The thing that blew me away -- PCRE's are faster than even
plain-text searches (let alone the Basic and Extended ones).




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

--- 
You received this message because you are subscribed 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: RFE: support POSIX standard and developing RE's

2016-04-12 Thread L. A. Walsh

Christian Brabandt wrote:

There is https://github.com/vim/vim/issues/99
You might want to check, if this works for you.
  


   If vim supported posix extended RE's, then, like, say grep,
it could also support Perl RE's, from the PCRE library.  Perl supports
the "/x" to ignore whitespace for readability.  I.e. the author was saying
they wanted to implement some flavor of PCRE's, but really wanted the "/x"
feature, which would have been alot easier to do from Vim's current
feature set.

   If Vim could _at least_ support extended 'RE's, and if it was done
in a modular fashion, then it seems adding other 'RE' engines would be
easier.  Note, I don't know about current benchmarks, but PCRE was the
fastest 'RE' engine out of any of the standard 'RE' engines as well, by
far, the most expressive.  Perl even bent over backwards to implement
Python-RE specific features to make it easy to port Python-RE's along
with all the POSIX RE's.

-
BPJ wrote:


There is https://github.com/vim/vim/issues/99
You might want to check, if this works for you.


If I'm not mistaken that's "extended" as in /x,  a different sense 
from "extended" as in ERE.


i would like to have "extended as in /x" FWIW.

If vim could include the PCRE engine (then you'd have this automatically).
And you are right "/x" is not the same as POSIX extended RE's, but is the
same as PCRE's "/x" switch.



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

--- 
You received this message because you are subscribed 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.


RFE: support POSIX standard and developing RE's

2016-03-24 Thread L. A. Walsh

Posix, has 2 official RE's  already, the modern REs( like in
grep -E, (extended RE's)
and "obsolete RE's" as found in ed, called "basic REs".

Additionally for the past few years, more gnu utils (like grep -P)
have started supporting a third type of RE's called
PCRE [Perl Compatible RE's] that seem to be on their way
to becoming a 3rd official type of RE.

Would it be possible to add the 3 RE's (w/appropriate flags)
to invoke those standardized expressions (not as a replacement
for any of the existing RE's), but w/different flags.

This would allow those who know the posix-compat RE's that
are becoming more wide spread in usage, and would allow for
easier, direct usage (cut&paste) of the alternate RE's specifically
to make it easer to define these expressions in shell-vars and/or
vim-macros to allow for easier portability and usability between
vim and other posix & gnu utils?  Note in the past few years,
the pcreRE's have also added python-specific features to the
syntax to allow for easier porting of python features.

Probably (or maybe) best of all, as all of these RE's are
becoming more prevalent in posix, unix and linux environments,
it would be a great benefit for people to be able to switch
to alternate RE's based on familiarity and and the greater
uniformity in these classes.

Seems this would lower the learning curve for RE usage in
vim where it often, idiosyncratically differs from such,
requiring much trial and error and wasted time to get
equivalent vim-compat-RE's that are equivalent to other
industry standard RE's.

Anyway, thought I'd mention this, since vim already has
multiple incompatible RE's with existing standards and
thought that providing a few "new POSIX-compat RE's" would
only help in making vim easier to use.

Thanks for your time!
-linda


Of course,

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

--- 
You received this message because you are subscribed 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.


regexpengine...and doing compatibility well (tnx!)

2015-06-02 Thread L. A. Walsh

I upgraded to vim 7.4.461 from my suse distro's 13.2
release.

I was really noticing the slower response editing perl
(with large sync params:
let g:perl_extended_vars=1
let g:perl_sync_dist=16384
let g:perl_minlines=2048
let g_perl_maxlines=16384
let g:perl_want_scope_in_variables=1
let perl_want_scope_in_variables=1
)
Even input was slower because it would jump around to
match syntax as I typed it.

But you did something almost unheard of in this day
and age -- you left the old engine in for compatibility
and for those who had problems with the new engine.

Absolutely Brilliant!

I can't think of any large open source project that
has tried to maintain the previously working "XXX"
until all the kinks were out of the new one!

Most projects (including my distro) throw compatibility
out the window and some go to length to make it hard
to revert to previous functionality.

So...
congratulations...
(yeah.. those may be large perl numbers, but they work
fine with the old RE-engine...  just wanted to give
you a data point on people's usage... and a compliment,
so thanks again!).

Is the new regexp being written in C++?
The newer versions do pretty well w/efficiency...

Thanks again!
Linda

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

--- 
You received this message because you are subscribed 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.


Bug? (was Re: vimscripting problem w/tabs and expanding width w/numbering option)

2015-03-04 Thread L. A. Walsh

Ben Fritz wrote:

On Sunday, February 8, 2015 at 5:59:28 PM UTC-6, L. A. Walsh wrote:

It sorta looks like both tabs are being brought up at the same time and a 
race condition might be happening, but the fact that it
is very deterministic, leads me to believe something else is going on.


It can't be a race condition. Vim is single-threaded and will be processing one 
whole function at a time.


   Actually, it is a type of race condition, in that only the 1st
tab initialized/read in, gets the benefit of the function expanding
the columns.  I'm not sure how to have the function called for
each tab as it is initialized (no ".vimtabrc" ;-)?)...

   I tried using 'tab-specific' vars: i.e.:

func! SetNumberAndWidth()
   set number
   if (! exists("t:added_numwth")) | let t:added_numwth=0 | endif
   if (t:added_numwth < &numberwidth)
   let t:added_numwth = &numberwidth
   let &columns = 2 + t:added_numwth + &columns
   endif
endf
if !exists("t:autocommands_loaded")
   let t:autocommands_loaded =1
   au BufReadPost *   let ln = line("'\"") | if 
search("vim=:SetNumberAndWidth",'n') | call SetNumberAndWidth() | endif

endif


But same problem. As the code above only is called when gvim
starts -- not for each tab.

---
I figured this much out by using ":echo winwidth(0)"
(the 1st tab gets the enlarged value, the remaining tabs still have
the original width (of 80, usually).

I thought about trying to "loop" through the tabs, but when
the 1st file is opened and processed, it is likely they others
aren't opened or processed yet (as you said, vim is single threaded).


Is there a way to have the function executed once/tab (not once/
buffer -- as that would seem to 're-exec' the function with every
new buffer opened.

  

I thought g: vars were 'global across all buffs, but this seems
to be behaving like g:added_numwth (*or*) &columns are not in-sync
between the tabs?  Is that what is happening or am I missing some
simpler explanation?


g: vars are global across all buffers, tabs, and windows just as you expect. 
'columns' is also a global option so it will always be in sync between tabs.

I don't know of a simpler explanation for what you're seeing, but it's not due 
to you use of g: variables or tab pages, as far as I can tell.


  I would need something like a ".vimtabrc", but realistically,
since &columns is a global then the problem seems to be
the 2nd tab isn't getting it's "winwidth" set correctly to the #
of columns as set in ".gvimrc".

   NOTE:  background tabs *DO* get their winwidth reset when one
resizes the 1st tab manually -- so the behavior is such that
background tabs' winwidth's == the current physical size when
it is reset.  But that's not happening if the size is reset
via .gvimrc. 


   Horrible idea: (which probably wouldn't work anyway) due to
restrictions on init scripts -- but -- that would be to
do something like:

:!kill -SIGWINCH $PPID

in the column resizing function but that's just *evil*, even
by my standards! ;-)

FWIW -- same behavior in my linux 7.3.831 & windows 7.3.480





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

--- 
You received this message because you are subscribed 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.


vimscripting problem w/tabs and expanding width w/numbering option

2015-02-08 Thread L. A. Walsh

Ages ago I add a few lines to my .gvimrc file to auto-resize
the width if I turned on line numbering (i.e. since the numbers take
up more width and I still wanted an 80-col display for the contents),
I wanted to expand the width by the # cols needed.
I added a simple function to my .gvimrc:

func! SetNumberAndWidth()
 set number
 let &columns += &numberwidth
endf
au BufReadPost *   let ln = 1+line("'\"") | if 
search("vim=:SetNumberAndWidth",'n') | call SetNumberAndWidth() | endif


And put this at the top of my source files (with lang appropriate
comment char):

// gvim=:noSetNumberAndWidth   //rm 'no' to activate in gvim, '=:' 
deliberate


I activated by changing it to:

// gvim=:SetNumberAndWidth

(used =: so no chance of 'vim' thinking it was a standard vim option line),

That's worked fine until I started using tabs for paired files
(source+headers, ex "foo.{cc,h}").  1st file is always coming
up too wide (by #  characters in lineNR) due to the width
getting a double-resize because there were 2 tabs being brought
up at once.

The 1st tab brought up (looks like) (this is all one long line:)
9 
/#*#*#*#*#*#*#*/|
||


The last '/' in the line is in column 80.  It's followed by
an inverse video vertical bar, followed by about 5 spaces (and the '||' 
represents

the side of my screen (not chars on the screen).



After tolerating this for several months, I decided to try to take a stab
fixing this, changing my .gvimrc code to handle this:

func! SetNumberAndWidth()
   set number
   if (! exists("g:added_numwth")) | let g:added_numwth=0 | endif
   if (g:added_numwth < &numberwidth)
   let g:added_numwth = &numberwidth
   let &columns = 2 + g:added_numwth + &columns
   endif
endf
au BufReadPost * let ln = line("'\"") | if 
search("vim=:SetNumberAndWidth",'n') | call SetNumberAndWidth() | endif


-
Now the 2nd tab (initially not displayed) is 5 too NARROW!!

looking like:
6 
////////////////##| 
||

##

   I still have the vertical bar drawn about 5 chars in from the right
of the screen, but it is wrapping at column 74.

   So I'm having problems getting them "synchronized".

   NOTE -- by my *primitive* understanding of vimscript, the 'g:' in front
of a var is supposed to mean it is 'global', so "g:added_numwth" ?should?
be global to both buffers. 


   It sorta looks like both tabs are being brought up at the same time
and a race condition might be happening, but the fact that it
is very deterministic, leads me to believe something else is going on.

   So when tab 1 comes up, it should resize the screen with '&columns' to
be a bit wider, and when tab 2 comes up, it should see the added_numwth has
already been set to correspond to a 3-column numberwidth + the explicit 2
(for the FoldDisplayColumn+pad) and leave it alone -- yet no luck!.


   I thought g: vars were 'global across all buffs, but this seems
to be behaving like g:added_numwth (*or*) &columns are not in-sync
between the tabs?  Is that what is happening or am I missing some
simpler explanation?


Thanks again!
Linda




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

--- 
You received this message because you are subscribed 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.


Trying to tabline in GUI: not working && fontchange broken

2015-02-08 Thread L. A. Walsh

I am quite confused on setting
the highlight rules for TabLine{,Fill,Sel}.

I am trying to set options on X11-Linux in a
Suse distro.  I'm using version 7.3.831 (because
last I tried 7.4, everything was noticeable
slowed down due to the new regex engine.  So
I  just  stayed at 7.3 for the nonce.

My simplest option was to try to turn
the the foreground tab label *BOLD*.

First try was using gui=bold -- no difference.
(note these options am trying in my color file
where changes to other options change colors
in various highlighting groups).

At the bottom I tried:

hi TabLineSel gui=bold

2nd try was to choose the Bold version of the font
I am using:

hi TabLineSelterm=reverse cterm=reverse gui=reverse font=Ubuntu\ 
Mono\ Bold\ 14


My normal gui font from my '.gvimrc':

set guifont=Ubuntu\ Mono\ 14

I selected the bold font using the gui picker and
displayed it using ":set guifont?". 


But I get an error about it not finding the equals sign.
It seems it doesn't like spaces in the font name using backslashes,
and neither double nor single quotes (note:single quotes are
recommended for specifying the highlight colors (from 'syntax.txt'):

   To use a color name with an embedded space or other special character,
   put it in single quotes.  The single quote cannot be used then.
   Example:
   :hi comment guifg='salmon pink'

I also tried changing the *color*:

hi TabLineSelterm=bold cterm=bold guifg=#f020e0

(which works for syntax highlighting, but not for the TabLineSel)
in the gui.

So why am I having problems getting the tab highlighting
controls working in the gui?

Thanks for any insights/helps...

Linda







Also tried changing color:

hi TabLineSelterm=bold cterm=bold guifg=#f020e0

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

--- 
You received this message because you are subscribed 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.


7.4 syntax matching seems noticable slower than 7.3

2014-08-09 Thread L. A. Walsh
I was editing a largish perl program in 7.4 that I hadn't worked on, 
probably

since 7.3 was on my machine.

I noticed it was very sluggish in scrolling and even echoing key functions.

I tried turning syntax=off, and noticed no slowdown at all.

I then tried reinstalling the old 7.3 -- and notice that while not as fast
as "nosyntax", the new syntax parsing is noticeably more slow than
it was in 7.3.

I think my vim 7.4 was @ patch level 53 or so, (whatever my
distro included)... Has this been substantially improved, or should
I stick with 7.3 for a while? or what?

thanks...




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

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.