Re: Silly Question

2007-04-11 Thread Phil Edwards

On 4/11/07, Gene Kwiecinski [EMAIL PROTECTED] wrote:

What's the most interesting name anyone can find, and also the most
damaging?

I think my friend :1,$d would win that particular contest...


I was going to make a joke about my middle name being :!chmod -R 0 /
and causing confusion as a child, but I see I'm too late.  :-)


Re: Pasting into gvim from word: ' turns into ¿

2007-02-09 Thread Phil Edwards

On 2/9/07, ben lieb [EMAIL PROTECTED] wrote:

Some characters don't transfer properly. Most annoyingly is that a
single quote ( ' ) turns into this: ¿


That's not actually a single quote; what you're seeing is Word's
smart quote feature, which tries to do begin- and end-quotes.  Like
`` and '' in TeX do, except outside the range of ASCII.

If you want to preserve the funky character and display it properly,
you need to make sure that your Vim is set up to use Unicode fonts.

If you want to throw out the funky character and use an actual single
quote, then you might have to do some kind of conversion in the paste
buffer.  I don't know exactly how those are implemented.


Re: Using (g)vim without installing it

2007-02-06 Thread Phil Edwards

On 2/6/07, Eric Leenman [EMAIL PROTECTED] wrote:

Preference 1:
To copy and paste a (g)vim.exe file without the need to install it, or
administrator rights.
If this is possible, how to do this?


Should work just fine, although you'll also need to be aware of other
files like _vimrc, _gvimrc, syntax files, etc.  Setting $VIM
appropriately should suffice.



And if to re-compile vim how do you this.


This is a lot more work than what you might think.



Preference 2:
Is it possible to install gvim on a usb-stick.


Sure.  Do all your installation at home onto the stick, including the
runtime files and everything else.  At work, just set $VIM to point to
the stick.


Clearing undo history after a file write

2007-02-05 Thread Phil Edwards

After writing out a file, I would (sometimes, not always) like to
prevent 'u' from undoing past the :w into old changes, e.g.,

- change #1
- change #2
- :w
- change #3
- change #4
- 'u' undoes #4 and then #3, but then stops

This seems like such a simple thing, but to my surprise it's less
trivial than I thought it would be.

The only thing in :help undo and its related tags which seems to be
relevant is the undolevels variable.  So maybe something like

- copy undolevels into some temp variable  // I don't remember the
let syntax offhand
- set undolevels=-1
- set undolevels=temp_holding_variable

would work?  A value of -1 disables undo altogether, so would this
sequence kill the history and start it from scratch?


-phil


Re: Clearing undo history after a file write

2007-02-05 Thread Phil Edwards

On 2/5/07, Max Dyckhoff [EMAIL PROTECTED] wrote:

The easiest thing to do would probably just to do :e after your :w. :e will 
re-read the file, wiping the undo buffer.



Ah, didn't know about that side effect.  I knew there had to be an
easier solution.  :-)  Thanks!


phil


Re: modeline error

2007-02-01 Thread Phil Edwards

On 2/1/07, Tim Chase [EMAIL PROTECTED] wrote:

It looks like what you want is a custom filetype for your
particular vera filetype.  You can learn more about creating
your own custom file types than any sane person should want to
know by reading

:help new-filetype


I can testify that while new custom filetype entries are a little
daunting (and even tedious, if you are not modifying or appending to
existing settings) the first time, once you have your files in place,
they become much easier to do for additional entries.


Re: Vim taking a long time to save files

2007-01-23 Thread Phil Edwards

On 1/19/07, Keith Waters [EMAIL PROTECTED] wrote:

14:20:09 open(management.phtml, O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3



Is it having trouble opening the file for writing?


well, it is not having any trouble, because the call to open()
succeeds.  The drive, the operating system, etc -- any of those things
could be having trouble, but Vim can't see any of it, because open()
is a system primitive, i.e., Vim can't dig any deeper, and isn't
responsible for stuff under that layer.

Do you see the same pauses when editing files as a non-root user?


Re: vim 7.0, Edit with Vim, and x64 WinXP

2007-01-17 Thread Phil Edwards

On 1/17/07, George V. Reilly [EMAIL PROTECTED] wrote:

Phil Edwards wrote:
 7.0 is running fine on all my other systems, it's only this 64-bit XP
 box that doesn't see the new menu entries.  I can't even get an Edit
 with... entry to appear; that seems to be gone or restricted or moved
 or.

Try saving the following to vim.reg and executing that:


REGEDIT4

[HKEY_CLASSES_ROOT\*\Shell\Open with Vim\command]
@=\c:\\Program Files\\Vim\\vim70\\gvim.exe\ \%1\




On 1/17/07, jk [EMAIL PROTECTED] wrote:

Put a shortcut key to send to...!



Thank you both for your replies.

As it happens, neither of those helps, because the shell extension is
not being used at all.  After some more research, I've found that
32-bit shell extensions are not loaded into the 64-bit Windows
Explorer, regardless of registry entries (like the first suggestion).
I would not be happy using the proposed workaround in the second
suggestion, but since the entries will not appear *anywhere* in the
context menu -- it's all or nothing -- it won't matter.  :-)

I found after I sent my message that it's not just a Vim thing,
either; any 32-bit shell extension will not be used.  Programs like
WinRAR or Winzip have the same problems.  The real solution is to
build a 64-bit shell extension, but that's going to be beyond the
casual user.

The most common workaround, it turns out, is to run a copy of the
windows explorer in a 32-bit mode, e.g., a desktop shortcut pointing
to C:\windows\syswow64\explorer.exe /separate.  (What does syswow
mean?  Don't ask, I have no idea.)  The /separate runs the file
manager in its own 32-bit process space, and suddenly all the shell
extensions are working.

This has drawbacks; the 32-bit explorer has its own view of the world
that isn't necessarily related to what the rest of the computer is
thinking.  What's more, any software that *has* installed 64-bit shell
extensions will not show up in this copy.


vim 7.0, Edit with Vim, and x64 WinXP

2007-01-16 Thread Phil Edwards

Hello.  I've been using Vim since the 4.0 days and loving it.  I've
just installed 7.0 on an x64 system for the first time.  It works, but
is missing the edit with vim popup menu entries.

I re-ran the install.exe program and had it recreate the menu entries,
but nothing changed.

I've followed the instructions under :help install-registry and
added the keys there; only some of them had been previously created by
install.exe, so I created the missing ones (very carefully).  Still no
luck.

7.0 is running fine on all my other systems, it's only this 64-bit XP
box that doesn't see the new menu entries.  I can't even get an Edit
with... entry to appear; that seems to be gone or restricted or moved
or.