Migrating from unix to window

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Migrating from unix to window

Yogs-2
Hello All,

I m migrating from unix to window, what all things do I need to do so
that I can have same setup for gvim in windows as I used to have in
unix. I had put all my configurations in .vimrc so while creating
_vimrc what thigs I need to take care

Regards
yogS
Reply | Threaded
Open this post in threaded view
|

RE: Migrating from unix to window

David Fishburn
 

> -----Original Message-----
> From: YogS [mailto:[hidden email]]
> Sent: Tuesday, September 20, 2005 9:55 AM
> To: [hidden email]
> Subject: Migrating from unix to window
>
> Hello All,
>
> I m migrating from unix to window, what all things do I need
> to do so that I can have same setup for gvim in windows as I
> used to have in unix. I had put all my configurations in
> .vimrc so while creating _vimrc what thigs I need to take care

I routinely go the other way, I sometimes use Unix machines, so I keep those
up to date with my plugins.

Generally, my vimrc is identical between machines.  For special cases, I add
the following to my vimrc:
if has('win32')
    set grepprg=grep\ -HinE
endif

So I can fine tune based on platform.

Then I use the Unix dos2unix program to convert all my plugins and other
files that might be in DOS format to UNIX format.  Since you are coming the
other way, probably having:

set fileformats=unix,dos      " Leave files in Unix format first
or
set fileformats=dos,unix      

Should work fine.

HTH,
Dave


Reply | Threaded
Open this post in threaded view
|

Re: Migrating from unix to window

A.J.Mechelynck
In reply to this post by Yogs-2
----- Original Message -----
From: "YogS" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, September 20, 2005 3:54 PM
Subject: Migrating from unix to window


> Hello All,
>
> I m migrating from unix to window, what all things do I need to do so
> that I can have same setup for gvim in windows as I used to have in
> unix. I had put all my configurations in .vimrc so while creating
> _vimrc what thigs I need to take care
>
> Regards
> yogS

You can go on using .vimrc (if _vimrc is not found, Vim for Windows will
look for ~/.vimrc); see ":help has()" and ":help exists()" about checking
for features.

One thing to be careful for is the 'guifont': it has four mutually
incompatible formats, of which each version of gvim accepts only one; three
of these formats are for x11 display systems (kvim, gtk+2 and other-x11), a
fourth one is for non-x11 systems such as Windows. You might want to use
something similar to the following snippet to find out which setting applies
and set it properly. (Vary the details to suit your taste, or according to
which fonts you have available on each platform.)

    if has("gui_running")
        if has("gui_gtk2")
            set guifont=Courier\ New\ 10
        elseif has("gui_kde")
            set guifont=Courier\ New/10
        elseif has("x11")
            " between here and the next comment...
            set guifont=-*-courier-medium-r-normal-*-*-180-*-*-m-*-*
            " should be all on one line
        else
            set guifont=Courier_New:h10:cDEFAULT
        endif
    endif

See http://vim.sourceforge.net/tips/tip.php?tip_id=632 (including user
comments) for more info about GUI font settings.

Another thing is the ":language" setting: different values are legal on
different platforms. Since I prefer English message texts (not French, as my
locale would have them), I have the following at the very start of my vimrc
(before sourcing $VIMRUNTIME/vimrc_example.vim, which, among other things,
sets up the menus):

    if has("unix")
        language messages C
    else
        language messages en
    endif

Most of the remaining settings are either common to both platforms, or
already taken care of by having different option defaults. If something
breaks for you, you will have to experiment, possibly adding "if has(..."
and/or "if exists(..." clauses to your vimrc.

One thing you will *not* want to do if you are accustomed to (g)vim for Unix
is sourcing $VIMRUNTIME/mswin.vim -- if your Windows vimrc has a line to
source it, remove it. That script is *only* for people who come to Vim from
typical Windows applications such as Notepad, it interferes with standard
Vim Normal-mode and Insert-mode commands like Ctrl-V, Ctrl-C, Ctrl-X and
more. (I actually used Dos and Windows long before I could lay hands on
Linux, yet I still don't source mswin.vim and I prefer it that way, even on
Windows.)


Best regards,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: Migrating from unix to window

Yogs-2
HI All,

Thanx for all your guidence.
I have started working on Windows & I m comfortable now.

Now I m facing some issue in clumn select which we used to do with CTRL-V,
Now When I do CTRL-V, visual-block appear on the character below the
cursor but when I use arrow keys to move my selection, the selection
disappear.

Also I dont use the mswin.vim

Any idea what other setting do I need to do.

Regards
YogS

On 9/21/05, Tony Mechelynck <[hidden email]> wrote:

> ----- Original Message -----
> From: "YogS" <[hidden email]>
> To: <[hidden email]>
> Sent: Tuesday, September 20, 2005 3:54 PM
> Subject: Migrating from unix to window
>
>
> > Hello All,
> >
> > I m migrating from unix to window, what all things do I need to do so
> > that I can have same setup for gvim in windows as I used to have in
> > unix. I had put all my configurations in .vimrc so while creating
> > _vimrc what thigs I need to take care
> >
> > Regards
> > yogS
>
> You can go on using .vimrc (if _vimrc is not found, Vim for Windows will
> look for ~/.vimrc); see ":help has()" and ":help exists()" about checking
> for features.
>
> One thing to be careful for is the 'guifont': it has four mutually
> incompatible formats, of which each version of gvim accepts only one; three
> of these formats are for x11 display systems (kvim, gtk+2 and other-x11), a
> fourth one is for non-x11 systems such as Windows. You might want to use
> something similar to the following snippet to find out which setting applies
> and set it properly. (Vary the details to suit your taste, or according to
> which fonts you have available on each platform.)
>
>    if has("gui_running")
>        if has("gui_gtk2")
>            set guifont=Courier\ New\ 10
>        elseif has("gui_kde")
>            set guifont=Courier\ New/10
>        elseif has("x11")
>            " between here and the next comment...
>            set guifont=-*-courier-medium-r-normal-*-*-180-*-*-m-*-*
>            " should be all on one line
>        else
>            set guifont=Courier_New:h10:cDEFAULT
>        endif
>    endif
>
> See http://vim.sourceforge.net/tips/tip.php?tip_id=632 (including user
> comments) for more info about GUI font settings.
>
> Another thing is the ":language" setting: different values are legal on
> different platforms. Since I prefer English message texts (not French, as my
> locale would have them), I have the following at the very start of my vimrc
> (before sourcing $VIMRUNTIME/vimrc_example.vim, which, among other things,
> sets up the menus):
>
>    if has("unix")
>        language messages C
>    else
>        language messages en
>    endif
>
> Most of the remaining settings are either common to both platforms, or
> already taken care of by having different option defaults. If something
> breaks for you, you will have to experiment, possibly adding "if has(..."
> and/or "if exists(..." clauses to your vimrc.
>
> One thing you will *not* want to do if you are accustomed to (g)vim for Unix
> is sourcing $VIMRUNTIME/mswin.vim -- if your Windows vimrc has a line to
> source it, remove it. That script is *only* for people who come to Vim from
> typical Windows applications such as Notepad, it interferes with standard
> Vim Normal-mode and Insert-mode commands like Ctrl-V, Ctrl-C, Ctrl-X and
> more. (I actually used Dos and Windows long before I could lay hands on
> Linux, yet I still don't source mswin.vim and I prefer it that way, even on
> Windows.)
>
>
> Best regards,
> Tony.
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from unix to window

A.J.Mechelynck
----- Original Message -----
From: "YogS" <[hidden email]>
To: "Tony Mechelynck" <[hidden email]>; <[hidden email]>
Sent: Thursday, September 22, 2005 7:29 AM
Subject: Re: Migrating from unix to window


> HI All,
>
> Thanx for all your guidence.
> I have started working on Windows & I m comfortable now.
>
> Now I m facing some issue in clumn select which we used to do with CTRL-V,
> Now When I do CTRL-V, visual-block appear on the character below the
> cursor but when I use arrow keys to move my selection, the selection
> disappear.

Either remove "stopsel" from the 'keymodel' option, or use shifted arrows to
extend the selection. (I use ":set keymodel=startsel" which is not the
default: the default is empty, ":behave unix" makes it empty, ":behave
mswin" sets 'keymodel' to "startsel,stopsel").

See
    :help 'keymodel'
    :help :behave


Best regards,
Tony.