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? -- Les Mikesell lesmikesell at gmail.com
On Thu, 16 Aug 2012 13:23:28 -0500 Les Mikesell 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?I discovered exactly the same behaviour in the Sylpheed email editor a few weeks back. Not only with cut-and-paste, but just typing into the editor window. If a line starts with # then every following line after that also gains one as you type. -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com www.creekfm.com - FIFTY THOUSAND WATTS of POW WOW POWER!
________________________________ > From: Les Mikesell <lesmikesell at gmail.com>> To: CentOS mailing list <centos at centos.org> > Sent: Thursday, August 16, 2012 11:23 AM > Subject: [CentOS] vi defaults in 6.x> 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? > > --?> Les Mikesell ==To make vi less annoying, I always create a .vimrc in the homedir of the account in question.? It contains: syntax off set nohlsearch set noincsearch :let loaded_matchparen = 1 set noai set paste set mouseset noautoindent Hope this helps! ______________________________________________________________________ If life gives you lemons, keep them-- because hey.. free lemons. "? Sticker" fixer:? http://microflush.org/stuff/stickers/heartFix.html
From: Les Mikesell <lesmikesell at 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 ... JD
* Les Mikesell <lesmikesell at 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.
Reindl Harald <h.reindl at thelounge.net> wrote:> > > Am 20.08.2012 13:07, schrieb Joerg Schilling: > > Gordon Messmer <yinyang at 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 whatYou seem to missunderstand that there is a program called "vi" and another program called "vim". J?rg -- EMail:joerg at schily.isdn.cs.tu-berlin.de (home) J?rg Schilling D-13353 Berlin js at cs.tu-berlin.de (uni) joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
Reindl Harald <h.reindl at thelounge.net> wrote:> > This just verifies that you don't have a vi > > boah how often should we explain it until you > understand taht on CENTOS there is NO vi package > > there is only VIMNice to see, that you finally realized it too..... J?rg -- EMail:joerg at schily.isdn.cs.tu-berlin.de (home) J?rg Schilling D-13353 Berlin js at cs.tu-berlin.de (uni) joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily