Re: Why does "" sometimes get inserted in the text?

2007-03-31 Thread John Wiersba
No, this is a sporadic thing.  The weird thing is that vim is obviously 
recognizing that I hit the F2 key (since it inserts ) but it isn't 
performing the action that's associated with F2.

- Original Message 
From: John Little <[EMAIL PROTECTED]>
To: vim@vim.org
Sent: Saturday, March 31, 2007 4:40:17 AM
Subject: Re: Why does "" sometimes get inserted in the text?

John Wiersba wrote:
> When I press F2, rather than doing the action associated with F2?  Sometimes 
> when this >happens, it will happen again, but often it won't repeat for a 
> while.

It sounds like you have the mapping defined in normal mode, with :map,
but not in insert mode, with :map!.  Often with Vim one needs two
mappings; for example, I use

map  :noh
map!:noh

to turn off search highlighting till the next search.  Note that the
:map! version has to leave insert mode temporarily; that's why they're
separate.  vi was like this.

Apologies if I'm off the mark.

John





 

TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/


What does it mean when the screen needs to be refreshed a lot? (cygwin)

2007-03-30 Thread John Wiersba
When scrolling around, I frequently need to refresh the screen to clear up 
fragments of different parts of the screen which get left in the wrong place on 
the display.  What does this mean and how can I correct it?  This happens when 
running vim under cygwin with TERM=cygwin.




 

Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367


Why does "" sometimes get inserted in the text?

2007-03-30 Thread John Wiersba
When I press F2, rather than doing the action associated with F2?  Sometimes 
when this happens, it will happen again, but often it won't repeat for a while.




 

8:00? 8:25? 8:40? Find a flick in no time 
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news


Re: Fw: Case-sensitive :e globbing under cygwin?

2007-03-16 Thread John Wiersba
Michael,

Thanks for your reply.  You're right -- disabling the CASE_INSENSITIVE_FILENAME 
compile-time option changes this behavior.  However, I disagree that case 
insensitivity is the correct behavior.  Cygwin is perfectly capable of 
supporting case-sensitive globbing behavior and unix tools, by default, do just 
that when run under cygwin.  For example, bash is, by default, case-sensitive 
under cygwin.  So, I submitted a bug report.

-- John

- Original Message 
From: Michael Schaap <[EMAIL PROTECTED]>
To: A.J.Mechelynck <[EMAIL PROTECTED]>
Cc: John Wiersba <[EMAIL PROTECTED]>; Vim mailing list 
Sent: Friday, March 16, 2007 4:21:01 PM
Subject: Re: Fw: Case-sensitive :e globbing under cygwin?

On 16-Mar-2007 20:59, A.J.Mechelynck wrote:
>
>>
>> As far as I can tell everything is set up to give case-sensitive 
>> globbing. Bash does case-sensitive globbing at the command line and 
>> in a simple script
>>
>> #!/bin/bash
>> echo file*
>>
>> Do you believe vim is shelling out to do globbing under cygwin, 
>> rather than doing globbing internally? I tried to verify that vim is 
>> calling /bin/sh by replacing /bin/sh.exe with a script /bin/sh which 
>> leaves a debugging trail. But it appears that /bin/sh is not being 
>> called for :e file* (it is called for :sh, however).
>
> I had the impression it did; but I guess I was wrong.
>
Indeed, vim does its own globbing; it looks like the main function for 
this is ExpandOne() in ex_getln.c.
It determines whether to do based on whether CASE_INSENSITIVE_FILENAME 
is #define'd. For Cygwin, this is done in os_unix.h:

#if defined(__CYGWIN__) || defined(__CYGWIN32__)
# define WIN32UNIX /* Compiling for Win32 using Unix files. */
# define BINARY_FILE_IO

# define CASE_INSENSITIVE_FILENAME
# define USE_FNAME_CASE /* Fix filename case differences. */
#endif

Like it or not, this is the proper thing to do on Cygwin, since any 
normal Windows file systems are case insensitive.
Arguably, this should be a file system property, not an operating system 
property – after all, you can mount a case-insensitive Windows file 
system under Linux. But I doubt that there is a good way to determine 
this on a file system by file system basis...

It would perhaps be an improvement if this was an option, instead of a 
compile-time decision. But there's an awful lot of "#ifdef 
CASE_INSENSITIVE_FILENAME"'s in the code, so that's probably a rather 
non-trivial change...

– Michael





 

It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/


Re: How does vim do filename globbing (as in :e file*)

2007-03-14 Thread John Wiersba
Yes, there is such a setting.  From the related thread "Case-sensitive match 
for :e under cygwin?":

For comparison, bash has a nocaseglob option which, if set, matches 
filenames in a case-insensitive fashion when performing pathname
expansion. 

- Original Message 
From: A.J.Mechelynck <[EMAIL PROTECTED]>
To: John Wiersba <[EMAIL PROTECTED]>
Cc: vim@vim.org
Sent: Wednesday, March 14, 2007 1:33:56 PM
Subject: Re: How does vim do filename globbing (as in :e file*)

This is a Unix-like Vim for Cygwin, which requires POSIX paths (as opposed to 
Dos-like paths) and needs the cygwin1.dll. I /think/ that such a Vim version 
will do all of its file-globbing with the exception of ** by "subcontracting" 
it to some Unix shell such as bash. I'm not 100% sure of that and I don't 
remember where I think I saw it.

This leads me to a question: isn't there a setting in Cygwin bash to set 
whether you want case-sensitive or case-insensitive matching and globbing on 
the underlying vfat or NTFS filesystem?


Best regards,
Tony.
-- 
Remember that whatever misfortune may be your lot, it could only be
worse in Cleveland.
-- National Lampoon, "Deteriorata"





 

Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367


How does vim do filename globbing (as in :e file*)

2007-03-14 Thread John Wiersba
In particular, how does it handle case-sensitivity when globbing for files 
under cygwin.  This question is related to another thread "Case-sensitive match 
for :e under cygwin?".  I believe vim/cygwin used to do case-sensitve filename 
globbing, but now it's doing it case-insensitively and I'd like to get it to 
revert to the old behavior.

:version
VIM - Vi IMproved 7.0 (2006 May 7, compiled Oct 10 2006 10:07:11)
Included patches: 1-122
Compiled by
 [EMAIL PROTECTED]
Huge version without GUI.  Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist
 +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
+mksession +modify_fname +mouse -mouseshape +mouse_dec -mouse_gpm
-mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme
-netbeans_intg -osfiletype +path_extra -perl +postscript +printer +profile
-python +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent
-sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static
-tag_any_white -tcl +terminfo
 +termresponse +textobjects +title -toolbar
+user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
+wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
-xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
 user vimrc file: "$HOME/.vimrc"
  user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2
Linking:
gcc   -L/usr/local/lib -o vim.exe   -lncurses  -liconv -lintl




 

8:00? 8:25? 8:40? Find a flick in no time 
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news


Re: Case-sensitive match for :e under cygwin?

2007-03-14 Thread John Wiersba
I'm not positive how vim is globbing for files.  If it does its own internal 
globbing, then there must be a switch for case-sensitive globbing, at least in 
the C code.  Probably turned off when it detects it's running on Windows.  
However, since this is a cygwin version, it shouldn't do that, since cygwin 
supports case-sensitive filenames (in a sort of hybrid way).  

I'm hoping that this internal switch exists and is exposed in some way (during 
compilation of vim or during runtime) so that I can turn off this behavior.  I 
believe that older versions of vim complied under cygwin did NOT have this 
behavior, because I never noticed it until now when I just recently updated by 
cygwin software which was a year (or more?) old.

- Original Message 
From: fREW <[EMAIL PROTECTED]>
To: John Wiersba <[EMAIL PROTECTED]>
Cc: vim@vim.org
Sent: Tuesday, March 13, 2007 11:54:49 PM
Subject: Re: Case-sensitive match for :e under cygwin?

I hope I am not speaking prematurely here, but I really think that
this has more to do with the underlying Windows Filesystem stuff.  As
you probably know the files in windows are NOT case sensitive and I
think that vim is probably using some form of Filesystem globbing,
which would find both file1 and FILE2.

On the other hand I remember reading about a cygwin feature that would
allow you to have funky filenames not supported by windows in a cygwin
"partition"  (just escapes in the filenames really) that might change
things.

This is where I read about the cygwin filename stuff:
http://gentoo-wiki.com/HOWTO_Gentoo_on_Cygwin#.22Managed.22_mounts

I hope that helps!

-fREW

-- 
-fREW





 

The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php


Case-sensitive match for :e under cygwin?

2007-03-13 Thread John Wiersba

When I use 
   :e file* 
under cygwin (a Unix emulator running on
Windows), I get an error saying "E77: Too many filenames".  But in fact
there is only one such file.  However, there are other files matching
FILE*.  How can I turn off this behavior so that vim under cygwin performs
case-sensitive globbing?  I've searched the vim help pages but can't
seem to find it, if it exists.  For comparison, bash has a nocaseglob
option which, if set, matches  filenames in a case-insensitive fashion
when performing pathname expansion.  

P.S.  Thanks for vim!  Like thousands of other people, I use it everywhere: 
unix, windows, cygwin.

:version
VIM - Vi IMproved 7.0 (2006 May 7, compiled Oct 10 2006 10:07:11)
Included patches: 1-122
Compiled by
 [EMAIL PROTECTED]
Huge version without GUI.  Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist
 +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
+mksession +modify_fname +mouse -mouseshape +mouse_dec -mouse_gpm
-mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme
-netbeans_intg -osfiletype +path_extra -perl +postscript +printer +profile
-python +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent
-sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static
-tag_any_white -tcl +terminfo
 +termresponse +textobjects +title -toolbar
+user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
+wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
-xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
 user vimrc file: "$HOME/.vimrc"
  user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2
Linking:
gcc   -L/usr/local/lib -o vim.exe   -lncurses  -liconv -lintl



 

We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265