FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 08-17-2012, 03:35 PM
John Doe
 
Default vi defaults in 6.x

From: Les Mikesell <lesmikesell@gmail.com>

> On Fri, Aug 17, 2012 at 5:22 AM, John Doe <jdmls@yahoo.com> wrote:
>> From: Les Mikesell <lesmikesell@gmail.com>
>>
>>> When I use copy/paste text into a window running vi, if there is a
>>> single line starting with '#', in the pasted content, it adds a
> # to
>>> all subsequent lines and indents each an additional level.* Is there
>>> some way to eliminate this bizarre behavior, preferably globally and
>>> permanently so I don't have to repeat some change for every
>>> machine/user where I might log in?
>>
>> If you do not want to change the defaults, you could temporarily call vim
>> without the initializations:
>> * vim -u NONE ...
>
> That's the effect I want, since I log into a lot of different machines
> and paste stuff into scripts.* But, it doesn't seem to work.* With
> 'vim -u NONE /tmp/test.pl' it still does the auto-comment stuff.

Works for me at least to avoid "crazy" double auto-indent...
And it turns off syntax highlighting too.
But I have no auto-comment in either modes...

JD
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-17-2012, 04:02 PM
Les Mikesell
 
Default vi defaults in 6.x

On Fri, Aug 17, 2012 at 10:35 AM, John Doe <jdmls@yahoo.com> wrote:
>>>
>>>> When I use copy/paste text into a window running vi, if there is a
>>>> single line starting with '#', in the pasted content, it adds a
>> # to
>>>> all subsequent lines and indents each an additional level. Is there
>>>> some way to eliminate this bizarre behavior, preferably globally and
>>>> permanently so I don't have to repeat some change for every
>>>> machine/user where I might log in?
>>>
>>> If you do not want to change the defaults, you could temporarily call vim
>>> without the initializations:
>>> vim -u NONE ...
>>
>> That's the effect I want, since I log into a lot of different machines
>> and paste stuff into scripts. But, it doesn't seem to work. With
>> 'vim -u NONE /tmp/test.pl' it still does the auto-comment stuff.
>
> Works for me at least to avoid "crazy" double auto-indent...
> And it turns off syntax highlighting too.
> But I have no auto-comment in either modes...

That's interesting - I don't think I've ever changed any defaults.
I'm using the text mode version in a gnome-terminal window in case
that makes a difference.

--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-18-2012, 12:13 AM
Ron Loftin
 
Default vi defaults in 6.x

On Fri, 2012-08-17 at 11:02 -0500, Les Mikesell wrote:
> On Fri, Aug 17, 2012 at 10:35 AM, John Doe <jdmls@yahoo.com> wrote:
> >>>
> >>>> When I use copy/paste text into a window running vi, if there is a
> >>>> single line starting with '#', in the pasted content, it adds a
> >> # to
> >>>> all subsequent lines and indents each an additional level. Is there
> >>>> some way to eliminate this bizarre behavior, preferably globally and
> >>>> permanently so I don't have to repeat some change for every
> >>>> machine/user where I might log in?
> >>>
> >>> If you do not want to change the defaults, you could temporarily call vim
> >>> without the initializations:
> >>> vim -u NONE ...
> >>
> >> That's the effect I want, since I log into a lot of different machines
> >> and paste stuff into scripts. But, it doesn't seem to work. With
> >> 'vim -u NONE /tmp/test.pl' it still does the auto-comment stuff.
> >
> > Works for me at least to avoid "crazy" double auto-indent...
> > And it turns off syntax highlighting too.
> > But I have no auto-comment in either modes...
>
> That's interesting - I don't think I've ever changed any defaults.
> I'm using the text mode version in a gnome-terminal window in case
> that makes a difference.

Of course, if you don't care for vim, you can always use the old, simple
version by using the command "/bin/vi" instead of "vim" and that should
do away with most of the enhancements.

>
--
Ron Loftin reloftin@twcny.rr.com

"God, root, what is difference ?" Piter from UserFriendly

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-18-2012, 04:31 PM
Daniel De Marco
 
Default vi defaults in 6.x

* Les Mikesell <lesmikesell@gmail.com> [08/16/2012 14:23]:
> When I use copy/paste text into a window running vi, if there is a
> single line starting with '#', in the pasted content, it adds a # to
> all subsequent lines and indents each an additional level. Is there
> some way to eliminate this bizarre behavior, preferably globally and
> permanently so I don't have to repeat some change for every
> machine/user where I might log in?

to avoid this behavior during paste, just do:
:set paste
just before pasting.

Daniel.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-19-2012, 07:31 AM
Gordon Messmer
 
Default vi defaults in 6.x

On 08/16/2012 04:55 PM, SilverTip257 wrote:
> vi is generally a symlink to vim these days.

Actually, it's a shell alias. And then, only if "vim" is installed,
which it isn't in some configurations. IIRC, desktop systems have him
by default, but server installations do not.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-19-2012, 04:12 PM
Les Mikesell
 
Default vi defaults in 6.x

On Sun, Aug 19, 2012 at 2:31 AM, Gordon Messmer <yinyang@eburg.com> wrote:
> On 08/16/2012 04:55 PM, SilverTip257 wrote:
>> vi is generally a symlink to vim these days.
>
> Actually, it's a shell alias. And then, only if "vim" is installed,
> which it isn't in some configurations. IIRC, desktop systems have him
> by default, but server installations do not.

The systems where I'd be pasting script contents mostly have the
software development package group installed. The aliasing explains
why it happens seemingly randomly since I'd sometimes have root's
environment, sometimes not. In any case, the ':set paste" mode
behavior is what I want. I don't mind syntax highlighting but it seems
extremely bizarre for something pretending to be vi with a default
setting to ever, under any conditions, insert something you didn't
type.

--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-20-2012, 11:07 AM
 
Default vi defaults in 6.x

Gordon Messmer <yinyang@eburg.com> wrote:

> On 08/16/2012 04:55 PM, SilverTip257 wrote:
> > vi is generally a symlink to vim these days.
>
> Actually, it's a shell alias. And then, only if "vim" is installed,
> which it isn't in some configurations. IIRC, desktop systems have him
> by default, but server installations do not.

It is neither a symlink nor a shell alias - execpt maybe for platforms that
for some reason don't include vi.

vi is OSS and the OSS vi is fully POSIX compliant.

and BTW: vi does not read .vimrc but .exrc

Jörg

--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni)
joerg.schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-20-2012, 11:19 AM
 
Default vi defaults in 6.x

Reindl Harald <h.reindl@thelounge.net> wrote:

>
>
> Am 20.08.2012 13:07, schrieb Joerg Schilling:
> > Gordon Messmer <yinyang@eburg.com> wrote:
> >
> >> On 08/16/2012 04:55 PM, SilverTip257 wrote:
> >>> vi is generally a symlink to vim these days.
> >>
> >> Actually, it's a shell alias. And then, only if "vim" is installed,
> >> which it isn't in some configurations. IIRC, desktop systems have him
> >> by default, but server installations do not.
> >
> > It is neither a symlink nor a shell alias - execpt maybe for platforms that
> > for some reason don't include vi.
>
> you are aware that you are posting to the CENTOS-list?

Of course

> the topic is about "vi default in CENTOS 6.x" so what

You seem to missunderstand that there is a program called "vi" and another
program called "vim".

Jörg

--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni)
joerg.schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-20-2012, 02:37 PM
William Hooper
 
Default vi defaults in 6.x

On Mon, Aug 20, 2012 at 7:19 AM, Joerg Schilling
<Joerg.Schilling@fokus.fraunhofer.de> wrote:
>
> Reindl Harald <h.reindl@thelounge.net> wrote:
> > you are aware that you are posting to the CENTOS-list?
>
> Of course
>
> > the topic is about "vi default in CENTOS 6.x" so what
>
> You seem to missunderstand that there is a program called "vi" and another
> program called "vim".

Not on a standard CentOS system.

[whooper@chef ~]$ /bin/vi --version
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Apr 5 2012 10:17:55)

On a machine that has the vim-enhanced package installed (care of the
files dropped in /etc/profile.d/vim.*:

$ which vi
alias vi='vim'
/usr/bin/vim

--
William Hooper
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-20-2012, 03:08 PM
 
Default vi defaults in 6.x

William Hooper <whooperhsd@gmail.com> wrote:

> On Mon, Aug 20, 2012 at 7:19 AM, Joerg Schilling
> <Joerg.Schilling@fokus.fraunhofer.de> wrote:
> >
> > Reindl Harald <h.reindl@thelounge.net> wrote:
> > > you are aware that you are posting to the CENTOS-list?
> >
> > Of course
> >
> > > the topic is about "vi default in CENTOS 6.x" so what
> >
> > You seem to missunderstand that there is a program called "vi" and another
> > program called "vim".
>
> Not on a standard CentOS system.
>
> [whooper@chef ~]$ /bin/vi --version
> VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Apr 5 2012 10:17:55)

This just verifies that you don't have a vi.

Jörg

--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni)
joerg.schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 01:30 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org