Re: Can't get imap to work in Vim 7

2006-11-28 Thread A.J.Mechelynck

Sean Lerner wrote:

Hello,

I'd like to toggle line number on and off in Vim 7. I've set:

map  :set invnumber 
imap  :set invnumber li

[...]

:imap  :set invnumber


see ":help i_CTRL-O"


Best regards,
Tony.


Re: change case on multiple words

2006-11-28 Thread A.J.Mechelynck

zzapper wrote:
[...]

Tony
is \0 always same as & ?


yes, if 'magic' is TRUE, see ":help sub-replace-special". If ever you set 
'nomagic' (not recommended), then & will replace with an & character while \0 
still means the whole matched pattern.



Best regards,
Tony.


Re: How to avoid highlighting identifiers as misspelt words?

2006-11-28 Thread panshizhu
news <[EMAIL PROTECTED]> 写于 2006-11-28 21:18:55:
>  I'd like to know if there is a way to tell Vim to recognize identifiers
> occurring inside the comments/strings in source code as being valid
words.
> E.g. if I have
>
> // function foo() does whatever it does
> ~~~
> void foo() { ... }
>
> and "spell" option is on, the first "foo" is highlighted as a misspelt
word
> as indicated above (the second one isn't as spell checking is done only
inside
> comments and strings (which is good, but not quite enough)). Is there any
way
> to ignore all identifiers for spell checking? E.g. ignore all words
occurring
> outside of comments/strings in the same buffer or maybe all identifiers
from
> the tags file or maybe something even better which I didn't think of?
>
>  Thanks in advance for any ideas,

Generally, it is not a good practice to use // or /* */ to comment out
codes. (a better approach might be "#if 0" and "#endif"), so if you use #if
0 there would not be problem.

If you just want all identifiers to be valid word, there has been somewhere
a method to permenantly add all identifiers in a tags file to your
dictionary. But it is inconvinient, since tags file will change frequently,
and you may want to use different tags file with different project.

--
Sincerely, Pan, Shi Zhu. ext: 2606

Re: Encryption issue with Gvim 7 on Windows XP!

2006-11-28 Thread [EMAIL PROTECTED]

On 28/11/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote:


Life Jazzer wrote:

> I am using GVim version 7.0 on Microsoft Windows XP box. I have a question
> regarding Vim capability to encrypt a text file (the :X command).
>
> These are steps how I create the encrypted text file:
> - I fire up Vim ;
> - Type :X and enter an encryption key twice ;
> - Type some text ;
> - Write the buffer into a file with :w encrypted_text.txt ;
> - Quit Vim with :q ;
>
> When I fire up Vim back and type :e encrypted_text.txt, it sweetly prompts me
> for the encryption key to read the content.
>
> The problem is when I open the from Windows Explorer by right clicking on the
> file and choose `Edit with Vim` from the popped menu, Vim display the content
> of the file in plain text without prompting for the encryption key that was
> set to the text file.
>
> I checked gui_w32.txt file and read about adding `Edit with Vim` entry via
> registry. I do not see any parameters were set in there so I assumed, choosing
> `Edit with Vim` is simple running `gvim.exe file_name.ext`. So, I manually try
> running `gvim.exe encrypted_text.txt` from console and yes, it DOES NOT prompt
> me for encryption key and the content of the file is displayed in plain text.
>
> Curios about this issue, I switch to my GNU/Linux box (Slackware 10.2 with the
> vim-6.8). I recreate the encrypted_text.txt and by running the command
> `gvim encrypted_text.txt` from console, it DOES PROMPT me efor the encryption
> key to view the content.
>
> I have asked folks in #vim on Freenode and one of them said that when they do
> the same thing as I've described here, it DOES prompt for the encryption key.
>
> My questions are:
> - Is it a `feature`? :) ;
> - Any idea what possibly could cause this if it is not a `feature`?
>
> Many thanks in advanced if any Vim enlightened user would share some
> knowledge.

It works fine for me.  Perhaps you have something in your startup
scripts that prevents the prompt from showing up.  Try running "gvim -u
NONE thefile".  If it works OK then, put a "finish" command in various
positions in your _vimrc or remove plugins to find out which one causes
the problem.

--
FATHER:Who are you?
PRINCE:I'm ... your son ...
FATHER:Not you.
LAUNCELOT: I'm ... er ... Sir Launcelot, sir.
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///



Hi, folks!

Regarding my question previously why Vim does not prompt for encryption when
opening via `Edit with Vim` option available by right click on the file from
Windows Explorer, I think I have found out why.

In my _vimrc file, I put a line to remove the toolbar by running
`:emenu Edit.Global Settings.Toggle Toolbar` command instead of
`set guioptions-=T` command. Removing this line makes Vim prompt for the file
encryption key while opening an encrypted file. Is this really how Vim is
expected to act in this situation?

Well, that just solved the problem of which Vim does not prompt for encryption
key. Regarding Vim display the content of the encrypted file without prompting
for encryption key, may be it's just something I did though I don't know what.
I decide so because when I try to reproduce the situation, it does not show
the content of the encrypted file in plain text. I apologize for this false
report.

Many thanks for the response.


RE: different format in NEdit and GVIM

2006-11-28 Thread Belinda Zeng
 Thank you Yakov! That certainly works!
Belinda


-Original Message-
From: Yakov Lerner [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 28, 2006 3:28 PM
To: Belinda Zeng
Cc: Vim List
Subject: Re: different format in NEdit and GVIM

>   :verbose ts?
This shall be
   :verbose set ts?


Re: different format in NEdit and GVIM

2006-11-28 Thread Yakov Lerner

  :verbose ts?

This shall be
  :verbose set ts?


Re: different format in NEdit and GVIM

2006-11-28 Thread Yakov Lerner

On 11/28/06, Belinda Zeng <[EMAIL PROTECTED]> wrote:


Hi, all,
  I am using both NEdit and VIM, and set the tab spacing for both
editors to 3. However, if I edit a file using NEdit, which looks fine
under NEdit, then open with GVIM, I am seeing all tabs become 8
characters.
  Wondering if anyone has seen the same behavior? Is this a NEdit
problem or a VIM problem?


Apparently you did not set vim tab spacing to 3 yet(:set ts=3 in your
~/.vimrc). Alghough you apparently think that you already did :-).
Try this:
1.add this command to your ~/.vimrc:
 :set ts=3
2. Check your setting"
 :verbose ts?
the expected value is 3. If you see 8, then you did not set ts to 3 yet.

vim has many more tab-related options. Try :options and go to section
15 tabs and indenting.

Yakov


Re: I look for php abbreviations configuration script...

2006-11-28 Thread Peter Hodge
Hello,

I haven't heard of any PHP abbreviations script, you could perhaps search
vim.org for scripts related to PHP.  Perhaps you are looking for these
commands?

  filetype plugin on
  filetype indent on
  syntax on

regards,
Peter




--- KLEIN Stéphane <[EMAIL PROTECTED]> wrote:

> 2006/11/28, Peter Hodge <[EMAIL PROTECTED]>:
> > Hello,
> >
> > What does a 'php abbreviations configuration script' do?
> >
> > regards,
> > Peter
> >
> >
> > --- KLEIN Stéphane <[EMAIL PROTECTED]> wrote:
> >
> > > Hello,
> > >
> > > I look for php abbreviations configuration script. There aren't ?
> 
> It's some line to add in my .vimrc file to define some php abbreviations.
> 
> Sorry if my request isn't unequivocal.
> 
> Regards,
> Stephane
> 


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


Re: Text Swapper Utility

2006-11-28 Thread David Rayner
Chip
Thanx I think that will surely save my pinkies a lot of work

nmap  gw"_yiw:s/\(\%#\w\+\)\(\_W\+\)\(\w\+\)/\3\2\1/

I've selected the variant which words across line ends

zzapper

Date sent:  Mon, 27 Nov 2006 16:25:50 -0500
From:   Charles E Campbell Jr <[EMAIL PROTECTED]>
To: zzapper <[EMAIL PROTECTED]>
Copies to:  vim@vim.org
Subject:Re: Text Swapper Utility

> zzapper wrote:
> 
> >Hi,
> >Apparently in emacs there is a meta-command with allows you to swap text on 
> >either side of a non-alphanumeric character. Now I know how to do this in 
> >Vim with a regexp or with markers and yanking. But does anyone know of 
> >anything more elegant?
> >
> >Also to extend to a more general case, swap any A with any Text B
> >
> >
> >  
> >
> http://vim.sourceforge.net/tips/tip.php?tip_id=329 : "A map for swapping 
> words"
> 
> There's some additional tips for swapping some other things, too.  Now, 
> as for
> swapping any A for any B: see
> 
> http://mysite.verizon.net/astronaut/vim/index.html#VISSWAP
> 
> Regards,
> Chip Campbell
> 
> 
> 





Re: change case on multiple words

2006-11-28 Thread Charles E Campbell Jr

Gene Kwiecinski wrote:

I have a text with many quotations, that I want to change the case. 
Currently the text of the quote is in all caps. I want to change it to 
capitalize only the first letter of each word. The text I want to
   


(snip)


'&' is the matched pattern.  "\L&" will take the matched pattern and
lcase it all, then "\u&" will just ucase the initial letter of a word.
So each respective pass will be

WORDS TO INITCAPoriginally
words to initcapafter lcasing it all
Words To Initcapafter the initcap

Someone here might have a more elegant way of doing it, but I've done it
this way in the past for so long it's practically a macro to me.

Fwiw:

\L  lcase everything
\l  lcase initial letter of each word
\U  ucase everything
\u  ucase initial letter of each word
 



What I use:

vno   ft   :B s/\<\(\S\)\(\S*\)\>/\u\1\L\2\E/g

This is a vmap, so use it with visual mode (V, v, or ctrl-v).  Plus, it 
uses my :B command, which restricts substitutes to just the visually 
highlighted region.  That  map is available as part of vis.vim, itself 
available at:


   http://mysite.verizon.net/astronaut/vim/index.html#VIS

or a more stable version from:

   http://vim.sourceforge.net/scripts/script.php?script_id=1195

Regards,
Chip Campbell




different format in NEdit and GVIM

2006-11-28 Thread Belinda Zeng
 
Hi, all,
  I am using both NEdit and VIM, and set the tab spacing for both
editors to 3. However, if I edit a file using NEdit, which looks fine
under NEdit, then open with GVIM, I am seeing all tabs become 8
characters.
  Wondering if anyone has seen the same behavior? Is this a NEdit
problem or a VIM problem?
thank you very much!
Belinda


Re: Calendar ?

2006-11-28 Thread Charles E Campbell Jr

Charles E Campbell Jr wrote:


Bill McCarthy wrote:


(snip -- discussion concerning having calendar.vim in AsNeeded)


Are \cal and \caL not defined when the plugin is in
AsNeeded?  (If you move it there, don't forget to do a
MkAsNeeded and, if you are not using the latest version of
AsNeeded, source plugin/ANtags.vim.)

BTW, I split plugin/calendar.vim into:

   plugin/calendarPlugin.vim
   autoload/calendar.vim

This give a nice small footprint for the plugin and thus
obviates the need for placing the original in AsNeeded.
 

AsNeeded doesn't set up transparent map use; my reasoning is that one 
may wish
to have several plugins which have conflicting maps.  Often one only 
wants to
run one such plugin at a time.  In particular, the cvscommand plugin 
and Calendar
have conflicting maps.  If I had AsNeeded attempt to set up 
transparent map use,
then AsNeeded would "inherit" the conflicting map problem and issue 
complaints

at startup.


BTW, here's what I use in my <.vimrc> to allow cvscommand and Calendar 
to co-exist:


" cvscommand {{{2
nmap cva CVSAdd
nmap cvn CVSAnnotate
nmap cvc CVSCommit
nmap cvd CVSDiff
nmap cve CVSEdit
nmap cvi CVSEditors
nmap cvg CVSGotoOriginal
nmap cvG CVSGotoOriginal!
nmap cvl CVSLog
nmap cvr CVSReview
nmap cvs CVSStatus
nmap cvt CVSUnedit
nmap cvu CVSUpdate
nmap cvv CVSVimDiff
nmap cwv CVSWatchers
nmap cwa CVSWatchAdd
nmap cwn CVSWatchOn
nmap cwf CVSWatchOff
nmap cwr CVSWatchRemove

" calendar {{{2
nmap cal :unmap calunmap cahnmap 
cal CalendarVnmap cah 
CalendarHcall Calendar(0)
nmap cah :unmap calunmap cahnmap 
cal CalendarVnmap cah 
CalendarHcall Calendar(1)


Both of these plugins reside in my AsNeeded directory.

Regards,
Chip Campbell




Re: sorting columns alphabetically

2006-11-28 Thread Charles E Campbell Jr

[EMAIL PROTECTED] wrote:


Quoting Vim Visual <[EMAIL PROTECTED]>:

 


I have a text file like

Mr Bla Blo
Ms Ble Blu
Dr Bli Blu
etc

and I would like to sort the file alphabetically after the surname
(3rd column). How can I do that? I know how to sort it after the first
one (visual + !sort)
   



May I suggest looking at "How to sort using visual blocks" at:

http://vim.sourceforge.net/tips/tip.php?tip_id=588
 

In addition, are your firstnames always just three letters long?  If 
they vary in length, then are they
already padded so that you actually have columns?  If they're not, then 
you might want to use the
\tsp map in AlignMaps.vim to get them lined up.  See 
http://vim.sourceforge.net/scripts/script.php?script_id=294 .


Regards,
Chip Campbell



Can't get imap to work in Vim 7

2006-11-28 Thread Sean Lerner

Hello,

I'd like to toggle line number on and off in Vim 7. I've set:

map  :set invnumber 
imap  :set invnumber li

And I am able to toggle line numbers when in command mode, but not when 
in insert mode.


When I do press F11 on my keyboard in insert mode, it just types out .

I've tested these settings on a different server running Vim 6.3.71 and 
they work okay.


I've tried mapping other things using imap in Vim 7, but they don't work 
either.


Any thoughts?

thanks,

Sean



Re: Calendar ?

2006-11-28 Thread Charles E Campbell Jr

Bill McCarthy wrote:


(snip -- discussion concerning having calendar.vim in AsNeeded)


Are \cal and \caL not defined when the plugin is in
AsNeeded?  (If you move it there, don't forget to do a
MkAsNeeded and, if you are not using the latest version of
AsNeeded, source plugin/ANtags.vim.)

BTW, I split plugin/calendar.vim into:

   plugin/calendarPlugin.vim
   autoload/calendar.vim

This give a nice small footprint for the plugin and thus
obviates the need for placing the original in AsNeeded.
 

AsNeeded doesn't set up transparent map use; my reasoning is that one 
may wish
to have several plugins which have conflicting maps.  Often one only 
wants to
run one such plugin at a time.  In particular, the cvscommand plugin and 
Calendar
have conflicting maps.  If I had AsNeeded attempt to set up transparent 
map use,
then AsNeeded would "inherit" the conflicting map problem and issue 
complaints

at startup.

Regards,
Chip Campbell







RE: change case on multiple words

2006-11-28 Thread Gene Kwiecinski
>I have a text with many quotations, that I want to change the case. 
>Currently the text of the quote is in all caps. I want to change it to 
>capitalize only the first letter of each word. The text I want to
change 
>can be either a single word, multiple words on a single line, or 
>multiple words on multiple line, as follows:

If you know the beginning/ending lines (absolute numbers, marks, etc.),
you can do

:'m,'ns/.*/\L&/gp   marks 'm' and 'n' set
previously
:'m,'ns/.*/\u&/gp

:10,50s/.*/\L&/gp   absolute linenos 10
through 50 inclusive
:10,50s/.*/\u&/gp

etc.

'&' is the matched pattern.  "\L&" will take the matched pattern and
lcase it all, then "\u&" will just ucase the initial letter of a word.
So each respective pass will be

WORDS TO INITCAPoriginally
words to initcapafter lcasing it all
Words To Initcapafter the initcap

Someone here might have a more elegant way of doing it, but I've done it
this way in the past for so long it's practically a macro to me.

Fwiw:

\L  lcase everything
\l  lcase initial letter of each word
\U  ucase everything
\u  ucase initial letter of each word

Hth.


Re: Encryption issue with Gvim 7 on Windows XP!

2006-11-28 Thread Bram Moolenaar

Life Jazzer wrote:

> I am using GVim version 7.0 on Microsoft Windows XP box. I have a question
> regarding Vim capability to encrypt a text file (the :X command).
> 
> These are steps how I create the encrypted text file:
> - I fire up Vim ;
> - Type :X and enter an encryption key twice ;
> - Type some text ;
> - Write the buffer into a file with :w encrypted_text.txt ;
> - Quit Vim with :q ;
> 
> When I fire up Vim back and type :e encrypted_text.txt, it sweetly prompts me
> for the encryption key to read the content.
> 
> The problem is when I open the from Windows Explorer by right clicking on the
> file and choose `Edit with Vim` from the popped menu, Vim display the content
> of the file in plain text without prompting for the encryption key that was
> set to the text file.
> 
> I checked gui_w32.txt file and read about adding `Edit with Vim` entry via
> registry. I do not see any parameters were set in there so I assumed, choosing
> `Edit with Vim` is simple running `gvim.exe file_name.ext`. So, I manually try
> running `gvim.exe encrypted_text.txt` from console and yes, it DOES NOT prompt
> me for encryption key and the content of the file is displayed in plain text.
> 
> Curios about this issue, I switch to my GNU/Linux box (Slackware 10.2 with the
> vim-6.8). I recreate the encrypted_text.txt and by running the command
> `gvim encrypted_text.txt` from console, it DOES PROMPT me efor the encryption
> key to view the content.
> 
> I have asked folks in #vim on Freenode and one of them said that when they do
> the same thing as I've described here, it DOES prompt for the encryption key.
> 
> My questions are:
> - Is it a `feature`? :) ;
> - Any idea what possibly could cause this if it is not a `feature`?
> 
> Many thanks in advanced if any Vim enlightened user would share some
> knowledge.

It works fine for me.  Perhaps you have something in your startup
scripts that prevents the prompt from showing up.  Try running "gvim -u
NONE thefile".  If it works OK then, put a "finish" command in various
positions in your _vimrc or remove plugins to find out which one causes
the problem.

-- 
FATHER:Who are you?
PRINCE:I'm ... your son ...
FATHER:Not you.
LAUNCELOT: I'm ... er ... Sir Launcelot, sir.
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


How to avoid highlighting identifiers as misspelt words?

2006-11-28 Thread Vadim Zeitlin
 Hello,

 I'd like to know if there is a way to tell Vim to recognize identifiers
occurring inside the comments/strings in source code as being valid words.
E.g. if I have

// function foo() does whatever it does
~~~
void foo() { ... }

and "spell" option is on, the first "foo" is highlighted as a misspelt word
as indicated above (the second one isn't as spell checking is done only inside
comments and strings (which is good, but not quite enough)). Is there any way
to ignore all identifiers for spell checking? E.g. ignore all words occurring
outside of comments/strings in the same buffer or maybe all identifiers from
the tags file or maybe something even better which I didn't think of?

 Thanks in advance for any ideas,
VZ




Re: I look for php abbreviations configuration script...

2006-11-28 Thread KLEIN Stéphane

2006/11/28, Peter Hodge <[EMAIL PROTECTED]>:

Hello,

What does a 'php abbreviations configuration script' do?

regards,
Peter


--- KLEIN Stéphane <[EMAIL PROTECTED]> wrote:

> Hello,
>
> I look for php abbreviations configuration script. There aren't ?


It's some line to add in my .vimrc file to define some php abbreviations.

Sorry if my request isn't unequivocal.

Regards,
Stephane


Re: an uncomfortable thing

2006-11-28 Thread Christian J. Robinson
On Tue, 28 Nov 2006, Ronald wrote:

> But here is a problem, when I want to enter something like:
> 
> (test)
> 
> I will enter the parentheses first

Try putting this in your vimrc:

function! s:ParenBack(type)
if getline('.')[col('.')-3] == a:type
return "\"
endif
return ""
endfunction

inoremap ) )=ParenBack('(')
inoremap ] ]=ParenBack('[')
inoremap } }=ParenBack('{')


Basically, this jumps your cursor left one character if you type a
closing parenthesis/bracket and there's nothing between it the
matching bracket, otherwise it leaves your cursor position alone.

There are other auto-bracketing scripts on  but I don't
use any of them so I can't recommend one.

You could add a mapping for > as well:
inoremap > >=ParenBack('<')


- Christian

-- 
Life is like a diaper -- short and loaded.
Christian J. Robinson <[EMAIL PROTECTED]> http://infynity.spodzone.com/
   PGP keys: 0x893B0EAF / 0xFB698360   http://infynity.spodzone.com/pgp


Re: Encryption issue with Gvim 7 on Windows XP!

2006-11-28 Thread A.J.Mechelynck

[EMAIL PROTECTED] wrote:

Here are the :version result on Windows:

VIM - Vi IMproved 7.0 (2006 May 7, compiled May  7 2006 16:23:43)
MS-Windows 32 bit GUI version with OLE support
Compiled by [EMAIL PROTECTED]


That would be 7.0.000. The current version is 7.0.186, distributed on or 
shortly before 21-Nov-2006.




I cannot give the result of version of Vim installed on my Slackware
box but it is the default package that shipped with Slackware 10.2.
I've just check at Slackware site and actually it is vim-6.3.086, not
6.8 as I've mentioned previously. Sorry for the mistake.



Since vim 6.3.086, there has been:
6.3.087 to 6.3.090  4
6.4.000 to 6.4.010  11
7.0.000 to 7.0.168  169
i.e. 184 newer builds not including alpha and beta versions. And yet 7.0.000 
apparently has a bug or a regression not found in 6.3.086? I wonder how that 
got introduced, and whether it got fixed since then. You may want to check either


http://ftp.vim.org/pub/vim/patches/6.3/README
http://ftp.vim.org/pub/vim/patches/6.4/README
http://pub.vim.org/pub/vim/patches/7.0/README

or

http://ftp.vim.org/pub/vim/runtime/doc/version6.txt
http://ftp.vim.org/pub/vim/runtime/doc/version7.txt


Oh, one thing: does it change anything when you invoke Vim 7 as

gvim --cmd "set key=" encrypted_text.txt

If it does, then inspect your vimrc (and the system vimrc if any) for anything 
that might imply that 'key' has been set to a nonempty value, including a 
blank value.



Best regards,
Tony.


Re: change case on multiple words

2006-11-28 Thread zzapper
"A.J.Mechelynck" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 


>  guu:s/\<./\u\0/g

A pastable or mappable version

:s/.*/\L&/|:s/\<./\u&/g

" .vimrc titlise a line
nmap ,t :s/.*/\L&/:s/\<./\u&/g

Tony
is \0 always same as & ?


-- 
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips



Re: Encryption issue with Gvim 7 on Windows XP!

2006-11-28 Thread [EMAIL PROTECTED]

Here are the :version result on Windows:

VIM - Vi IMproved 7.0 (2006 May 7, compiled May  7 2006 16:23:43)
MS-Windows 32 bit GUI version with OLE support
Compiled by [EMAIL PROTECTED]

I cannot give the result of version of Vim installed on my Slackware
box but it is the default package that shipped with Slackware 10.2.
I've just check at Slackware site and actually it is vim-6.3.086, not
6.8 as I've mentioned previously. Sorry for the mistake.

On 28/11/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:

[EMAIL PROTECTED] wrote:
> Hi, folks!
>
> I am using GVim version 7.0 on Microsoft Windows XP box. I have a question
> regarding Vim capability to encrypt a text file (the :X command).
>
> These are steps how I create the encrypted text file:
> - I fire up Vim ;
> - Type :X and enter an encryption key twice ;
> - Type some text ;
> - Write the buffer into a file with :w encrypted_text.txt ;
> - Quit Vim with :q ;
>
> When I fire up Vim back and type :e encrypted_text.txt, it sweetly
> prompts me
> for the encryption key to read the content.
>
> The problem is when I open the from Windows Explorer by right clicking
> on the
> file and choose `Edit with Vim` from the popped menu, Vim display the
> content
> of the file in plain text without prompting for the encryption key that was
> set to the text file.
>
> I checked gui_w32.txt file and read about adding `Edit with Vim` entry via
> registry. I do not see any parameters were set in there so I assumed,
> choosing
> `Edit with Vim` is simple running `gvim.exe file_name.ext`. So, I
> manually try
> running `gvim.exe encrypted_text.txt` from console and yes, it DOES NOT
> prompt
> me for encryption key and the content of the file is displayed in plain
> text.
>
> Curios about this issue, I switch to my GNU/Linux box (Slackware 10.2
> with the
> vim-6.8). I recreate the encrypted_text.txt and by running the command
> `gvim encrypted_text.txt` from console, it DOES PROMPT me efor the
> encryption
> key to view the content.
>
> I have asked folks in #vim on Freenode and one of them said that when
> they do
> the same thing as I've described here, it DOES prompt for the encryption
> key.
>
> My questions are:
> - Is it a `feature`? :) ;
> - Any idea what possibly could cause this if it is not a `feature`?
>
> Many thanks in advanced if any Vim enlightened user would share some
> knowledge.
>

Which version and patchlevel are your Windows Vim and your Linux Vim? (as
obtained from the first five lines of the ":version" output, or from the
second non-blank line in the ":intro" screen)

There never was a Vim 6.8 so that cannot be the actual "Vim" version of your
Slackware Vim.


Best regards,
Tony.



Re: Encryption issue with Gvim 7 on Windows XP!

2006-11-28 Thread A.J.Mechelynck

[EMAIL PROTECTED] wrote:

Hi, folks!

I am using GVim version 7.0 on Microsoft Windows XP box. I have a question
regarding Vim capability to encrypt a text file (the :X command).

These are steps how I create the encrypted text file:
- I fire up Vim ;
- Type :X and enter an encryption key twice ;
- Type some text ;
- Write the buffer into a file with :w encrypted_text.txt ;
- Quit Vim with :q ;

When I fire up Vim back and type :e encrypted_text.txt, it sweetly 
prompts me

for the encryption key to read the content.

The problem is when I open the from Windows Explorer by right clicking 
on the
file and choose `Edit with Vim` from the popped menu, Vim display the 
content

of the file in plain text without prompting for the encryption key that was
set to the text file.

I checked gui_w32.txt file and read about adding `Edit with Vim` entry via
registry. I do not see any parameters were set in there so I assumed, 
choosing
`Edit with Vim` is simple running `gvim.exe file_name.ext`. So, I 
manually try
running `gvim.exe encrypted_text.txt` from console and yes, it DOES NOT 
prompt
me for encryption key and the content of the file is displayed in plain 
text.


Curios about this issue, I switch to my GNU/Linux box (Slackware 10.2 
with the

vim-6.8). I recreate the encrypted_text.txt and by running the command
`gvim encrypted_text.txt` from console, it DOES PROMPT me efor the 
encryption

key to view the content.

I have asked folks in #vim on Freenode and one of them said that when 
they do
the same thing as I've described here, it DOES prompt for the encryption 
key.


My questions are:
- Is it a `feature`? :) ;
- Any idea what possibly could cause this if it is not a `feature`?

Many thanks in advanced if any Vim enlightened user would share some 
knowledge.




Which version and patchlevel are your Windows Vim and your Linux Vim? (as 
obtained from the first five lines of the ":version" output, or from the 
second non-blank line in the ":intro" screen)


There never was a Vim 6.8 so that cannot be the actual "Vim" version of your 
Slackware Vim.



Best regards,
Tony.


Encryption issue with Gvim 7 on Windows XP!

2006-11-28 Thread [EMAIL PROTECTED]

Hi, folks!

I am using GVim version 7.0 on Microsoft Windows XP box. I have a question
regarding Vim capability to encrypt a text file (the :X command).

These are steps how I create the encrypted text file:
- I fire up Vim ;
- Type :X and enter an encryption key twice ;
- Type some text ;
- Write the buffer into a file with :w encrypted_text.txt ;
- Quit Vim with :q ;

When I fire up Vim back and type :e encrypted_text.txt, it sweetly prompts me
for the encryption key to read the content.

The problem is when I open the from Windows Explorer by right clicking on the
file and choose `Edit with Vim` from the popped menu, Vim display the content
of the file in plain text without prompting for the encryption key that was
set to the text file.

I checked gui_w32.txt file and read about adding `Edit with Vim` entry via
registry. I do not see any parameters were set in there so I assumed, choosing
`Edit with Vim` is simple running `gvim.exe file_name.ext`. So, I manually try
running `gvim.exe encrypted_text.txt` from console and yes, it DOES NOT prompt
me for encryption key and the content of the file is displayed in plain text.

Curios about this issue, I switch to my GNU/Linux box (Slackware 10.2 with the
vim-6.8). I recreate the encrypted_text.txt and by running the command
`gvim encrypted_text.txt` from console, it DOES PROMPT me efor the encryption
key to view the content.

I have asked folks in #vim on Freenode and one of them said that when they do
the same thing as I've described here, it DOES prompt for the encryption key.

My questions are:
- Is it a `feature`? :) ;
- Any idea what possibly could cause this if it is not a `feature`?

Many thanks in advanced if any Vim enlightened user would share some knowledge.


Re: an uncomfortable thing

2006-11-28 Thread panshizhu
Ronald <[EMAIL PROTECTED]> 写于 2006-11-28 13:30:27:
> I am new.
> Usually when I am in command mode (I mean when I pressed ESC), the
> cursor shape becomes a block, it is well that when I press `i' or `a'
> the cursor will become a bar at the left or right side of the block.
> But here is a problem, when I want to enter something like:
> (test)
> I will enter the parentheses first, then I need simple key stokes to
> back one letter like:
>
> control oh or control oi

Just press the  key will to the trick.

So you may want to map () to ()

HTH
--
Sincerely, Pan, Shi Zhu. ext: 2606