[BUG] Swap file searched for in the wrong place

2006-05-17 Thread Gautam Iyer
Hi All,

I found the following bug:

$ mkdir /tmp/foo
$ touch /tmp/foo/bar
$ cd /tmp/
$ ln -s foo/bar .
$ vim bar

Now type some text into bar, and then kill vim (say with kill -9) from a
different terminal.

Now when you type vim /tmp/bar it reports that a .swp file is found
and asks you about recovery. However when you press R for recovering
the file, vim complains saying it can not find the swap file (probably
because vim looks for the swap file in /tmp, instead of in /tmp/foo).

GI

-- 
Modern Computer Viruses:
Politically Correct Virus -- Never calls itself a virus, but instead 
refers to itself as an electronic microorganism.


Re: [BUG] Swap file searched for in the wrong place

2006-05-17 Thread James Vega
On Tue, May 16, 2006 at 11:19:57PM -0500, Gautam Iyer wrote:
 Now when you type vim /tmp/bar it reports that a .swp file is found
 and asks you about recovery. However when you press R for recovering
 the file, vim complains saying it can not find the swap file (probably
 because vim looks for the swap file in /tmp, instead of in /tmp/foo).

This appears to be fixed in vim7.

James
-- 
GPG Key: 1024D/61326D40 2003-09-02 James Vega [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Re: FW: [Vimoutliner] I have a windows installation issue.

2006-05-17 Thread Benji Fisher
 Please take the time to edit out the parts we do not need to read.

 I just tried

:tab split

and I am about to yank this line.

 OK, I yanked it, did a gt back to the original tab, and now I will
paste it:

and I am about to yank this line.

No problem.  If this supposed bug is reproducible, please give details.

HTH --Benji Fisher

On Wed, May 17, 2006 at 02:27:38PM +0200, Zdenek Sekera wrote:
 From another mailing list.
 Is there a problem using tabs on the same file?
 
 ---Zdenek 
   
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Peter Princz
 Sent: 17 May 2006 13:53
 To: Vim Outliner User and Developer Mailing List
 Subject: Re: [Vimoutliner] I have a windows installation issue.
 
 So far I've been using :split to open several windows to the same
 buffer, but now in vim7 I tried the tabs. It is a very preliminary
 observation but it seems to work perfectly until you yank from one tab
 to the other, then the second tab becomes garbled. (Note: both tabs
 show the same buffer, the same file.)
 
 Luckily it is garbled on the display only, not the file itself. Also
 it can report ambigously on the tabs whether the file is saved or
 dirty.


Re: vim7: problem with regex subst and combining chars

2006-05-17 Thread Ron Aaron
Arrgh!  I can't send this message to the list, for some reason!  Maybe
because it has strange characters in it?

OK:  you can download my test.zip from here:

http://ronware.org/test.zip

In it you will find a file 'test.txt' which is UTF8 and will tell you how
to  see the problem I am finding with using s/// with combining
characters.





Re: [BUG] Swap file searched for in the wrong place

2006-05-17 Thread Gautam Iyer
On Wed, May 17, 2006 at 10:31:55AM -0400, James Vega wrote:

 On Tue, May 16, 2006 at 11:19:57PM -0500, Gautam Iyer wrote:
 
  Now when you type vim /tmp/bar it reports that a .swp file is found
  and asks you about recovery. However when you press R for recovering
  the file, vim complains saying it can not find the swap file (probably
  because vim looks for the swap file in /tmp, instead of in /tmp/foo).
 
 This appears to be fixed in vim7.

I'm using Vim-7.017, and it's not fixed! Is there a more recent version?

Gautam

-- 
With her marriage, she got a new name and a dress.


Re: [BUG] Swap file searched for in the wrong place

2006-05-17 Thread A.J.Mechelynck

Gautam Iyer wrote:

On Wed, May 17, 2006 at 10:31:55AM -0400, James Vega wrote:

  

On Tue, May 16, 2006 at 11:19:57PM -0500, Gautam Iyer wrote:



Now when you type vim /tmp/bar it reports that a .swp file is found
and asks you about recovery. However when you press R for recovering
the file, vim complains saying it can not find the swap file (probably
because vim looks for the swap file in /tmp, instead of in /tmp/foo).
  

This appears to be fixed in vim7.



I'm using Vim-7.017, and it's not fixed! Is there a more recent version?

Gautam

  

No, that's the current patchlevel. However:

- The 'directory' option (q.v.) directs where the swap file shall reside
- If you are reopening it with a different login name, there could be a 
permissions problem.



Best regards,
Tony.


Re: right-to-left text selection

2006-05-17 Thread Eric Arnold

Use the o command to switch positions of the cursor, and then move
to the left.

On 5/16/06, Gerald Lai [EMAIL PROTECTED] wrote:

On Tue, 16 May 2006, Jared wrote:

[snip]
 So, my question:  is it somehow possible to be able to select the last
 character of a line when selecting from right-to-left while using
 selection=exclusive?
[snip]

The simplest work around is to hit ol (that's oh-el) to select that
last character.

You should know that the behavior of selection=exclusive has been shown
to been inconsistent. IMO, it's better to have selection=inclusive and
work around to removing the newline if it exists.

HTH.
--
Gerald



About CursorHoldI , pumvisible()

2006-05-17 Thread ice_2001cn

au! CursorHoldI *.cpp nested call PreviewWord()
func! PreviewWord()
if pumvisible()
call confirm('pumvisible')
return
endif
call confirm(''+pumvisible())
endf


I found, while I use c-xc-u for a cpp code completion,
The code shown above allways show a message 0
why?



Re: right-to-left text selection

2006-05-17 Thread Georg Dahn
Hi!

 So, my question:  is it somehow possible to be able to select the
last
 character of a line when selecting from right-to-left while using
 selection=exclusive?

This can be done by doing

:set virtualedit=onemore

which allows the cursor to move just past the end of the line. This
makes exclusive selection much more consistent, but is not compatible
to
Vi. It may break some plugins, so use it with care!

Of course, doing

:set virtualedit=all

helps, too, but this is something, which many people don't like. I
don't
like it and set 'virtualedit' to 'block'. BTW, starting the right-to-
left selection in Insert mode selects the last character, too.

Best wishes,

Georg









Send instant messages to your online friends http://uk.messenger.yahoo.com 


Re: HTML editing with vim: where to start ?

2006-05-17 Thread John Love-Jensen
Hi Ivan,

 The FAQ contains some obscure information that goes beyond your average
 Vim cheat sheet.

For the aforementioned average Vim cheat sheet...

http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html

--Eljay



Laungage

2006-05-17 Thread Jansen of Lorkeers, Richard
Hello,

I have a general question, we now use the EDT editor (OPENVMS) for editing
PASCAL. Is it possible to use VIM or PASCAL.

Regards,

Richard Jansen of Lorkeers


Re: echon space ?

2006-05-17 Thread Eric Arnold

redrawing doesn't help.  In this case with getchar(), echon'ed
trailing spaces are only shown after a non-space character is echon'ed
afterwards.

It's not a big deal, but I'm going to cc: [EMAIL PROTECTED] since I can't find
any way to create a getchar() + prompt with trailing spaces.

I'm writing mappings like:

cnoremap silent cd call Cd_plus() CR

such that I want the user to see :cd  as the prompt in the command line.


On 5/16/06, A.J.Mechelynck [EMAIL PROTECTED] wrote:

Eric Arnold wrote:
 On 5/16/06, Gerald Lai [EMAIL PROTECTED] wrote:
 On Tue, 16 May 2006, Eric Arnold wrote:

  Does anybody understand why trailing spaces in an echon string don't
  actually show up?
 
  echon \ngimme 
  let inp = getchar()
  echon nr2char(inp)

 I think echo/echon is doing fine. It's getchar() that's eating up
 trailing spaces. Compare @a's for:

:redir @a |  echon   123 | call getchar() | redir END
:redir @a |  echon \n123 | call getchar() | redir END
:redir @a || echon   123 | call getchar() | redir END

 Not sure what the last example is supposed to do.

 The \n or previous ex command | has something to do with it.

 (tested on Vim 6.3)
 --
 Gerald


 It's odd that it remembers all the trailing spaces, and prints them
 out as soon as the  echon  following the   getchar()  prints a
 non-space char.

 I'm thinking that it could also be the rendering in the command window
 that is causing it, as if it truncates trailing spaces when writing to
 the screen, but not when actually building the strings internally.

 It's probably a combination of this, and that   getchar()   isn't in
 the list of things that triggers printing the trailing spaces.

 I can't tell whether to call this a bug yet.



(Just guessing in the dark) Could it be a redraw problem?


Best regards,
Tony.



Re: Laungage

2006-05-17 Thread Andrei A. Voropaev
On Wed, May 17, 2006 at 01:23:37PM +0200, Jansen of Lorkeers, Richard wrote:
 I have a general question, we now use the EDT editor (OPENVMS) for editing
 PASCAL. Is it possible to use VIM or PASCAL.

Depends on what you mean under use. Vim can edit any plain text files.
Pascal program source is a text file, so you can use Vim to edit Pascal
sources. Vim supports syntax highlighting and automatic indentation for
Pascal. It also support whole bunch of other things that are very good
for general program writing.

-- 
Minds, like parachutes, function best when open


Re: HTML editing with vim: where to start ?

2006-05-17 Thread Mikolaj Machowski
Dnia wtorek, 16 maja 2006 14:17, Ivan Vecerina napisał:
  - get vim to automatically close/complete the innermost previously
 opened tag.

What do you mean automatically?. You can do:

inoremap / /c-xc-o

 Other things I don't know how to find is: how do I make sure that VIM
 finds the CSS associated with the document I am editing (to help with
 auto-completion)?

It should work automatically.

 What are other tricks I should know for HTML-style document editing, and
 where can I learn them?

Useful new feature for HTML-edition is of course omni-completion but
also new text-objects:

:help at
:help it

m.



Re: HTML editing with vim: where to start ?

2006-05-17 Thread Mikolaj Machowski
Dnia wtorek, 16 maja 2006 18:37, A.J.Mechelynck napisał:
 Ivan Vecerina wrote:
 [...]

  For example, here are a few simple things I need to do all the time:
  [...]
   - get vim to automatically close/complete the innermost previously
  opened tag.

 [...]

 see the closeag.vim plugin,
 http://vim.sourceforge.net/scripts/script.php?script_id=13

For base needs this is not needed. Closetag is now part of completion
scripts for HTML.

m.



Re: vim7: two issues with insert mode completion

2006-05-17 Thread Mikolaj Machowski
Dnia środa, 17 maja 2006 03:49, Hari Krishna Dara napisał:
 Very often, I record changes that involves i_^P, and see an issue
 replaying them in Vim7. Say, you have text such as:

Noticed similar behaviour in command line completion. Up to Vim7 when
you were recording into register went real stuff. Now - history events
(like up, down in command line) are recorded. Because history is
contextual and can change each time when called executing of register is
borked :/ Especially painful because into register go usually long
commands - now you have to type them from beginning to the end, not
cally from history.

m.
-- 
- Squeak?
- SQUEAK.



Re: SNR, maparg(), and UTF-8

2006-05-17 Thread Mikolaj Machowski
Dnia wtorek, 16 maja 2006 23:35, Luc Hermitte napisał:
 The problem has existed for a long time. The iconv() workaround works
 correctly with vim 7.0.012 on linux, but not with vim 7.0.000 (default
 win32 build) on windows.

Do you have +iconv or +iconv/dyn in :version? For better work with
various encodings you need iconv.dll in some readable place.

m.




Multiline file appearing in one line under Vim

2006-05-17 Thread Baha-Eddine MOKADEM

Hi all,


I have a file which behaves differently whether edited with win32
Notepad and gVim.
When opened in notepad I got several lines, which is the most
convenient layout for me, but when opened in gVim I got the file in
only one line.

I tried to set ff to dos but it does not have any effect.

Does any one have a clue ?
How can I do to have the file edited in several lines ?
What have I missed ?

Thank you.

Eddine.


Re: Multiline file appearing in one line under Vim

2006-05-17 Thread Matthew Winn
On Wed, May 17, 2006 at 03:19:39PM +0200, Baha-Eddine MOKADEM wrote:
 I have a file which behaves differently whether edited with win32
 Notepad and gVim.
 When opened in notepad I got several lines, which is the most
 convenient layout for me, but when opened in gVim I got the file in
 only one line.

Is it really several lines in Notepad, or is it one long line that has
wrapped?  If the latter then the following will help:

:set wrap linebreak
:map Up gk
:map Down gj

-- 
Matthew Winn ([EMAIL PROTECTED])


Re: Multiline file appearing in one line under Vim

2006-05-17 Thread Jonathon Merz

On 5/17/06, Baha-Eddine MOKADEM [EMAIL PROTECTED] wrote:

Hi all,


I have a file which behaves differently whether edited with win32
Notepad and gVim.
When opened in notepad I got several lines, which is the most
convenient layout for me, but when opened in gVim I got the file in
only one line.

I tried to set ff to dos but it does not have any effect.

Does any one have a clue ?
How can I do to have the file edited in several lines ?
What have I missed ?

Thank you.

Eddine.


By any chance, is notepad wrapping it?  Check in notepad if Word
Wrap is checked under the Format menu.  If so, you may actually have
a single line file that is being wrapped automatically in notepad.
For similar wrapping in Vim:
:set wrap

I say similar since there are a number of options that can affect
exactly how Vim wraps.  See
:help wrap
for a quick howto and a list of some of the options affecting wrapping in vim.

Jonathon


Re: gvim when x server is shut down

2006-05-17 Thread Dennis Nezic
 On Tue, 16 May 2006 22:28:54 -0700 (PDT),
 Gerald Lai [EMAIL PROTECTED] wrote:

 On Wed, 17 May 2006, Dennis Nezic wrote:
 
  when i exit my wm (e16), since it doesn't (and shouldn't) close any
  other programs, gvim is stuck without an x server, and doesn't
  handle this loss gracefully. effectively, it's as if it was kill
  -9'ed ... and thus leaves temporary files behind, which i later
  have to labouriously clean up.
 
  can it not do something better  like simply close down if no
  changes were made to the file (and close any temp files). and, i
  guess, leave the temp files behind if changes were made (as it
  currently does in all cases :\).
 
 You could try something like
 
   :au VimLeave * if v:dying | quitall! | endif

actually, vim does do what i expect it to do ... even without the
VimLeave autocmd ... gvim doesn't :\. i wonder if there is any event
that might work with gvim.


Re: Calling through a function reference with a variable argument list

2006-05-17 Thread Bob Hiestand

On 5/16/06, Hari Krishna Dara [EMAIL PROTECTED] wrote:


On Tue, 16 May 2006 at 2:43pm, Bob Hiestand wrote:

 Hi all,

   I'm re-writing my cvscommand.vim plugin to handle both CVS and
 Subversion version control systems.  I'm currently implementing some
 of the functionality through function references that define common
 operations for each source control system in a dictionary specfic to
 that system.  I have a situation where I have a generic dispatch
 function that identifies which dictionary to dereference to obtain the
 function reference.

   The problem is that the function eventually called behind the
 function reference may have any number of arguments.  Therefore, the
 dispatch function takes any number of arguments to pass through.  This
 leads to the actual call, which looks like this (all on one line):

 function! s:ExecuteVCSCommand(command, ...)
find the proper functionMap dictionary, and then:
   execute return functionMap[a:command]( . join(map(copy(a:000),
 '\' . v:val . '\'), ,) . )

   My question is whether there is a simpler way to pass an unknown
 number of arguments from the current function to a function which
 accepts a variable-length list of arguments.

 Thank you,

 Bob

My suggestion would be to have the underlying methods always accept a
list of arguments, then you can just pass a:000 straight-through.


Yes, I've changed the implementation functions in this way per Yakov.  Thanks.


BTW, your approach to enclose the arguments in double-quotes is a
bad-idea, especially if you are handling paths on windows with
back-slashes in them (among various others). Imagine what would happen
if the argument is c:\dev\tst\newfile, both \t and \n will result
in getting expanded to tab and newline. What you should do is to use
single-quotes to avoid accidental transformations, but then escape the
existing single-quotes themselves (if any). Take a look at the
MakeArgumentString() function in my genutils.vim.

--
HTH,
Hari


Yes, I've changed the implementation functions in this way per Yakov.  Thanks.

With your heads-up about the double quote in mind, I'm glad that I'm
not using execute now, as the equivalent expression looks to be:

execute 'return functionMap[a:command](' . join(map(copy(b:alist),
' . v:val . ')), ',') . ')'

which is fairly difficult for me to read.

Thank you,

Bob


Re: SNR, maparg(), and UTF-8

2006-05-17 Thread hermitte
Yakov Lerner [EMAIL PROTECTED] wrote:

 On 5/17/06, Luc Hermitte [EMAIL PROTECTED] wrote:
  I have a problem with an old hack that works fine in latin1, but starts
  to cause problems in UTF-8.
  [...]
  What is quite odd is that I have a workaround on Linux (by calling
  iconv()) which has no, useful, effect on Windows (win32 build).
 
  The problem has existed for a long time. The iconv() workaround works
  correctly with vim 7.0.012 on linux, but not with vim 7.0.000 (default
  win32 build) on windows.

 Maybe it has to do with vaule of scriptencoding ?

It was set to latin1 (I did not copy-paste the corresponding line in the example
I've provided), and it had no effect on Windows.

--
Luc Hermitte


Re: SNR, maparg(), and UTF-8

2006-05-17 Thread hermitte
Mikolaj Machowski [EMAIL PROTECTED] wrote:

 Dnia wtorek, 16 maja 2006 23:35, Luc Hermitte napisa³:
  The problem has existed for a long time. The iconv() workaround works
  correctly with vim 7.0.012 on linux, but not with vim 7.0.000 (default
  win32 build) on windows.

 Do you have +iconv or +iconv/dyn in :version? For better work with
 various encodings you need iconv.dll in some readable place.

On windows build, I have +iconv/dyn IIRC. As it is the standard build from
sourceforge, I guess the DLL is correctly provided -- I'll check that tomorrow.
Can the function iconv() continue to transform characters without the DLL ?

--
Luc Hermitte


Re: Multiline file appearing in one line under Vim

2006-05-17 Thread Georg Dahn

Hi!

My guess is: notepad breaks at column 1024. In notepad the first two
lines of your file have exact 1024 characters. This could be a
notepad limitation.

Best wishes,
Georg



Baha-Eddine MOKADEM wrote:

Hi all,


I have a file which behaves differently whether edited with win32
Notepad and gVim.
When opened in notepad I got several lines, which is the most
convenient layout for me, but when opened in gVim I got the file in
only one line.

I tried to set ff to dos but it does not have any effect.

Does any one have a clue ?
How can I do to have the file edited in several lines ?
What have I missed ?

Thank you.

Eddine.

Send instant messages to your online friends http://uk.messenger.yahoo.com 


Re: Multiline file appearing in one line under Vim

2006-05-17 Thread Baha-Eddine MOKADEM

2006/5/17, Georg Dahn [EMAIL PROTECTED]:

Hi!

My guess is: notepad breaks at column 1024. In notepad the first two
lines of your file have exact 1024 characters. This could be a
notepad limitation.

Best wishes,
Georg



Is there a way to make profit of this kind of limitation. Or is there
a way to cut the single line so I can have n lines of the same L
length ?


Re: Multiline file appearing in one line under Vim

2006-05-17 Thread Gerald Lai

On Wed, 17 May 2006, Baha-Eddine MOKADEM wrote:


2006/5/17, Georg Dahn [EMAIL PROTECTED]:

Hi!

My guess is: notepad breaks at column 1024. In notepad the first two
lines of your file have exact 1024 characters. This could be a
notepad limitation.

Best wishes,
Georg



Is there a way to make profit of this kind of limitation. Or is there
a way to cut the single line so I can have n lines of the same L
length ?


Perform:

  :g/\%1025c/wh getline(.)=~@/|s//\r/|endw

This will slice the single line into multiple lines of 1024-length.

HTH.
--
Gerald


RE: Multiline file appearing in one line under Vim

2006-05-17 Thread Suresh Govindachar

On Wed, 17 May 2006, Baha-Eddine MOKADEM wrote:
 2006/5/17, Georg Dahn [EMAIL PROTECTED]:
 
 My guess is: notepad breaks at column 1024. In notepad the first two
 lines of your file have exact 1024 characters. This could be a
 notepad limitation.
 
 Is there a way to make profit of this kind of limitation. 

The limitation is in Notepad, not in Vim.

 Or is there a way to cut the single line so I can have n 
 lines of the same L length ?

Yes -- see :help textwidth and :help gq

For example, for lines of length 60, do :set tw=60.
Then put cursor on the line line and type gqq.

--Suresh



Re: gvim when x server is shut down

2006-05-17 Thread A.J.Mechelynck

Dennis Nezic wrote:

On Tue, 16 May 2006 22:28:54 -0700 (PDT),
Gerald Lai [EMAIL PROTECTED] wrote:

On Wed, 17 May 2006, Dennis Nezic wrote:



when i exit my wm (e16), since it doesn't (and shouldn't) close any
other programs, gvim is stuck without an x server, and doesn't
handle this loss gracefully. effectively, it's as if it was kill
-9'ed ... and thus leaves temporary files behind, which i later
have to labouriously clean up.

can it not do something better  like simply close down if no
changes were made to the file (and close any temp files). and, i
guess, leave the temp files behind if changes were made (as it
currently does in all cases :\).
  

You could try something like

:au VimLeave * if v:dying | quitall! | endif



actually, vim does do what i expect it to do ... even without the
VimLeave autocmd ... gvim doesn't :\. i wonder if there is any event
that might work with gvim.


  
Gvim needs a keyboard device and a display device. IIUC, on Unix these 
are handled through X11. Now if X11 pops out, gvim suddenly finds itself 
with no keyboard or display. Morality: Don't close X11 as long as there 
are programs which use it, unless those same programs will be properly 
closed by the same action.


When you say vim behaves properly, do you mean vim running on /dev/tty 
(which doesn't use X11 at all) or vim running in an xterm or similar 
(where I/O goes through X11, but that is handled by the terminal emulator)?



Best regards,
Tony.


avoid :source error with 7.0 script in 6.x

2006-05-17 Thread Steve Hall

Is there a way to construct the code below to avoid the E193
:endfunction not inside a function error in Vim 6.4 when loading a
Vim 7.0 script?

This for-endfor construct produces the error:

  function! MyFunct()
  if v:version  700
  return
  endif
  ...
  for i in range(tabpagenr('$'))
 ...
  endfor
  endfunction

The runtime condition is fine, earlier versions avoid the problem. 

I know I can avoid it by silencing :source call but I'd rather not do
that if there's some other trick.

Thanks.


-- 
Steve Hall  [ digitect mindspring com ]
:: Cream... something good to put in your Vim!
::   http://cream.sourceforge.net




Saving over FTP with vim 7

2006-05-17 Thread Noah Sturr
I'm having an issue saving a file open for edit using
the ftp://host mechanism. The steps are:

open gvim.exe from the Windows command line
open a file with :e ftp://hostname/path/file;
proviide the username/password successfully
after loading the file and saving write with :w

After that I get an error message:
  ***netrw*** VIC104.tmp: File not found

The file name changes each time and I cannot find it
in any directory. Bug? Error in configuration? I can
put up my configurations if needed but nothing really
odd is set. Thanks!

noah

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: Saving over FTP with vim 7

2006-05-17 Thread Charles E Campbell Jr

Noah Sturr wrote:


I'm having an issue saving a file open for edit using
the ftp://host mechanism. The steps are:

open gvim.exe from the Windows command line
 



Hello!

Please try my latest netrw; several changes have been made lately to 
help support Windows + cmd.exe users.  Its available at:


  http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs   as 
Network Oriented Reading, Writing, and Browsing


Its up to v100d.

Regards,
Chip Campbell


Re: HTML editing with vim: where to start ?

2006-05-17 Thread Ivan Vecerina
Gerald Lai [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
: On Tue, 16 May 2006, Ivan Vecerina wrote:

: You could read Bram Moolenaar's
: Seven Habits of Effective Text Editing at:
:   http://www.moolenaar.net/habits.html
A very good read indeed.

: I think using matchit is one of the fastest ways to delete block-like
: items, including start and end tags.
:   http://www.vim.org/scripts/script.php?script_id=39
matchit seems like a must-install, too bad it's not activated
by default.  And it is not mentioned in the vimbook or the FAQs
I read so far (maybe because they were pre-vim6).

This was a great pointer - thanks.


: In order to obtain more support for operations involving HTML tags, you
: could search in
:
:   http://www.vim.org/scripts/index.php
...
:   http://www.vim.org/tips/index.php
:
: to get a feel of what other users want and have made out of Vim.
: Also, stay on this mailing list and you will learn a lot.

Yes. Problem with those resources is that they include a lot of
noise, and are not up-to-date when it comes to vim7 - which seems
to have introduced some useful improvements, as pointed out in
Mikolaj's replies.

Many thanks,
Ivan
-- 
http://ivan.vecerina.com/contact/?subject=NG_POST - email contact form





Re: avoid :source error with 7.0 script in 6.x

2006-05-17 Thread A.J.Mechelynck

Steve Hall wrote:

Is there a way to construct the code below to avoid the E193
:endfunction not inside a function error in Vim 6.4 when loading a
Vim 7.0 script?

This for-endfor construct produces the error:

  function! MyFunct()
  if v:version  700
  return
  endif
  ...
  for i in range(tabpagenr('$'))
 ...
  endfor
  endfunction

The runtime condition is fine, earlier versions avoid the problem. 


I know I can avoid it by silencing :source call but I'd rather not do
that if there's some other trick.

Thanks.


  
It might be a bug in v6, but are those still being fixed? Anyway, until 
Bram comes back from holiday, I guess one possibility would be to 
replace the for/endfor by a v6-compatible construct like


let i = 0
while i  tabpagenr('$')
...
let i = i+1
endwhile

Or does that choke on the unknown tabpagenr() function?


Best regards,
Tony.


Re: Saving over FTP with vim 7

2006-05-17 Thread A.J.Mechelynck

Noah Sturr wrote:

I'm having an issue saving a file open for edit using
the ftp://host mechanism. The steps are:

open gvim.exe from the Windows command line
open a file with :e ftp://hostname/path/file;
proviide the username/password successfully
after loading the file and saving write with :w

After that I get an error message:
  ***netrw*** VIC104.tmp: File not found

The file name changes each time and I cannot find it
in any directory. Bug? Error in configuration? I can
put up my configurations if needed but nothing really
odd is set. Thanks!

noah

[advertisement snipped]
  
If you can't solve your problem by reading :help pi_netrw.txt 
attentively (and checking if you have correctly set up any required 
configuration variables), then a good workaround would be to edit the 
file locally and do the download/upload as a separate step outside of Vim.



Best regards,
Tony.


Re: avoid :source error with 7.0 script in 6.x

2006-05-17 Thread Steve Hall
From: Yegappan Lakshmanan, May 17, 2006 5:01 PM
 On 5/17/06, Steve Hall [EMAIL PROTECTED] wrote:
  
  Is there a way to construct the code below to avoid the E193
  :endfunction not inside a function error in Vim 6.4 when loading
  a Vim 7.0 script?
[snip]
 
 What about doing the following?
 
 if v:version  700
   function! MyFunc()
 
   endfunction
 else
   function! MyFunc()
 for i in range(tabpagenr('$'))
 ...
 endfor
   endfunction
 endif

Perfect, that solution was somehow escaping me.

Thanks Yegappan.


-- 
Steve Hall  [ digitect mindspring com ]
:: Cream... something good to put in your Vim!
::   http://cream.sourceforge.net




Re: Tables.

2006-05-17 Thread A.J.Mechelynck

cga2000 wrote:

Does vim provide any form of native support for drawing tables?

I have tried a couple of plugins and they don't seem to play well with
my setup, presumably because I have temporarily switched my locale back
from UTF-8 to en_US (due to problems with other applications that do are
not yet utf8-ready).

When in UTF-8 I was able to manually draw nice-looking tables to dress
up text that I had previously formatted in rows and columns by using
digraphs (Ctrl+K hh/vv etc..) and though there were some issues with
printing I was all-in-all quite happy. 


The functionalities I had in mind would probably do something like this:

1. Assist text entry by letting you define tab stops,
  
Tabs stops in Vim are fixed-width; and it's usually a good idea to keep 
the hard tab width at 8, though it is possible to define soft tab 
stops (:h 'softtabstop') of a different width.
2. Let you select a column of text and justify it, 
3. Provide some means of inserting vertical lines at each tab stop,
  
I think that's possible using block visual mode, but I don't know the 
details.

4. Assist in creating horizontal lines by adding the ad hoc character
   where a vertical and a horizontal line intersect, 
5. Reformat the table frame when box drawing characters are not

   available (replacing line intersections by '+' for instance).

But then again I have little experience with vim and there is probably
a vim way of doing this that I have not even imagined. So I am open
to better strategies.

Thanks,

cga


  


See also
:help :s
:help line()
:help column()
:help sub-replace-special
etc.


Best regards,
Tony.


RE: avoid :source error with 7.0 script in 6.x

2006-05-17 Thread Suresh Govindachar
 
Steve Hall wrote:
 Is there a way to construct the code below to avoid the E193
 :endfunction not inside a function error in Vim 6.4 when loading a
 Vim 7.0 script?

 This for-endfor construct produces the error:

   function! MyFunct()
   if v:version  700
   return
   endif
   ...
   for i in range(tabpagenr('$'))
  ...
   endfor
   endfunction

 The runtime condition is fine, earlier versions avoid the problem. 

 I know I can avoid it by silencing :source call but I'd rather not do
 that if there's some other trick.

  Curious about why you don't negate your test:  meaning 
  why not stick the for inside an if v:version = 700 ?

  --Suresh



Re: avoid :source error with 7.0 script in 6.x

2006-05-17 Thread Hari Krishna Dara

On Wed, 17 May 2006 at 10:58pm, A.J.Mechelynck wrote:

 Steve Hall wrote:
  Is there a way to construct the code below to avoid the E193
  :endfunction not inside a function error in Vim 6.4 when loading a
  Vim 7.0 script?
 
  This for-endfor construct produces the error:
 
function! MyFunct()
if v:version  700
return
endif
...
for i in range(tabpagenr('$'))
   ...
endfor
endfunction
 
  The runtime condition is fine, earlier versions avoid the problem.
 
  I know I can avoid it by silencing :source call but I'd rather not do
  that if there's some other trick.
 
  Thanks.
 
 
 
 It might be a bug in v6, but are those still being fixed? Anyway, until
 Bram comes back from holiday, I guess one possibility would be to
 replace the for/endfor by a v6-compatible construct like

 let i = 0
 while i  tabpagenr('$')
 ...
 let i = i+1
 endwhile

 Or does that choke on the unknown tabpagenr() function?


 Best regards,
 Tony.

Yes, this might be a bug, as I observed that you can put any gibberish
in a function and still have it sourced (I put vbscript in a couple of
plugins).

As a trick, how about enclosing :endfor inside an exec?

exec endfor

This seems to take the error message away, though I don't know if it
actually works (don't see any reason why it shouldn't).

-- 
Thanks,
Hari

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: gvim when x server is shut down

2006-05-17 Thread Dennis Nezic
 On Wed, 17 May 2006 10:21:41 -0500,
 Aaron Griffin [EMAIL PROTECTED] wrote:

 On 5/17/06, Dennis Nezic [EMAIL PROTECTED] wrote:
   On Tue, 16 May 2006 22:28:54 -0700 (PDT),
   Gerald Lai [EMAIL PROTECTED] wrote:
   You could try something like
  
 :au VimLeave * if v:dying | quitall! | endif
 
  actually, vim does do what i expect it to do ... even without the
  VimLeave autocmd ... gvim doesn't :\. i wonder if there is any event
  that might work with gvim.
 
 VimLeave works with gvim as well.  Did you try the above suggestion?

i did, without success. it seems that gvim doesn't get a chance to even
handle that event when the x server shuts down.


Re: SNR, maparg(), and UTF-8

2006-05-17 Thread Mikolaj Machowski
Dnia środa, 17 maja 2006 18:34, [EMAIL PROTECTED] napisał:
 Mikolaj Machowski [EMAIL PROTECTED] wrote:
  Dnia wtorek, 16 maja 2006 23:35, Luc Hermitte napisa?:
   The problem has existed for a long time. The iconv() workaround
   works correctly with vim 7.0.012 on linux, but not with vim 7.0.000
   (default win32 build) on windows.
 
  Do you have +iconv or +iconv/dyn in :version? For better work with
  various encodings you need iconv.dll in some readable place.

 On windows build, I have +iconv/dyn IIRC. As it is the standard build
 from sourceforge, I guess the DLL is correctly provided -- I'll check

Not necessarily. AFAIR (I am not using actively Windows builds) for
proper working of converting functions you need to download iconv.dll
separately. Some encodings conversions are working without iconv.dll
some not.

m.



Re: colorscheme conversion script?

2006-05-17 Thread 'cga2000'
On Mon, May 15, 2006 at 10:08:03PM EDT, Suresh Govindachar wrote:
 
   Are you thinking of Gautam's xterm16 
 http://www.vim.org/scripts/script.php?script_id=795 ?
 

No, I actually use the all-blue incarnation of his xterm16 colorscheme
myself..  I have read the doc a couple of times, and I'm pretty sure
this was from somebody else.  Since I spent some time getting his
colorscheme to work - where console vim is concerned, it requires a
256-color xterm  I think it would have struck me if they had been from
the same author. But who knows.. I'll take another look just in case..

Gautam may know something about this since he seems to be our greatest
expert in vim colorschemes.

I'll update the thread if I find anything.

Thanks,

cga

PS. I think it would be preferable to bottom-post.. I wasn't sure where
to reply.. right after your reply as I did.. at the bottom as I normally
do.. at the top - before your reply..? Whichever way, this results in
something rather messy especially for those who have not followed the
entire thread.. and it's probably also preferable to reply to the list
instead of the original poster (and cc'ing the list).. but then who am I
to argue..

   It comes with lots of files:
 
   cpalette.pl
   tags
   xterm16.ct
   xterm16.schema
   xterm16.vim
   xterm16.txt
 
   Gautam, is your colorscheme useful for vim 
   under cmd.exe and gvim in Windows also?
 
   Also, why do you include the tags file?
 
   --Suresh
 
 
 -Original Message-
 From: cga2000 [mailto:[EMAIL PROTECTED] 
 Sent: Monday, May 15, 2006 6:31 PM
 To: vim@vim.org
 Subject: colorscheme conversion script?
 
 I'm pretty sure I saw a vim script that converts gui colorschemes to
 256-color xterm versions but I can't seem to find it any more. 
 
 Can anyone on the list confirm that I'm not making this up and possibly
 provide the name of this script?
 
 Thanks,
 
 cga


RE: HTML editing with vim: where to start ?

2006-05-17 Thread David Fishburn
 

 -Original Message-
 From: Mikolaj Machowski [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, May 17, 2006 6:57 AM
 To: vim@vim.org
 Subject: Re: HTML editing with vim: where to start ?
 
 Dnia wtorek, 16 maja 2006 18:37, A.J.Mechelynck napisał:
  Ivan Vecerina wrote:
  [...]
 
   For example, here are a few simple things I need to do 
 all the time:
   [...]
- get vim to automatically close/complete the innermost 
 previously 
   opened tag.
 
  [...]
 
  see the closeag.vim plugin,
  http://vim.sourceforge.net/scripts/script.php?script_id=13
 
 For base needs this is not needed. Closetag is now part of 
 completion scripts for HTML.


Since Ivan mentioned he is using PHP with his HTML, closetag will be very
useful for him.

I keep the following in my vimrc:

 CloseTag options:
 http://vim.sourceforge.net/script.php?script_id=13
 closetag.vim
 Functions and mappings to close open HTML/XML tags
 This uses C-_ to close an open tag above
if filereadable(expand('$VIM/vimfiles/scripts/closetag.vim')) 
let g:closetag_html_style=1
autocmd Filetype html,xml,xsl,sql,ant,sqlunit,mhtml,php source
$VIM/vimfiles/scripts/closetag.vim 
endif

HTH,
Dave



Re: Tables.

2006-05-17 Thread cga2000
On Wed, May 17, 2006 at 05:13:46PM EDT, A.J.Mechelynck wrote:
 cga2000 wrote:
 Does vim provide any form of native support for drawing tables?
 
 I have tried a couple of plugins and they don't seem to play well with
 my setup, presumably because I have temporarily switched my locale back
 from UTF-8 to en_US (due to problems with other applications that do are
 not yet utf8-ready).
 
 When in UTF-8 I was able to manually draw nice-looking tables to dress
 up text that I had previously formatted in rows and columns by using
 digraphs (Ctrl+K hh/vv etc..) and though there were some issues with
 printing I was all-in-all quite happy. 
 
 The functionalities I had in mind would probably do something like this:
 
 1. Assist text entry by letting you define tab stops,
   
 Tabs stops in Vim are fixed-width; and it's usually a good idea to keep 
 the hard tab width at 8, though it is possible to define soft tab 
 stops (:h 'softtabstop') of a different width.

ok. But I was not thinking of these tab stops.. more in the line of
typewriter stuff, I guess. Both regular tabs and soft tabs would
appear to be more useful for indentation than column formatting.

 2. Let you select a column of text and justify it, 
 3. Provide some means of inserting vertical lines at each tab stop,
   
 I think that's possible using block visual mode, but I don't know the 
 details.

that's pretty much how I was doing it manually - with a ':s' command.

 4. Assist in creating horizontal lines by adding the ad hoc character
where a vertical and a horizontal line intersect, 
 5. Reformat the table frame when box drawing characters are not
available (replacing line intersections by '+' for instance).
 
 But then again I have little experience with vim and there is probably
 a vim way of doing this that I have not even imagined. So I am open
 to better strategies.
 
 Thanks,
 
 cga
 
 
   
 
 See also
 :help :s
 :help line()
 :help column()
 :help sub-replace-special
 etc.

Probably some of the building blocks of the tools I'm looking for. 
 
 
 Best regards,
 Tony.

Thanks, much appreciated,

cga


RE: About CursorHoldI , pumvisible()

2006-05-17 Thread David Fishburn
 

 -Original Message-
 From: ice_2001cn [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, May 17, 2006 4:48 AM
 To: vim@vim.org
 Subject: About CursorHoldI , pumvisible()
 
 
 au! CursorHoldI *.cpp nested call PreviewWord() func! PreviewWord()
   if pumvisible()
   call confirm('pumvisible')
   return
   endif
   call confirm(''+pumvisible())
 endf
 
 
 I found, while I use c-xc-u for a cpp code completion, 
 The code shown above allways show a message 0
 why?

Hmm, where I can't specifically comment on your problem, I can show you some
code I wrote that does work in this situation for the sqlcomplete.vim
plugin.

imap buffer c-right  C-R=sqlcomplete#DrillIntoTable()CR

function! sqlcomplete#DrillIntoTable()
 If the omni popup window is visible
if pumvisible()
call sqlcomplete#Map('column')
 C-Y, makes the currently highlighted entry active
 and trigger the omni popup to be redisplayed
call feedkeys(\C-Y\C-X\C-O)
else
if has('win32')
 If the popup is not visible, simple perform the normal
 C-Right behaviour
exec normal! \C-Right
endif
endif
return 
endfunction

I would suggest trying something other than i_CTRL-X_CTRL-U to see if the
behaviour is any different.

HTH,
Dave




CurorLine, set cursorline: slow, slower, slowest ?!

2006-05-17 Thread Meino Christian Cramer
Hi,

 VIM has a neat feature to highlight the line the cursor is in. This
 makes reading wide texts easier.

 Unfortunatley (at least with my system) moving the cursor become
 very slow.

 Is there a way out (a config trich for example) or any other thing to
 get a fast cursor in a highlighted line ?

 I am using:
 xterm-256color
 mrxvt
 linux 2.6.16-16
 AMD X2 64 3800+
 vim7.0.017
 (if this list is missing any additional information -- please mail
 me! )

 Kind regards,
 mcc

 


RE: Tables.

2006-05-17 Thread Suresh Govindachar

cga2000 wrote:

   But I was not thinking of these tab stops.. 
   more in the line of typewriter stuff, I guess. 

  Creating an imap involving the following 
  operations might do the job:

   ---set up the typewriter style tab-stops---
   let twtabs=[3, 5, 10, 28, 40, 58]
   ---then imap tab to 
  something involving the following---
   let idx=0 
   while (getpos('.')[2] = twtabs[idx]) 
 let idx += 1  
   endwhile
   ---then something like--- 
   cursor(0, twtabs[idx])
   ---or---
   normal (twtabs[idx] - getpos('.')[2])l

  --Suresh



Re: right-to-left text selection

2006-05-17 Thread Eric Arnold

While the visual mode selection is active, hitting o moves to the
opposite corner.  If it isn't doing that for you, I'd check for

vmap

interference.

3. Changing the Visual area *visual-change*

*v_o*
o   Go to Other end of highlighted text: The current
cursor position becomes the start of the highlighted
text and the cursor is moved to the other end of the
highlighted text.  The highlighted area remains the
same.

Keep in mind that it doesn't work the same with a selection made by
the mouse, since that leaves it in select mode not visual mode,
which has some properties like insert mode, but in general has to be
treated differently.  Use ^G to switch visual/select modes.


On 5/17/06, Jared [EMAIL PROTECTED] wrote:

On 5/17/2006 12:52 AM, Gerald Lai wrote:
 So, my question:  is it somehow possible to be able to select the last
 character of a line when selecting from right-to-left while using
 selection=exclusive?

 The simplest work around is to hit ol (that's oh-el) to select that
 last character.

How exactly does this work?  When I hit o in command mode, it adds a newline
below and moves the cursor down.  If I hit o in select mode, it overtypes my
selection.  Hitting l does move the character to the right, but not if it's
on the last line.

Sorry, must've just misunderstood you.  Would you mind explaining again?

Thanks.

--
Jared



Re: right-to-left text selection

2006-05-17 Thread A.J.Mechelynck

Jared wrote:

On 5/17/2006 12:52 AM, Gerald Lai wrote:
  

So, my question:  is it somehow possible to be able to select the last
character of a line when selecting from right-to-left while using
selection=exclusive?
  

The simplest work around is to hit ol (that's oh-el) to select that
last character.



How exactly does this work?  When I hit o in command mode, it adds a newline
below and moves the cursor down.  If I hit o in select mode, it overtypes my
selection.  Hitting l does move the character to the right, but not if it's
on the last line.

Sorry, must've just misunderstood you.  Would you mind explaining again?

Thanks.

--
Jared


  

Try using it in --VISUAL-- (not --SELECT--) mode.

To start Visual mode, hit v (characterwise), V (linewise) or Ctrl-V 
(blockwise) in Normal mode, then move the cursor. (And if you use Ctrl-V 
to paste, use Ctrl-Q instead.)



Best regards,
Tony.


Re: right-to-left text selection

2006-05-17 Thread Jared
On 5/17/2006 11:11 PM, Eric Arnold wrote:
 While the visual mode selection is active, hitting o moves to the
 opposite corner.

 SNIP

 Keep in mind that it doesn't work the same with a selection made by
 the mouse, since that leaves it in select mode not visual mode,
 which has some properties like insert mode, but in general has to be
 treated differently.  Use ^G to switch visual/select modes.


Ok, this was the problem.  I was using select mode rather than visual mode,
and it was behaving exactly as you described.  If I select the text, then
hit ^gol^c, I can finally select all text, including the last character.  Yay!

Not exactly the easiest key sequence, but at least I can make it work now.

Thanks, Eric!

--
Jared


using variables in ! command

2006-05-17 Thread Jared
This should be really easy, but I can't find an example in the help that
shows what I'm trying to do.  I'm mapping an external command to a function
key, but I can't figure out how to include a variable in the command.
Specifically, I want to specify the %programfiles% directory.  So far I've
tried:

1) map F2 :silent ! start  $PROGRAMFILES\Inno Setup\ISetup.hlp
2) map F2 :silent ! start  %PROGRAMFILES%\Inno Setup\ISetup.hlp
3) let isshelp = $PROGRAMFILES.\\Inno Setup\\ISetup.hlp
   map F2 :silent ! start  isshelp

However, they all fail:

1) :echo $PROGRAMFILES displays the correct page, but the above command
simply tries to run $PROGRAMFILES as a literal string

2) Each % expands to the source filename rather than being recognized as an
environmental variable

3) isshelp contains the correct string, but it's output literally rather
than treated as a variable


Like I said, I know this is a pitiful problem, but I'm running out of ideas.
 What am I doing wrong?

--
Jared


ctrl+shift key mappings

2006-05-17 Thread Jared
Ok, this will be my last question for the night (promise!).  I'd like to map
separate commands to Ctrl-C and Ctrl-Shift-C.  I've tried a couple different
ways to do it, but this one seems like it should be most correct:

vnoremap C-c +y
vnoremap C-S-c ^Gol+y

What's happening, though, is that the C-S-c map overwrites the C-c map.  If
I were to place C-c below C-S-c in .vimrc, the it'd be the other way around.

So, two questions: 1) Am I defining the C-S-c mapping correctly?  I
believe that's how it's done, but I couldn't find a specific example in the
docs.  2) How do I make Vim distinguish between the two commands?

Actually, I also have a 3rd, pseudo-related question:  How do I include a
control key sequence in a map?  I'm using ^G in the above example, but that
seems to be completely ignored when I hit C-S-c.  I also tried C-g, but
that's also ignored.

Thanks once again.  Believe me when I say that I'm most appreciative of the
help that's constantly offered on this mailing list.

--
Jared


is there any method to input chinese under cygwin console window?

2006-05-17 Thread hj
I find that the only method to input chinese in vim on a windows box is using 
gvim. And after pressing the ESCAPE switch to command mode, I must switch the 
input method into English. It is not so convenient. Is there any method to 
solve these problems?

Re: using variables in ! command

2006-05-17 Thread Jared
On 5/18/2006 12:08 AM, Yakov Lerner wrote:
 Try
 
 map F2 :exe :silent! start .isshelp cr

Thanks for the reply, Yakov.  However, that gives me an error message:

E121: Undefined variable: isshelp
E15: Invalid expression:silent! start .isshelp

Any other ideas?

--
Jared


Re: using variables in ! command

2006-05-17 Thread A.J.Mechelynck

Jared wrote:

This should be really easy, but I can't find an example in the help that
shows what I'm trying to do.  I'm mapping an external command to a function
key, but I can't figure out how to include a variable in the command.
Specifically, I want to specify the %programfiles% directory.  So far I've
tried:

1) map F2 :silent ! start  $PROGRAMFILES\Inno Setup\ISetup.hlp
2) map F2 :silent ! start  %PROGRAMFILES%\Inno Setup\ISetup.hlp
3) let isshelp = $PROGRAMFILES.\\Inno Setup\\ISetup.hlp
   map F2 :silent ! start  isshelp

However, they all fail:

1) :echo $PROGRAMFILES displays the correct page, but the above command
simply tries to run $PROGRAMFILES as a literal string

2) Each % expands to the source filename rather than being recognized as an
environmental variable

3) isshelp contains the correct string, but it's output literally rather
than treated as a variable


Like I said, I know this is a pitiful problem, but I'm running out of ideas.
 What am I doing wrong?

--
Jared


  
   :exe 'silent ! start  ' . $PROGRAMFILES . '\Inno 
Setup\Isetup.hlp'



Best regards,
Tony.


Re: using variables in ! command

2006-05-17 Thread Jared
On 5/18/2006 12:31 AM, A.J.Mechelynck wrote:
 :exe 'silent ! start  ' . $PROGRAMFILES . '\Inno Setup\Isetup.hlp'

That did it!

Thanks a bunch, Tony.

--
Jared


Re: ctrl+shift key mappings

2006-05-17 Thread A.J.Mechelynck

Jared wrote:

Ok, this will be my last question for the night (promise!).  I'd like to map
separate commands to Ctrl-C and Ctrl-Shift-C.  I've tried a couple different
ways to do it, but this one seems like it should be most correct:

vnoremap C-c +y
vnoremap C-S-c ^Gol+y

What's happening, though, is that the C-S-c map overwrites the C-c map.  If
I were to place C-c below C-S-c in .vimrc, the it'd be the other way around.

So, two questions: 1) Am I defining the C-S-c mapping correctly?  I
believe that's how it's done, but I couldn't find a specific example in the
docs.  2) How do I make Vim distinguish between the two commands?

Actually, I also have a 3rd, pseudo-related question:  How do I include a
control key sequence in a map?  I'm using ^G in the above example, but that
seems to be completely ignored when I hit C-S-c.  I also tried C-g, but
that's also ignored.

Thanks once again.  Believe me when I say that I'm most appreciative of the
help that's constantly offered on this mailing list.

--
Jared


  
You're out of luck there: Ctrl-Shift-C and Ctrl-C both correspond to 
0x03, Vim cannot tell them apart. Similarly for Ctrl + any letter key 
with or without Shift. Vim _can_ distinguish, let's say, Ctrl-F5 and 
Ctrl-Shift-F5 because those are represented differently in its input 
stream. Provided of course that a window manager doesn't intercept those 
key sequences before Vim has a chance to see them (mine does :-( ).


You ought to be able to include C-G (or C-g) in a mapping, see 
:help  for examples. But of course if that mapping is overridden by 
another with identical (or equivalent) {lhs}, you won't see it.



Best regards,
Tony.


Vim in combination with OpenVMS

2006-05-17 Thread Jansen of Lorkeers, Richard
I have a general question concerning installation of VIM on a OpenVMS
systems. Who has experience with the installation of the software?

Richard


I sometimes have to double strike when using gvim7 over Hummingbird Exceed

2006-05-17 Thread Mun Johl
Hi,

This probably isn't a gvim issue, but I thought I'd ask the community for
input since other avenues have not yet yielded positive results.

Here's the issue: I am using Hummingbird Exceed 2006 to log into my Sun
Sparc Solaris 8 system.  From there, I am opening a gvim window which
was compiled using the gtk libraries.  On the Solaris system, it works
fine.  But when using gvim through exceed, I get an odd behavior: I
often have to enter each character twice in order for it to show up in
the window.  And sometimes gvim will take that as a multi-bye character.

I don't know if this is a gvim issue, Exceed issue, gtk issue, or what;
but since the application works fine on the Solaris system itself, I
thought blaming Exceed would be the logical choice.  But I have not yet
been able to give Hummingbird sufficient data to track down the problem.

Also note that if I compile gvim using Motif libraries instead of gtk,
then a gvim window opened through Exceed works correctly.

Anyone ever see anything like this?  Or have any ideas towards a
solution?

Thanks in advance.

Best regards,

-- 
Mun


Re: ctrl+shift key mappings

2006-05-17 Thread Eric Arnold

On 5/17/06, Jared [EMAIL PROTECTED] wrote:

Ok, this will be my last question for the night (promise!).  I'd like to map
separate commands to Ctrl-C and Ctrl-Shift-C.  I've tried a couple different
ways to do it, but this one seems like it should be most correct:

vnoremap C-c +y
vnoremap C-S-c ^Gol+y


Sorry, but I don't think there is a shift-control-c.  This is [partly]
because control chars are treated as a single byte, whereas other
keyboard keys, like arrows, etc, are treated as 3-6 byte strings where
the extra modifiers like shit/control/meta are in another byte.



What's happening, though, is that the C-S-c map overwrites the C-c map.  If
I were to place C-c below C-S-c in .vimrc, the it'd be the other way around.

So, two questions: 1) Am I defining the C-S-c mapping correctly?  I
believe that's how it's done, but I couldn't find a specific example in the
docs.  2) How do I make Vim distinguish between the two commands?

Actually, I also have a 3rd, pseudo-related question:  How do I include a
control key sequence in a map?  I'm using ^G in the above example, but that
seems to be completely ignored when I hit C-S-c.  I also tried C-g, but
that's also ignored.



c-g is the correct method.  Something else must be happening.


Thanks once again.  Believe me when I say that I'm most appreciative of the
help that's constantly offered on this mailing list.

--
Jared



Re: using variables in ! command

2006-05-17 Thread Eric Arnold

This might have failed because of context.  If you used g:isshelp,
then it would probably be recognized, though I don't know the rest of
the situation.

On 5/17/06, Jared [EMAIL PROTECTED] wrote:

On 5/18/2006 12:08 AM, Yakov Lerner wrote:
 Try

 map F2 :exe :silent! start .isshelp cr

Thanks for the reply, Yakov.  However, that gives me an error message:

E121: Undefined variable: isshelp
E15: Invalid expression:silent! start .isshelp

Any other ideas?

--
Jared