Re: can't diffsplit

2007-06-01 Thread Eric Leenman

I'm having the same problem, and the three solutions don't work for me.
In all the three solutions (and even the other thread I started with
your reply windo diffthis) doesn't work.
What happens is that one window folds the complete file to one line.
The other window keeps the file open as it was.

Is this normal vim diffthis behaviour?
I was expecting somekind of Winmerge behaviour.

Rgds,
Eric


I. To diff one file already being edited with another file not being edited:

1. make the file already being edited current (let's say foo.txt)
2. :vertical diffsplit bar.txt

II. To diff two files already being edited:

1. make one file current
2. :diffthis
3. make the other file current
4. :diffthis
5. (Optional) Rearrange the windows (using ^W commands) to place them
side-by-side.

III. To diff (in an existing Vim, but in new windows) two files not being edited

1. :bot new foo.txt
2. :vert diffsplit bar.txt



starting a second vim session in diff mode from out first vim

2007-05-31 Thread Eric Leenman

Hi,

Is it possible from a first gvim session to init a second gvim session
in diff mode?
And this diff mode should then use the two files that are used in the
first gvim session?

So if A.TXT and B.TXT are used in the first, the second should show
the difference in the second gvim session?

Rgds,
Eric


CLTR-N and enter

2007-04-17 Thread Eric Leenman

Hi,

I'm using gvim 7.0 the word-completion function activated by CTRL-N.
When selecting the right word by pressing CTRL-N to step trough the list I 
select the wanted word with pressing enter.

This results in the right word, but also an extra carriage return.

Is it possible to select the right word with another key then the enter-key, 
and thus staying on the same line before CTRL-N was pressed at all?


Rgds,
Eric

_
Download Messenger. Join the i’m Initiative. Help make a difference today. 
http://im.live.com/messenger/im/home/?source=TAGHM_APR07




RE: Troubles configuring vim (multi-questions)

2007-04-13 Thread Eric Leenman

From: OnionKnight [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Troubles configuring vim (multi-questions)
Date: Thu, 12 Apr 2007 17:22:06 -0700 (PDT)


[deleted]


* I wanted the Home-button to act so that it first jumps to the first
non-whitespace character of the current line (i.e. skip the indentation) 
and
if Home is pressed when you're already at the first non-whitespace 
character

or before then it should jump to the real beginning of the line, column #1.
I made this function:
function! HomeKey ()
let c = col(.)
if c == 1
w
else
g0w
if col(.) = c
g0
endif
endif
endfunction
This doesn't want to work properly. It extends the command window and dumps
some code from the bottom of the .vimrc and then asks for pressing enter 
and

lastly jumps to line #180 in the same file. If c == 1 nothing happens, it
doesn't go all wild but that 'w' keypress isn't executed. Also I have
noticed that g0 doesn't really take you back to beginning of the line but
the beginning of the horizontal scroll. A problem, but it doesn't explain
why the code is acting crazy.

[deleted]


Try homeLikeVC++.vim from Luc Hermitte
Look at: 
http://hermitte.free.fr/vim/ressources/vimfiles/plugin/homeLikeVC++_vim.html



Rgds,
Eric

_
MSN is giving away a trip to Vegas to see Elton John.  Enter to win today. 
http://msnconcertcontest.com?icid-nceltontagline




Re: How to modify code so that only one space is between two characters or words?

2007-04-06 Thread Eric Leenman

[...]
You could use a Search/Replace on the full text.  This does end up 
modifying your base text, so be sure to only use it on modifiable buffers.

For example:
- all lines containing the char : followed with zero or more then one 
space(s) and then in

should become:  untouched what is here: in(untouched what is here
 aaa : in std_logic;
 bb : in std_logic_vector(7 downto 0);

:%s/: \+in/: in/g

or, if you want to overwrite all whitespace (spaces, tabs, other 
unprintable characters), use:


:%s/:\s\+in/: in/g


Thanks,

This works for all lines containing one or more spaces.
Why doesn't it work for lines which have no space between : and in?
So when it'saaa :in std_logic;

_
MSN is giving away a trip to Vegas to see Elton John.  Enter to win today. 
http://msnconcertcontest.com?icid-nceltontagline




How to modify code so that only one space is between two characters or words?

2007-04-05 Thread Eric Leenman

Hi

How to modify code so that only one space is between two characters or 
words?


For example:
- all lines containing the char : followed with zero or more then one 
space(s) and then in

should become:  untouched what is here: in(untouched what is here
 aaa : in std_logic;
 bb : in std_logic_vector(7 downto 0);

- all lines containing the word process followed with zero or more then one 
space(s) and then a (

should become:  untouched what is hereprocess (untouched what is here

process (clk,reset)
process (clk27)
proc_one : proccess (a,b,c)


Rgds,
Eric

_
Mortgage rates near historic lows. Refinance $200,000 loan for as low as 
$771/month* 
https://www2.nextag.com/goto.jsp?product=10035url=%2fst.jsptm=ysearch=mortgage_text_links_88_h27f8disc=yvers=689s=4056p=5117




Is it possible to source all scripts/plugins from VIM without leaving VIM?

2007-04-05 Thread Eric Leenman

Hi,

Is it possible to source all scripts/plugins from VIM without leaving VIM?
When experimenting with plugins, I now
1) modify plugin
2) start VIM
3) test plugin
4) detect an error
5) close VIM
6) goto 1)

And this loops then till I fix it or give up

I know you can type :source eric_plugin
But as the plugin name tested is can be every day different
Instead of remembering all the filenames is it possible to do a big bang 
call like:


map F12 source all plugins again

Rgds,
Eric

_
Need a break? Find your escape route with Live Search Maps. 
http://maps.live.com/?icid=hmtag3




RE: Folding Perl POD

2007-04-04 Thread Eric Leenman





From: Bill Moseley [EMAIL PROTECTED]

[...]


Is it possible to fold the =head1 or =item sections within a given
=head1 section?


--
Bill Moseley
[EMAIL PROTECTED]



I'm not sure what you want.
I don't know PERL

But this plugin helpt me defining my folds:
http://eigenclass.org/hiki/simplefold+plugin+0.4.0

There's a section specified for Ruby and Java,
I've copied that and tailored it for VHDL.
Rgds,
Eric

_
Mortgage rates near historic lows. Refinance $200,000 loan for as low as 
$771/month* 
https://www2.nextag.com/goto.jsp?product=10035url=%2fst.jsptm=ysearch=mortgage_text_links_88_h27f8disc=yvers=689s=4056p=5117




How to remove 2 or more empty lines when closing the the file?

2007-03-30 Thread Eric Leenman

Hi,

With the follwing subtitue it's possible to remove blocks of 3 empty lines
:%s/^\n\{3}//

How do you need to change it, so that it does remove blocks of 2, or more, 
empty lines?

And how do you give this command just before closing the file?

Rgds,
Eric

_
Get a FREE Web site, company branded e-mail and more from Microsoft Office 
Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/




SR with dynamic range

2007-03-26 Thread Eric Leenman

Hi,

In VHDL I many times need to change the following code:

component AAA
port (
i1 : in  std_ulogic;
i2 : in  std_ulogic;
o1 : out std_ulogic;
o2 : out std_ulogic);
end component AAA;


into:

inst_AAA :  AAA
port map (
i1 = in ,
i1 = in ,
o1 = out,
o2 = out,
o2 = out);


where:
- AAA is the variable name, so it can be anything:
- The number of in and outputs (here 2 inputs i1 and i2, and 2 outputs o1 
and o2) can be both from 1 till anything)



How to do this SR

Rgds,
Eric

_
Interest Rates near 39yr lows! $430,000 Mortgage for $1,399/mo - Calculate 
new payment 
http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9632-18466moid=7581




Re: SR with dynamic range

2007-03-26 Thread Eric Leenman

[deleted]


You may have to clarify.  I'm not sure how this mapping is taking
place.  It looks like you start with two inputs (i1 and i2)
and two outputs (o1, and o2) and you want to map them to two
inputs (i1 and i1 again) and *three* outputs (o1, o2, and
o2 again).


My stupidity
I've made two typo's:
It must be

component AAA
port (
i1 : in  std_ulogic;
i2 : in  std_ulogic;
o1 : out std_ulogic;
o2 : out std_ulogic);
end component AAA;

to become:

inst_AAA :  AAA
port map (
i1 = in ,
i2 = in ,
o1 = out,
o2 = out);


So questions would include:

-what governs when i2 becomes i1?


For SR simplyfing I've left the two in , and the two out  as 
text-placeholders

When the SR is done I need to manual change these.
For example, it would become

i1 = A ,
i2 = B ,
o1 = C,
o2 = D);


-what governs when/why o2 gets doubled?

This is my typo. It should have only one o2.



Otherwise, it looks like you may want something like

:','s/std_ulogic;/,
:*s/:/=

where you create the range by getting inside the parens and using
vi( to highlight the lines for those parens.  (In that 2nd one,
the asterisk is a short-hand notation for the ',', an
little-known or oft-overlooked feature of vim that I use fairly
regularly)


[deleted]


PS:  This is fun...I'm learning little bits of VHDL merely by
hanging out on a mailing list for a *text-editor* :)  Looks like
fun stuff.


Yes VHDL is fun.

_
5.5%* 30 year fixed mortgage rate. Good credit refinance. Up to 5 free 
quotes - *Terms 
https://www2.nextag.com/goto.jsp?product=10035url=%2fst.jsptm=ysearch=mortgage_text_links_88_h2a5ds=4056p=5117disc=yvers=910




Re: SR with dynamic range

2007-03-26 Thread Eric Leenman

[deleted]


component AAA
port (
i1 : in  std_ulogic;
i2 : in  std_ulogic;
o1 : out std_ulogic;
o2 : out std_ulogic);
end component AAA;

to become:

inst_AAA :  AAA
port map (
i1 = in ,
i2 = in ,
o1 = out,
o2 = out);



[deleted]


:','s/std_ulogic;/,
:*s/:/=



[deleted]
Tim,

Trying your answers I have the following questions/suggestions:
The second subtition std_ulogic is not always std_ulogic
Can you rewrite it that:
In this range:
- delete on every line everything after the :
- subtitute : with = ,
- place this on a smap F11 C-G: [here the Tim-genius stuff]

In selectemode then I can select the range and press F11 to do your magic.

Rgds,
Eric
A simple vimmer

_
Watch free concerts with Pink, Rod Stewart, Oasis and more. Visit MSN 
Presents today. 
http://music.msn.com/presents?icid=ncmsnpresentstaglineocid=T002MSN03A07001




How to cut, copy and paste the VIM-way

2007-03-25 Thread Eric Leenman

Hi,

I'm used to cut, copy and paste the windows-way.
Meaning, selecting text and then press CTRL-X, CTRL-C or CTRL-V.

In VIM (and correct me if I'm wrong) you
yank (y) for copy
put (p) for paste
. for cut

With this in mind, how to cut, copy and paste the VIM-way?
Because when I select text and see select-mode in the lowest line
and then press y, I see a letter y in my text and the selected text is gone.
How come?

Rgds,
Eric

_
Get a FREE Web site, company branded e-mail and more from Microsoft Office 
Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/




Re: Can you create file dependend fold markers

2007-03-24 Thread Eric Leenman

Tim thanks for your reply.
See embedded how far I got.

[...]
Can you create your own (VHDL) fold markers? (not sure if the terminolgy 
is OK)


For example I have VHDL-code like below:

component bufg
port (
  o : out std_ulogic;
  i : in std_ulogic);
end component;

And when I'm at the first line in normal-mode and give zc command (fold 
close) then I want to see it fold like:


+-- 5 lines: component bufg





  :set foldmarker=component\ bufg,end\ component
  :set foldmethod=marker

This assumes that component bufg always starts the block.  If bufg is 
some sort of variable/tag, you /can/ use




  :set foldmarker=component,end\ component


Yes, bufg is a variable. It can also be andport or multiplexer
This is working.
Can you create more foldmarkers?
For example, can I type:

:set foldmarker=component,end\ component
:set foldmarker=entity,end\ entity
:set foldmarker=process,end\ process

And should these then be stored in a foldmarker.vim file in my ftplugin 
directory?



[...]


Alternatively, with manual folding, you can force them by first clearing 
your folds (with zE) and then using something like


:g/^component\s\+\w+/,/^end component/fold

The use of regexps can give you more flexibility for nailing them down.  An 
advantage over some of the 'foldmethod's is that you can also create your 
own manual folds on top of this as desired.  This has a disadvantage that 
it doesn't refresh realtime, but the pairing (zE + the :g//) can be mapped 
to a single keypress to force a manual update if needed (though it will 
wipe out any other manually created folds).  If you have trouble 
understanding what the above is doing, drop a line and I'd be glad to 
explain it.


Yes please explain, as I get the message:
E486: Pattern not found ^component\s\+\w+



I tend to go with the latter as allows me to be very precise with my 
regexps and it also allows me to create manual folds in addition.


Hope this gives you some ideas to work with...

-tim


Yes it does, If I get the latter also working I can see which one is better 
for my needs.


Thanks,
Rgds,
Eric

_
Mortgage refinance is hot 1) Rates near 30-yr lows 2) Good credit get 
intro-rate 4.625%* 
https://www2.nextag.com/goto.jsp?product=10035url=%2fst.jsptm=ysearch=mortgage_text_links_88_h2a5fs=4056p=5117disc=yvers=743




specific lines SR question

2007-03-24 Thread Eric Leenman

Hi,

In vhdl I create many times entity is like below:

entity HALFADDER is
port(
A, B  : in  bit;
SUM, CARRY: out bit);
end entity HALFADDER;

When I want to use this port into another bigger file
(for example a full-adder ) I need in VHDL to
create a component from it.

This then looks like

component HALFADDER
port(
A, B  : in  bit;
SUM, CARRY: out bit);
end component;

Notice that only the first line and the last line changes:

entity HALFADDER is
becomes
component HALFADDER

and

end HALFADDER;
becomes
end entity HALFADDER;

This entity to component changing happens rahter often.
Say that you copy the 5 lines of the entity and then
paste them where you want to use it as component.
Is it then easy to replace the first and last line of these 5 lines of 
entity code to 5 lines of component code by pressing i.e. F5?

If so how to do this?

Rgds,
Eric

_
It’s tax season, make sure to follow these few simple tips 
http://articles.moneycentral.msn.com/Taxes/PreparationTips/PreparationTips.aspx?icid=HMMartagline




create a fill-in macro.

2007-03-15 Thread Eric Leenman

Hi,

Is it possible to create a fill-in macro in VIM?
For example:
Can you create and activate a macro that goes like this:
[Activate macro]
First-Name: [first fill-in place] Last-Name: [second fill in place] CR
Country: [third fill-in place]
[Macro ended]
So that when you fill this in you get in insert-mode this as plain text:

First-Name: Eric Last-Name: Leenman
Country: Holland

Rgds,

Eric

_
The average US Credit Score is 675. The cost to see yours: $0 by Experian. 
http://www.freecreditreport.com/pm/default.aspx?sc=660600bcd=EMAILFOOTERAVERAGE




Get date and filename as plain text

2007-03-15 Thread Eric Leenman

Hi,

Is it possible to make an inoremap that inserts the date as text and the 
filename as text?


For example:

inoremap @date   {insert_date_as_text()}
inoremap @filename   {insert_filename_as_text()}


Rgds,
Eric

_
Get a FREE Web site, company branded e-mail and more from Microsoft Office 
Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/




CTRL-Z makes vim to be minimized on windows

2007-03-10 Thread Eric Leenman

Hi,

I have mapped CTRL-Z as u
I'm not sourcing mswin.vim, and also not behave as windows
CTRL-Z does most of the times the undo-function.

But why does it also does minimize the screen sometimes?

Rgds,
Eric

_
Find what you need at prices you’ll love. Compare products and save at MSN® 
Shopping. 
http://shopping.msn.com/default/shp/?ptnrid=37,ptnrdata=24102tcode=T001MSN20A0701




How to make inoremap 's filetype depend

2007-03-09 Thread Eric Leenman

Hi,

How do you making inoremap filetype depend?
What I want is

if (filetype == vim) then
  inoremap @a   A
else if (filetype == c)
  inoremap @a   aa
else if (filetype == vhdl)
  inoremap @a   AAAaaa
else
  inoremap @a   aaaAAA
end if

Best regards,
Eric

_
Find what you need at prices you’ll love. Compare products and save at MSN® 
Shopping. 
http://shopping.msn.com/default/shp/?ptnrid=37,ptnrdata=24102tcode=T001MSN20A0701




Re: replace upper-case with lower-case

2007-03-08 Thread Eric Leenman

Still unclear to me what you want.
Don't now if this is what you want, but I have the following mappings for 
changing upper to lower case from any position in a line:


 ALT - to make from current pos till begin-of-line everything lower case
 To keep the cursor position it's prepend with mz (mark pos with z)
 and append with `z (go to mark z) (notice the backtick `[located under
 the ESC-key] is used, not a single quote sign ')
 noremap M-Left  mzgu0`z
 inoremap c-\c-n M-left

 ALT - to make from current pos till eol everything lower case 
 noremap M-Right mzgu$`z
 inoremap c-\c-n M-Right

 ALT-SHIFT - to make from current pos till bol everything upper case
 noremap M-S-Left  mzgU0`z
 inoremap c-\c-n M-S-left

 ALT-SHIFT - to make from current pos till eol everything upper case
 noremap M-S-Right mzgU$`z
 inoremap c-\c-n M-S-Right


Rgds,
Eric




From: [EMAIL PROTECTED]
To: Theerasak Photha [EMAIL PROTECTED]
CC: Vim ML vim@vim.org
Subject: Re: replace upper-case with lower-case
Date: Fri, 9 Mar 2007 14:49:09 +0800

Theerasak Photha [EMAIL PROTECTED] дÓÚ 2007-03-09 11:39:13:
  Suppose I want to replace start to stop without changing the
  capitalization, this will be:
 
  START - STOP
  start - stop
 
  My prior question is wrong, sorry.

 Oh, well in that case:

 :%s/START/STOP/g
 :%/start/stop/g

This does not seem to be a good way, consider if we want to change:
START - STOP
Start - Stop
start - stop
STart - STop
sTART - sTOP
...
then we may need to have too many lines...

Or imagine if we need to change ABCDEFG into HIJKLMN:
ABCDEFG - HIJKLMN
aBCDEFG - hIJKLMN
abCDEFG - hiJKLMN
abcDEFG - hijKLMN
... how many lines should you write?

write a function and change each character seem to be a more sensible
approach.

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


_
Get a FREE Web site, company branded e-mail and more from Microsoft Office 
Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/




inoremap tips/examples (Was Re: add c/c++ snippets)

2007-03-07 Thread Eric Leenman

Hi,

Triggered by the video presentation of Bram by making a iabbreviation or 
inoremaps of things you type often in combination with the reply of Gavin, 
would you like to share some of your inoremap mappings?

Some like Gavin send?
Plain and simple and very effective.

[...]
inoremap [ []LEFT
inoremap ( ()LEFT
inoremap  LEFT
inoremap ' ''LEFT
[...]
Gavin.

Just a thought.
Or can they be find some where?

Best regards,
Eric

_
Win a Zune™—make MSN® your homepage for your chance to win! 
http://homepage.msn.com/zune?icid=hmetagline




To imap or to iabbr

2007-03-06 Thread Eric Leenman

Hi,

What is the difference between imap or iabbr?
Or in other words, when should you use imap and when to iabbr?

Rgds,

Eric

_
Find what you need at prices you’ll love. Compare products and save at MSN® 
Shopping. 
http://shopping.msn.com/default/shp/?ptnrid=37,ptnrdata=24102tcode=T001MSN20A0701




Re: Workspace concept ala TextPad

2007-03-02 Thread Eric Leenman



Hi Yegappan


[...]


Remove the ! before the let.

let file_names = input(Enter file name(s): , '', 'file')

- Yegappan


Thanks, it works

Rgds,
Eric

_
Win a Zune™—make MSN® your homepage for your chance to win! 
http://homepage.msn.com/zune?icid=hmetagline




Re: Mapping to the numerical - and + and *

2007-03-02 Thread Eric Leenman

Thanks all.
I got it working what I wanted by copying the mswin.vim file and stripping 
it to what I wanted.
When you don't understand vim-scripting as I do then good copying is beter 
then bad designing .


Rgds,
Eric


---START
 kMinus and CTRL-X and SHIFT-Del are Cut
vnoremap kMinus+x
vnoremap S-Del +x
vnoremap C-X   +x

 kMultiply and CTRL-C and CTRL-Insert are Copy
vnoremap kMultiply +y
vnoremap C-Insert  +y
vnoremap C-C   +y

 kPlus and CTRL-V and SHIFT-Insert are Paste
map kPlus  +gP
map S-Insert   +gP
map C-V+gP

cmap kPlus C-R+
cmap S-Insert  C-R+
cmap C-V   C-R+

 Pasting blockwise and linewise selections is not possible in Insert and
 Visual mode without the +virtualedit feature.  They are pasted as if they
 were characterwise instead.
 Uses the paste.vim autoload script.

exe 'inoremap script kPlus' paste#paste_cmd['i']
exe 'vnoremap script kPlus' paste#paste_cmd['v']
exe 'inoremap script C-V' paste#paste_cmd['i']
exe 'vnoremap script C-V' paste#paste_cmd['v']

imap S-Insert  kPlus
vmap S-Insert  kPlus
imap S-Insert  C-V
vmap S-Insert  C-V

 Use CTRL-Q to do what CTRL-V used to do
noremap C-QC-V
---END

_
Win a Zune™—make MSN® your homepage for your chance to win! 
http://homepage.msn.com/zune?icid=hmetagline




Re: Workspace concept ala TextPad

2007-03-01 Thread Eric Leenman

Hi Yegappan,

I'm trying to do as you said:


In the prompt for adding a file to the workspace, you have to enter
the filename.
If you are using Vim7, you can make the attached change to the workspace
plugin to get filename completion at this prompt. With this change, you can
complete directory and filenames at the prompt.

- Yegappan

***
*** 521,527 
 let file_names = a:args

 if file_names == ''
! let file_names = input(Enter file name(s): )
 if file_names == ''
 return
 endif
--- 521,527 
 let file_names = a:args

 if file_names == ''
! let file_names = input(Enter file name(s): , '', 'file')
 if file_names == ''
 return
 endif



What I did:
I assume you mean line 521, 527.
But when I look at the workspace.vim file the line numbers doesn't line up 
with it.

Therefor I copied the whole function Ws_Add_Files
It is from line number 483--556

 Ws_Add_Files
 Add one or more files to the current group in the workspace
function! s:Ws_Add_Files(args, append)
Get the current group
   let lnum = line('.')
   let cmd = s:Ws_Get_Entry_Idx_By_Line('s:ws_entry_', lnum)
   if cmd == ''
 Add the new files at the end of the workgroup
   let prefix=s:ws_entry
let idx=
   endif

   exe cmd
   if {prefix}{idx}_type == 'group' || {prefix}{idx}_type == 'workspace'
Cursor is on a group name. Add the new file to this group
   let prefix = prefix . idx . '_'
   let idx = 0
   endif

   let file_names = a:args

   if file_names == ''
let file_names = input(Enter file name(s): )
   !let file_names = input(Enter file name(s): , '', 'file')
   if file_names == ''
   return
   endif
   endif

   let len = strlen(file_names)
   let start = 0
   let i = 0

   while start != -1  start  len
Skip whitespace characters
   if file_names[start] =~ '\s'
   let start = matchend(file_names, '\s\+', start)
   endif

   if file_names[start] == '
Single-quoted file name
   let pat = '[^']\\+'
   elseif file_names[start] == ''
Double-quoted file name
   let pat = '[^]\+'
   else
Unquoted filename
   let pat = '.\{-}[^\\]\(\s\|$\)'
   endif

Extract one filename
   let fnames = matchstr(file_names, pat, start)
let skip_pat = [' . ']\=\zs.\{-}\ze[' . ' . ']\=$'
   let fnames = matchstr(fnames, skip_pat)

   let start = matchend(file_names, pat, start)

   if fnames != ''
   let fnames = glob(fnames) . \n
   while fnames != ''
   let one_fname = strpart(fnames, 0, stridx(fnames, \n))
   if a:append
   call s:Ws_Add_File(prefix, {prefix}count, one_fname)
   else
   call s:Ws_Add_File(prefix, idx + i, one_fname)
   endif
   let i = i + 1
   let fnames = strpart(fnames, stridx(fnames, \n) + 1)
   endwhile
   endif
   endwhile

   call s:Ws_Refresh()
endfunction


When I do it, and try to add a file, it ends up with:

C:\Windows\system32\cmd.exe /c let file_names = input(Enter file name(s): 
, '', 'file')
'let' is not recognized as an internal or external command, operable program 
or batch file.

shell returned 1
Hit any key to close this window...


What am I doing wrong?

Best regards,
Eric

_
Don’t miss your chance to WIN 10 hours of private jet travel from Microsoft® 
Office Live http://clk.atdmt.com/MRT/go/mcrssaub0540002499mrt/direct/01/




Mapping to the numerical - and + and *

2007-02-28 Thread Eric Leenman

Hi,

Is it possible to map the - and + and * keys on the nummerical section of a 
keyboard (in other words the keys in the group where the num-lock key is 
also)

to functioan as cut, paste and copy?
If so, how do you this?

Rgds,
Eric

_
Refi Now: Rates near 39yr lows!  $430,000 Mortgage for $1,399/mo - Calculate 
new payment 
http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9632-17727moid=7581




Selecting a part of a line and then copy or cut it and then paste is somewhere.

2007-02-26 Thread Eric Leenman

Hi,

I'm trying to learn new vim habbits by
- not sourcing mswin.vim
- not setting behave mswin.
to migrate easier to linux.

I also start using the old-dos way again by copying, cutting and pasting 
with ctrl-insert, shift-delete and shift-insert iso CTRL-C, CTRL-X, CTRL-V, 
as these CTRL-keys are not always handeled the same on a linux distro.


What I now miss is the SELECT-MODE.
Not sure if this is done in mswin.vim and behave mswin.
I used to select a part of a line by pressing shift and one of the arrow 
keys.
It then showed SELECT-MODE, and what was selected you could easily cut and 
past or copy and paste.


But currently shift-left or right moves to the next or previous word
Shift-up and shift-down moves a file up or down one screen.
Unclear where these mappings are done, are these default vim mappings?

Anyway, how can I map shift-arrow keys as is used in SELECT-MODE?
Or any other suggestion for a smarter way is also very welcome.

Rgds,
Eric

_
With tax season right around the corner, make sure to follow these few 
simple tips. 
http://articles.moneycentral.msn.com/Taxes/PreparationTips/PreparationTips.aspx?icid=HMFebtagline




Re: Workspace concept ala TextPad

2007-02-14 Thread Eric Leenman

Hi Yeggapan,

[...]

You can try using the workspace manager plugin:

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

[...]

I got it so far working.
One question.
When I give the command af(AddFile) in the filebuffer, the plugin comes 
with

the message give file name (or something like that)
Do you then need to type the complete path (i.e. 
C:\Projects\FPGA\VHDL\test.vhdl)

Or can you browse to it ?

Rgds,
Eric

_
Laugh, share and connect with Windows Live Messenger 
http://clk.atdmt.com/MSN/go/msnnkwme002001msn/direct/01/?href=http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=hmtagline




How to diff in gvim

2007-02-13 Thread Eric Leenman

Hi,

I'm trying to diff two files in (portable) gvim
I have two files opened in two vertical windows.
(Kind of Winmerge screen setup)

When I type :diff  I get the error
E97: Can not create diffs


Why is that?

When I type :verbose
I dont get more info

Rgds,
Eric

_
Get in the mood for Valentine's Day. View photos, recipes and more on your 
Live.com page. 
http://www.live.com/?addTemplate=ValentinesDayocid=T001MSN30A0701




re-map up and down key behaviour

2007-02-10 Thread Eric Leenman

Hi,

Is it possible to remap the up and down key to behave a bit different.
For example I have text like below

  : b123
  : d456
 : g789

And then I want everything after the : starting with xx_
When I then move the b, press i and type xx_ then it looks like xx_b123
When I then press the down-key its position to insert a character between 5 
and 6.
Is it possible to remap so that it goes to the postion between the space 
and the d?
And when that looks like xx_d456 and I press the down-key it goes to the 
postion between the space and the g?


Rgds,
Eric

_
Turn searches into helpful donations. Make your search count. 
http://click4thecause.live.com/search/charity/default.aspx?source=hmemtagline_donationFORM=WLMTAG




RE: Using (g)vim without installing it

2007-02-09 Thread Eric Leenman

[...]

  Try downloading Steve Hall's self-installer from
  
https://sourceforge.net/project/showfiles.php?group_id=43866package_id=39721

  and telling it to install into a Vim folder under your My
  documents folder.

 I tried just now. But when I select a different directory then the
 C:\Programs Files\vim they OK-button is grayed-out. So never came to
 an install.

This installer requires a vim subdirectory, make sure you create one
and point to it wherever you happen to install. (Among other things,
this ensures the uninstaller doesn't delete half your hard drive.)
--
Steve Hall  [ digitect dancingpaper com ]

[...]

Did just install it on my usb-stick and thats working.
Now following the earlier replies to use it on another pc.
Thanks again.

_
Search for grocery stores. Find gratitude. Turn a simple search into 
something more. 
http://click4thecause.live.com/search/charity/default.aspx?source=hmemtagline_gratitudeFORM=WLMTAG




Re: Workspace concept ala TextPad

2007-02-07 Thread Eric Leenman

Hi Yegappan,


From: Yegappan Lakshmanan [EMAIL PROTECTED]
To: Eric Leenman [EMAIL PROTECTED]

[...]

You can try using the workspace manager plugin:
http://vim.sourceforge.net/scripts/script.php?script_id=1410
- Yegappan


I'm a simple VIM user.
That's why I ask many things on this mailing-group, which is very 
responsive.

Many times when I try to install very clever plugins I fail to do so.
Mainly because of the missing-Vim knowledge you guys have.

I decided to try it again and unfortantly failed again to follow the 
instructions.
If it's not too much of your time, could you please explain what I need to 
do following your 6 points.

If not thanks anyway.

I read on the script that I need to follow the 6 points mentioned.

[start of point 1]
1. Download the workspace.zip file and unzip the files to the $HOME/.vim or 
the $HOME/vimfiles or the $VIM/vimfiles directory. This should unzip the 
following two files (the directory structure should be preserved):


 plugin/workspace.vim - main workspace plugin file
 doc/workspace.txt- documentation (help) file

  Refer to the 'add-plugin', 'add-global-plugin' and 'runtimepath'
  Vim help pages for more details about installing Vim plugins.
[end of point 1]

What I did:
Download the zip file:
And stored
workspace.txt is stored in C:\Program Files\Vim\vimfiles\doc
workspace.vim C:\Program Files\Vim\vimfiles\plugin

Is this OK?
What is $HOME, how can I check this in VIM?
What is $VIM, how can I check this in VIM?
[start of point 2]
2. Change to the $HOME/.vim/doc or $HOME/vimfiles/doc or
  $VIM/doc/vimfiles directory, start Vim and run the :helptags .
  command to process the workspace help file.
[end of point 2]

What I did:
I don't understand the first part. What is ment here?
I just started Vim and did typed:  :helptags .
Vim did do something, don't know what.

[start of point 3]
3. If you are running a terminal/console version of Vim and the terminal
   doesn't support changing the window width then set the
   'Ws_Inc_Winwidth' variable to 0 in the .vimrc file.
[end of point 3]

What I did:
I ignored this, as I'm running gvim on windows xp.

[start of point 4]
[end of point 4]

What I did:
As there isn't a point 4 I went to point 5

[start of point 5]
5. Restart Vim.
[end of point 5]

What I did:
I did close gvim and restarted it.


[start of point 6]
6. You can now use the :WsOpen filename command to open a
workspace. You can use the :help workspace command to get
more information about using the workspace plugin.
[end of point 6]

What I did:
I typed :help workspace
Vim replied: E149: Sorry, no help for workspace

Thanks for your time.
Best regards,
Eric Leenman

_
Turn searches into helpful donations. Make your search count. 
http://click4thecause.live.com/search/charity/default.aspx?source=hmemtagline_donationFORM=WLMTAG




Re: Using (g)vim without installing it

2007-02-07 Thread Eric Leenman

Antoine,

[snip]
Some of them, maybe. (g)vim, even for Win95, was much more than just an 
exe file, unless you mean a self-installer containing an archive of the 
whole distribution.


I agree. What I ment is to copy the gvim.exe file (after running the 
installation of gvim70.exe)
I did so this morning and this works, however it keeps asking to register it 
(yes/no) which is not possible in my case. This is not a usefull solution 
for me.



A Vim installation contains, not only an editor executable, but also a 
number of support files including *.vim scripts and *.txt help files.

I agree

[snip]


With just a gvim.exe, you would lack many great features such as help, 
filetype recognition, syntax highlighting, directory browsing, foreign 
language support in messages and menus, etc. etc. etc. I would not call 
that a functioning Vim.

I agree

I think you could install Vim in user space, for instance in My 
Documents\Vim\vim70 and below. Try downloading Steve Hall's self-installer 
from 
https://sourceforge.net/project/showfiles.php?group_id=43866package_id=39721 
and telling it to install into a Vim folder under your My documents 
folder. (The installer will create a vim70 folder there and put everything 
into that vim70 folder and subfolders of it that it will also create.) You 
may have to create that My Documents\Vim prior to starting the installer 
but I'm not sure. I hope the installer will be clever enough not to try 
modifying the HKEY_LOCAL_MACHINE (but only the HKEY_CURRENT_USER) registry 
if you install from a non-admin account.


I tried just now. But when I select a different directory then the 
C:\Programs Files\vim they OK-button is grayed-out. So never came to an 
install.

But this is not the place to discuss this here.


To compile Vim for Windows, see 
http://users.skynet.be/antoine.mechelynck/vim/compile.htm . It takes some 
work to get it running but it can be done (I know: I did it myself); 
however, if installing Vim is too much for you, I don't think you will be 
willing to put yourself to the trouble of compiling it.

Your right, your site says enough for a simple-user not to go this way.

Of course. Install from Steve Hall's installer as above, but instead of My 
Documents\Vim, install under, for instance, Q:\Vim if Q: is your USB 
stick. Again, I don't know whether it will be necessary to create Q:\Vim 
first.



As said above this failed.

You may miss some things which only exist if they are set in the registry, 
for instance the Edit with Vim right-click menu; but I think the 
installation on the stick will be usable. You may have to create, let's 
say, a Q:\Home directory and set your HOME directory to it before starting 
Vim: for instance, by creating a GVIM.BAT file containing


set HOME=Q:\Home
Q:\Vim\vim70\%0 %1 %2 %3 %4 %5 %6 %7 %8 %9

(replace Q: by whatever is the root of the USB stick on the machine in 
question.)


You may also set up an identical copy of that same file with the name 
VIM.BAT if you have also installed the Console version of Vim.


With these settings, your vimrc (and gvimrc if any) will be in Q:\Home


Maybe I get sofar.


A final caveat: The VIMRUNTIME environment variable is best left unset in 
the environment (outside of Vim). You may or may not want to set the VIM 
variable but if it is set, it should be set to the Vim directory which is 
the parent of the vim70 installation folder for the current Vim 7.0 
installation. It is not necessary to set it, but it is useful if you use 
the Dos Box command-line a lot: in that case, %VIM% (in any command given 
at the prompt) will resolve to wherever you set the VIM directory. 
Depending on your version of Windows, environment variables are set either 
in C:\AUTOEXEC.BAT or in Control Panel = System = Advanced.



Best regards,
Tony.
--

OK

Thanks anyway.
Rgds,
Eric

_
Check out all that glitters with the MSN Entertainment Guide to the Academy 
Awards®   http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline2




Re: color loading sequence in GVIM

2007-02-06 Thread Eric Leenman

Thanks folks, I got it working now.



From: A.J.Mechelynck [EMAIL PROTECTED]
To: Eric Leenman [EMAIL PROTECTED]
CC: vim@vim.org, [EMAIL PROTECTED]
Subject: Re: color loading sequence in GVIM
Date: Tue, 06 Feb 2007 04:01:01 +0100

Eric Leenman wrote:

Hi,

Following your comments, I've converted my file to a scheme and placed it 
in

C:\Program Files\Vim\vimfiles\colors
For testing I also placed a bw.vim and a print_bw.vim in it.

The problem now is that it doesn't get loaded.
When I type :colorscheme eric it says E185: Can not find colorscheme eric


:colorscheme eric loads (on Windows, with the default 'runtimepath') the 
first one found of the following (and gives an error if none is found):


1. $HOME/vimfiles/colors/eric.vim
2. $VIM/vimfiles/colors/eric.vim
3. $VIMRUNTIME/colors/eric.vim
4. $VIM/vimfiles/after/colors/eric.vim
5. $HOME/vimfiles/after/colors/eric.vim

The script should set g:colors_name to eric.

1 and 5 are for private single-user files, 2 and 4 for system-wide 
files (which all users will see identically on multiuser system), 3 for 
whatever is distributed together with Vim (and users shouldn't meddle with 
it, as any upgrade can silently erase any changes you make there).



When I type echo g:colors_name it says undefined variable
When I type :colorscheme print_bw it switches to this scheme
When I type echo g:colors_name it says print_bw

Copying the print_bw file to print_bw2.vim and changing only the line
let g:colors_name = blabla
gives also the same errors with my ëricscheme

Why

Rgds,
Eric


The :scriptnames command will tell you exactly which scripts were 
sourced, and in which sequence.


Best regards,
Tony.
--
Peanut Blossoms

4 cups sugar   16 tbsp. milk
4 cups brown sugar 4 tsp. vanilla
4 cups shortening  14 cups flour
8 eggs 4 tsp. soda
4 cups peanut butter   4 tsp. salt

Shape dough into balls.  Roll in sugar and bake on ungreased cookie
sheet at 375 F. for 10-12 minutes.  Immediately top each cookie with a
Hershey's kiss or star pressing down firmly to crack cookie.  Makes a
hell of a lot.



_
Search for grocery stores. Find gratitude. Turn a simple search into 
something more. 
http://click4thecause.live.com/search/charity/default.aspx?source=hmemtagline_gratitudeFORM=WLMTAG




Using (g)vim without installing it

2007-02-06 Thread Eric Leenman

Hi,

Is it possible to start and use vim as an old exe file or com file? (don't 
know if the terminolgy is ok)
What I mean is that old windows programs for windows 95 where just exe 
files, and by copy them on a pc and starting them they just work.


Nowadays you have to install them first before you can use them.
I recently switched jobs, and the company is fine, but they have an 
IT-policy that users don't have administration rights. When I asked them to 
install gvim, they said we use TextPad, company policy. It's the first 
company that I ran into this, with a @[EMAIL PROTECTED] policy, but I have to live with 
it.


What I now want is:
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?
And if to re-compile vim how do you this.

Preference 2:
Is it possible to install gvim on a usb-stick.
If so then I can install it at my home PC on the usb-stick and then use it 
at work


Are there any other methods?

Rgds,
Eric

_
Check out all that glitters with the MSN Entertainment Guide to the Academy 
Awards®   http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline2




Re: Using (g)vim without installing it

2007-02-06 Thread Eric Leenman

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.


So when I xcopy the C:\Program Files\Vim on my home PC
to c:\dump\prog\vim of my work pc
it should work.

How do I then set $VIM appropriately?

Rgds,
Eric

_
Search for grocery stores. Find gratitude. Turn a simple search into 
something more. 
http://click4thecause.live.com/search/charity/default.aspx?source=hmemtagline_gratitudeFORM=WLMTAG




Re: Using (g)vim without installing it

2007-02-06 Thread Eric Leenman

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.


So when I xcopy the C:\Program Files\Vim on my home PC
to c:\dump\prog\vim of my work pc
it should work.

How do I then set $VIM appropriately?

Rgds,
Eric

_
Laugh, share and connect with Windows Live Messenger 
http://clk.atdmt.com/MSN/go/msnnkwme002001msn/direct/01/?href=http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=hmtagline




Re: color loading sequence in GVIM

2007-02-05 Thread Eric Leenman

Hi,

Following your comments, I've converted my file to a scheme and placed it in
C:\Program Files\Vim\vimfiles\colors
For testing I also placed a bw.vim and a print_bw.vim in it.

The problem now is that it doesn't get loaded.
When I type :colorscheme eric it says E185: Can not find colorscheme eric
When I type echo g:colors_name it says undefined variable
When I type :colorscheme print_bw it switches to this scheme
When I type echo g:colors_name it says print_bw

Copying the print_bw file to print_bw2.vim and changing only the line
let g:colors_name = blabla
gives also the same errors with my ëricscheme

Why

Rgds,
Eric


 Header information {{{
 Remove all existing highlighting. {{{
==
set background=light
hi clear
if exists(syntax_on)
 syntax reset
endif
=== 
}}}

 Name the scheme eric {{{
let g:colors_name = eric
=== 
}}}

 Define colorscheme as visual C++ {{{
==
hi Commentcterm=NONE ctermfg=darkgreen  ctermbg=white gui=NONE
guifg=darkgreen guibg=white
hi Statement  cterm=NONE ctermfg=blue   ctermbg=white gui=NONE 
guifg=blue

guibg=white
hi Identifier cterm=NONE ctermfg=darkredctermbg=white gui=NONE 
guifg=darkred

guibg=white
hi PreProccterm=NONE ctermfg=blue   ctermbg=white gui=NONE
guifg=darkblue  guibg=white
hi Type   cterm=NONE ctermfg=darkgray   ctermbg=white gui=NONE
guifg=darkgray  guibg=white
hi Constant   cterm=NONE ctermfg=red  ctermbg=white gui=NONE guifg=red
guibg=white
=== 
}}}

 vim60: set foldmethod=marker: {{{
 }}}



From: A.J.Mechelynck [EMAIL PROTECTED]
To: Albie Janse van Rensburg [EMAIL PROTECTED]
CC: Eric Leenman [EMAIL PROTECTED], vim@vim.org
Subject: Re: color loading sequence in GVIM
Date: Mon, 05 Feb 2007 17:01:57 +0100

Albie Janse van Rensburg wrote:

A.J.Mechelynck wrote:

Albie Janse van Rensburg wrote:

Eric Leenman wrote:

Hi,

I'm doing a reinstall of gvim and placing my color and font setting in 
a seperate file in the plugin.

This file is located in: C:\Program Files\Vim\vimfiles\plugin
And it contains the following:
[START OF FILE]
:hi Commentctermfg=darkgreen  gui=None guifg=darkgreen
:hi Statement  ctermfg=blue   gui=None guifg=blue
:hi Identifier ctermfg=darkredgui=None guifg=darkred
:hi PreProcctermfg=blue   gui=None guifg=darkblue
:hi Type   ctermfg=darkgray   gui=None guifg=darkgray
:hi Constant   ctermfg=redgui=None guifg=red

 GUI font instellingen
set guifont=courier:h7:w7
[END OF FILE]


What now happens is that the font is taken over but the colors aren't
For example:
When I type :hi Comment
vim returns:
Comment   xxx term=bold ctermfg=1 guifg=Blue

What do I do wrong?

Regards,
Eric

_
Check out all that glitters with the MSN Entertainment Guide to the 
Academy Awards®   
http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline2





Colour files should go into the vimfiles/colors directory,


Yes.

and needs to be named according to the filetype you want it to be used 
for.  For instance, sql.vim will be loaded for .sql files.


No (see below).

You can further specify what filetype to use for a file by creating a 
filetypes.vim file in the vimfiles/ftdetect directory.


... a filetype.vim file in a directory in 'runtimepath', *and/or* one or 
more Vim script(s) of _any_ name in the ftdetect subdirectory of a 
directory in 'runtimepath'.



For more info about this, see

:help ftdetect

Also,

:help syntax


and also (more important)
:help :colorscheme



Hope that helps



The files in the colors directory are what is called color schemes in Vim 
parlance, and correspond to what would be called themes or skins in 
other programs. Their names bear *no relation* to the files to be edited 
with them. Vim never loads them automatically but only as a result of the 
:colorscheme name command, which is roughly equivalent to :runtime 
colors/name.vim where name.vim is the name of an arbitrary 
colorscheme script.


The highlight groups to use for files of a given syntax are in the syntax 
subdirectory of directories in 'runtimepath', and they may define default 
colors for highlight groups not predefined in Vim, by using :highlight 
default commands (see :help :highlight-default).
Absolutely.  I had my syntax file and colorschemes info mixed up.  I hope 
the OP reads your corrections.  _Syntax_ files need to be named according 
to their application (language), whereas colorscheme files are used to 
change the colours of text _according_to_the_syntax_ file definition.  The 
colorscheme effectively is applied over the syntax definition.


Indeed. This also means

color loading sequence in GVIM

2007-02-04 Thread Eric Leenman

Hi,

I'm doing a reinstall of gvim and placing my color and font setting in a 
seperate file in the plugin.

This file is located in: C:\Program Files\Vim\vimfiles\plugin
And it contains the following:
[START OF FILE]
:hi Commentctermfg=darkgreen  gui=None guifg=darkgreen
:hi Statement  ctermfg=blue   gui=None guifg=blue
:hi Identifier ctermfg=darkredgui=None guifg=darkred
:hi PreProcctermfg=blue   gui=None guifg=darkblue
:hi Type   ctermfg=darkgray   gui=None guifg=darkgray
:hi Constant   ctermfg=redgui=None guifg=red

 GUI font instellingen
set guifont=courier:h7:w7
[END OF FILE]


What now happens is that the font is taken over but the colors aren't
For example:
When I type :hi Comment
vim returns:
Comment   xxx term=bold ctermfg=1 guifg=Blue

What do I do wrong?

Regards,
Eric

_
Check out all that glitters with the MSN Entertainment Guide to the Academy 
Awards®   http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline2




CTRL-S functionality to a letter combo like i.e. cs

2007-02-01 Thread Eric Leenman

Hi,

I'm using gvim on windows, which is behaving like windows shortcuts:
For example:
CTRL-S for save
CTRL-X for cut,
ect.

When using vim on Linux these don't work anymore because of linux windows 
managers.


Is it possible to put the same functionality of the CTRL-key (and/or ALT) to 
a key which is not linux windows manager  sensitive?
In other words: Is it possible to remap the ctrl key to for example the 
letter c?


So that when you are in insert-mode you can press cs as a replacement for 
CTRL-S?

(
Is this possible without using the Function Keys F1 till F12?

Rgds,

Eric

_
Get live scores and news about your team: Add the Live.com Football Page  
http://www.live.com/?addtemplate=football




set backupext dynamicly

2006-11-10 Thread Eric Leenman

Hi,

I'm new to programming in vim scripts.
I understand from scripts that you can say
set backupext=eric

Is it possible to set backupext dynamicly?
for example the current time?

something like:
string time = 'current-time'  (which changes every second)
set backupext=*time

Rgds,
Eric

_
Get today's hot entertainment gossip  
http://movies.msn.com/movies/hotgossip?icid=T002MSN03A07001




Re: Recall home drive

2006-11-10 Thread Eric Leenman

I then get the following messages

E739: Cannot create directory: U:\/C:\temp
E739: Cannot create directory: U:\/C:\temp\vim_backup

[...]

You do it by writing:
let g:backup_directory=C:\\temp\\vim_backup

Yakov


_
Try the next generation of search with Windows Live Search today!  
http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-ussource=hmtagline




Re: set backupext dynamicly

2006-11-10 Thread Eric Leenman

Thank you all,

This does the trick.
[...]


%X as part of the strftime parameter generates a time stamp like
14:51:23, but colons are invalid in Windows file names. Better use
something like this:

  let bex = '-' . strftime(%Y%m%d%H%M%S) . '~'

Regards,
Jürgen

[...]

_
Stay in touch with old friends and meet new ones with Windows Live Spaces 
http://clk.atdmt.com/MSN/go/msnnkwsp007001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us




Re: Arrow keys in combination with Fx key

2006-11-02 Thread Eric Leenman

Hi Tony,

[snip]

:mapF2Left  C-Left
:map!   F2Left  C-Left

Note that, unlike with the Ctrl, Shift and Alt keys, the sequence press 
F2 release F2 press Left release Left _will_ activate the mapping.



[snip]

Does this mean that I can't use a mapping for F2 only?
And why is their a ! behind the map in the second line?

Best Regards,
Eric

_
Get FREE company branded e-mail accounts and business Web site from 
Microsoft Office Live 
http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/




Arrow keys in combination with Fx key

2006-10-31 Thread Eric Leenman

Hi,

I was wondering if you can combine arrow keys with Fx keys.
For example, can a mapping like CTRLleft be replaced with F2left

The idea is to move mappings which use CTRL and ALT to Fx keys and SHIFT-Fx 
keys.

This because CTRL and ALT are window-manager-dependend on Linux-distro's

Best Regards,
Eric

_
Find a local pizza place, music store, museum and more…then map the best 
route!  http://local.live.com?FORM=MGA001




Re: break very long line into short one with one g-command

2006-10-03 Thread Eric Leenman

Hi Tim,

I might be mistaking, yes.

The line contains a codes like:
X200, X040, X200, X040, X3FF, X000, X000, X2AC,
Breaking the line after a , would be fine.

Rgds,
Eric


[...]

I presume you must be misremembering g.  I've done it with :s before:

:%s/.\{80\}/\r/g

It's a little trickier if you want it to fall exactly on word-boundaries, 
rather than hacking in the middle of words. However, if this is the case, 
drop a line back and I'll see what I can do.


-tim


_
Search—Your way, your world, right now!  
http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-usFORM=WLMTAG




SR

2006-09-22 Thread Eric Leenman

Hi

I have a file where I deleted all lines that don't contain a certain pattern
For example I want to delete all lines that don't contain XXX and YYY.

Before:

[start of file]
abcde XXX fghij YYY
12345 AAA 67890 BBB
klmno XXX pqrst YYY
09876 XXX 54321 BBB
*()- XXX ,./;' YYY
[end of file]

After:
[start of file]
abcde XXX fghij YYY
*()- XXX ,./;' YYY
[end of file]


How do I do that?

Best Regards,

Eric

_
All-in-one security and maintenance for your PC.  Get a free 90-day trial!  
http://clk.atdmt.com/MSN/go/msnnkwlo005001msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail




RE: SR

2006-09-22 Thread Eric Leenman


I made a typo
After should be:

After:
[start of file]
abcde XXX fghij YYY
klmno XXX pqrst YYY
*()- XXX ,./;' YYY
[end of file]

Rgds,
Eric

From: Eric Leenman [EMAIL PROTECTED]
To: vim@vim.org
Subject: SR
Date: Fri, 22 Sep 2006 11:59:59 +

Hi

I have a file where I deleted all lines that don't contain a certain 
pattern

For example I want to delete all lines that don't contain XXX and YYY.

Before:

[start of file]
abcde XXX fghij YYY
12345 AAA 67890 BBB
klmno XXX pqrst YYY
09876 XXX 54321 BBB
*()- XXX ,./;' YYY
[end of file]

After:
[start of file]
abcde XXX fghij YYY
*()- XXX ,./;' YYY
[end of file]


How do I do that?

Best Regards,

Eric

_
All-in-one security and maintenance for your PC.  Get a free 90-day trial!  
http://clk.atdmt.com/MSN/go/msnnkwlo005001msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail




_
Try the new Live Search today!  
http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-usFORM=WLMTAG




sorting lines on lenght of characters

2006-09-22 Thread Eric Leenman

Hi,

Is it possible to sort lines on line length?
Shortes firsts, longest last?
If so how do you do this?

Rgds,
Eric

_
Try the new Live Search today!  
http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-usFORM=WLMTAG




cross-platform mappings

2006-08-17 Thread Eric Leenman

Hi,

I'm trying to expand my use of GVIM also to Linux .
And I see that my mappings with CTRL and/or ALT and/or ARROW keys are 
handled

differently on because of the linux windows manager.

Does somebody knows which keys or key-combinations to avoid to create 
mappings

that work on WXP and Linux?
Should you never use ALT and/or CTRL in cross-platform mappings?

For example:
How should I remap


noremap C-Left  b
inoremap c-\c-n C-left

noremap C-Right w
inoremap c-\c-n C-Right


 ALT - to make from current pos till begin-of-line everything lower case
 To keep the cursor position it's prepend with mz (mark pos with z)
 and append with `z (go to mark z) (notice the backtick `[located under
 the ESC-key] is used, not a single quote sign ')
noremap M-Left  mzgu0`z
inoremap c-\c-n M-left

 ALT - to make from current pos till eol everything lower case 
noremap M-Right mzgu$`z
inoremap c-\c-n M-Right

 ALT-SHIFT - to make from current pos till bol everything upper case
noremap M-S-Left  mzgU0`z
inoremap c-\c-n M-S-left

ALT-SHIFT - to make from current pos till eol everything upper case
noremap M-S-Right mzgU$`z
inoremap c-\c-n M-S-Right



Best regards,
Eric

_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




Sorting columns in a file

2006-08-03 Thread Eric Leenman

Hi,

I have file which contains hexadecimal numbers like below:

04F  ---  05F  ---  052  ---  188  ---  2D4  ---  173  ---  040  ---  18D
051  ---  040  ---  05F  ---  1CA  ---  2E8  ---  14F  ---  040  ---  1E2
051  ---  040  ---  069  ---  1B9  ---  2D7  ---  15E  ---  040  ---  1A6
051  ---  040  ---  06F  ---  1ED  ---  2EB  ---  12E  ---  040  ---  209
051  ---  040  ---  078  ---  1F9  ---  2E3  ---  122  ---  040  ---  220
051  ---  045  ---  063  ---  1C8  ---  2D1  ---  146  ---  040  ---  1F4
051  ---  046  ---  05A  ---  1BB  ---  2D7  ---  158  ---  040  ---  1D3
051  ---  052  ---  04F  ---  1B6  ---  2E3  ---  154  ---  040  ---  1BB
052  ---  040  ---  045  ---  1BC  ---  2D6  ---  146  ---  040  ---  1CE
052  ---  040  ---  04A  ---  1BC  ---  2DD  ---  146  ---  040  ---  1D3

How can I sort the columns so that they are as the first column?

Best regards,

Eric

_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/




Re: Sorting columns in a file

2006-08-03 Thread Eric Leenman

Hi Peter

[snip]

I am assuming you want to re-order the columns horizontally, in which case


Sorry for not making my self clear.
I want to re-order the columns vertical
So column 1 is already OK, running from
04F
...
...
052

Column 2 should be
040
...
040
045
046
052
05F


ect.


[snip]

 I have file which contains hexadecimal numbers like below:

 04F  ---  05F  ---  052  ---  188  ---  2D4  ---  173  ---  040  ---  
18D
 051  ---  040  ---  05F  ---  1CA  ---  2E8  ---  14F  ---  040  ---  
1E2
 051  ---  040  ---  069  ---  1B9  ---  2D7  ---  15E  ---  040  ---  
1A6
 051  ---  040  ---  06F  ---  1ED  ---  2EB  ---  12E  ---  040  ---  
209
 051  ---  040  ---  078  ---  1F9  ---  2E3  ---  122  ---  040  ---  
220
 051  ---  045  ---  063  ---  1C8  ---  2D1  ---  146  ---  040  ---  
1F4
 051  ---  046  ---  05A  ---  1BB  ---  2D7  ---  158  ---  040  ---  
1D3
 051  ---  052  ---  04F  ---  1B6  ---  2E3  ---  154  ---  040  ---  
1BB
 052  ---  040  ---  045  ---  1BC  ---  2D6  ---  146  ---  040  ---  
1CE
 052  ---  040  ---  04A  ---  1BC  ---  2DD  ---  146  ---  040  ---  
1D3


 How can I sort the columns so that they are as the first column?


[snip]

Rgds,
Eric

_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/




How to scroll up and down without changing horizontal pos

2006-08-03 Thread Eric Leenman

Hi,

I'm using page-up and page-down to scroll.
Also ctrl-home and ctrl-end.
This moves the cursor to the beginning of the line.
How can this be avoided.
I need to the cursor to stay where it is, as the lines are 1000+ characters 
long


Rgds,
Eric

_
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




Re: How to scroll up and down without changing horizontal pos

2006-08-03 Thread Eric Leenman

[snip]

nmap silentPageDown :exe norm .winheight(0).jcr
nmap silentPageUp   :exe norm .winheight(0).kcr
nmap silentc-home   :let x=col('.')bar1barexe norm .x.barcr
nmap silentc-end:let x=col('.')bar$barexe norm .x.barcr

[snip]

This works great.

I'm trying to map them also to visaul-mode but then I get the error:
no range allowed
Why is that?

I have:

vmap silentc-s-PageDown :exe norm .winheight(0).jcr
vmap silentc-s-PageUp   :exe norm .winheight(0).kcr
vmap silentc-s-home   :let x=col('.')bar1barexe norm 
.x.barcr
vmap silentc-s-end:let x=col('.')bar$barexe norm 
.x.barcr


Rgds,
Eric

_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




Select prev visual block + 5 hor pos more

2006-08-03 Thread Eric Leenman

Hi,

With gv you can re-select the previous visual block.
Is it possible to give a horizontal shift with it?
Like + or - 5?

Best Regards,
Eric

_
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement




Re: Sorting a file

2006-08-02 Thread Eric Leenman

Thanks, it works
Eric



From: Tim Chase [EMAIL PROTECTED]
To: Eric Leenman [EMAIL PROTECTED]
CC: vim@vim.org
Subject: Re: Sorting a file
Date: Wed, 02 Aug 2006 08:44:07 -0500


How do I sort this file so that
- removes the lines starting with ###


:g/^###/d


- removes the lines starting with ---


:g/^---/d


- removes the lines starting with spaces


:g/^\s\+/d


- all line 18 , i.e., comes under each other? And line 19 , and so on.


:%!sort

(or, newer versions of vim may have a built-in sort-function, which can be 
used like


:%sort


Those first three commands can be combined, if desired:

:g/^\(###\|---\|\s\+\)/d

HTH,

-tim







_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




Deleting a repetative pattern

2006-08-02 Thread Eric Leenman

Hi

I have a file which contains lines like below

Line   18 |200  040  200 
 200  200  051  200  1C2  200  2E2  Line   18 | 
   200  040  200  040  200  052  200  1B9  200  2F4  
Line   18 |200  040  200 
 040  200  200  200  1C2  200  2DC
Line   18 |200  040  200 
 040  200  063  200  1D6  200  2D4


How do I deleted per line all the 'odd' 200?
So that it becomes like:

Line   18 |   040
 200  051 1C2 2E2  Line   18 |  
 040 040  052   
  1B9 2F4  Line   18 |  
 040 040  200 1C2 2DC
Line   18 |   040
 040  063 1D6 2D4


Kind regards,
Eric

_
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement




^M problems with migrating VIM from WinXP to Linux

2006-05-03 Thread Eric Leenman

Hi,

I'm using VIM on WinXP and want to move my files now also to Linux.
I copied the files and VIM reads in my .vimrc.
It comes up with a bounce of errors all related to ^M.

When I open this file on my WinXP I don't see them.
What do I need to do to make these ^M also visible on my WinXP machine?
Or do I need to change the files in a different way?

I want to remove the ^M on my WinXP machine and then copy them over again to 
my linux machine.


Thanks
Eric

_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/




Re: ^M problems with migrating VIM from WinXP to Linux + VIMs difference prblem

2006-05-03 Thread Eric Leenman

Thank you all I got it working.

One thing that seems to be broken is the VIM tip
On http://www.vim.org/tips/tip.php?tip_id=892

fun! InitBex()
let myvar = strftime((%y%m%d)[%Hh%M])
let myvar = set backupext=_. myvar
execute myvar
echo myvar
endfun
map ESC :call InitBex()CR

On my WinXP I use gvim 6.3
On my Linux I use vim 6.3.86

What do I need to change so that this works on both versions?

Best Regards,
Eric

_
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement