tumbleweed and vim question

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

tumbleweed and vim question

Lew Wolfgang
Hi Folks,

Okay, I'm ignorant, and my friend Google hasn't been of any help.

I installed the latest tumbleweed this afternoon and was dismayed to
see that the default vim behavior has changed.  First, searching for a
string by hitting "/" and entering the string was funky.  Then cutting
and pasting into an open vim screen in the "insert" mode using the
left and right mouse buttons did surprising things.  Pasting from the
clipboard using the "edit/paste" drop down menu worked, but that's
very cumbersome and is contrary to how I've been doing this for
35-years.

Rather than giving up and learning how to use Windows 10, is there a
way to configure tumbleweed's vim to emulate the old vi syntax?

Thanks,
Lew


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: tumbleweed and vim question

Neil Rickert
On 11/03/2017 07:10 PM, Lew Wolfgang wrote:

> Rather than giving up and learning how to use Windows 10, is there a
> way to configure tumbleweed's vim to emulate the old vi syntax?

I used to just remove "/etc/vimdata".  But that gets old with
Tumbleweed, because it keeps coming back with updates.

Now I am using ".vimrc" to hopefully do the same thing.

 ----- .vimrc (first 3 lines) -----
syntax off
set compatible
set viminfo=
 ----- end of .vimrc (first 3 lines) ---

I follow that with what was previously in my ".exrc".  If you have a
".vimrc", it apparently doesn't look at ".exrc".

The first of those lines turns of syntax highlighting.  The second line
is supposed to make it "vi" compatible.  And the third line tells it to
not save your position in the file (for repositioning when you next edit
that file).

Those seem to pretty much do the trick for me.

Oh, and yes, I think I used "google" to find how to do that.

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: tumbleweed and vim question

Michael Hirmke
In reply to this post by Lew Wolfgang
Hi Lew,

>Hi Folks,

>Okay, I'm ignorant, and my friend Google hasn't been of any help.

oops.

>I installed the latest tumbleweed this afternoon and was dismayed to
>see that the default vim behavior has changed.  First, searching for a
>string by hitting "/" and entering the string was funky.  Then cutting
>and pasting into an open vim screen in the "insert" mode using the
>left and right mouse buttons did surprising things.  Pasting from the
>clipboard using the "edit/paste" drop down menu worked, but that's
>very cumbersome and is contrary to how I've been doing this for
>35-years.

>Rather than giving up and learning how to use Windows 10, is there a
>way to configure tumbleweed's vim to emulate the old vi syntax?

If I remember correctly, there is a bug in the actual snapshot causing
problems like yours.

>Thanks,
>Lew

Bye.
Michael.
--
Michael Hirmke

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: tumbleweed and vim question

Bernhard Voelker
In reply to this post by Lew Wolfgang
On 11/04/2017 01:10 AM, Lew Wolfgang wrote:

> Hi Folks,
>
> Okay, I'm ignorant, and my friend Google hasn't been of any help.
>
> I installed the latest tumbleweed this afternoon and was dismayed to
> see that the default vim behavior has changed.  First, searching for a
> string by hitting "/" and entering the string was funky.  Then cutting
> and pasting into an open vim screen in the "insert" mode using the
> left and right mouse buttons did surprising things.  Pasting from the
> clipboard using the "edit/paste" drop down menu worked, but that's
> very cumbersome and is contrary to how I've been doing this for
> 35-years.
>
> Rather than giving up and learning how to use Windows 10, is there a
> way to configure tumbleweed's vim to emulate the old vi syntax?

Hmm, I got the same paste problem after a fresh TW install (with an
existing $HOME), but only in 'gnome-terminal', i.e., it worked in
'xterm'.  After a reboot after 'zypper dup' from 20171030 to
20171101), now the problem seems to be gone for 'gnome-terminal'
as well ... wait - not quite.
- open gnome-terminal in regular user session (openbox here),
- sudo -i
- root$ vi /etc/hosts
- enter 'insert' mode with 'i',
- go into another terminal and double-click a word
   for selection
- paste with middle mouse in root's vi session
--> pastes something completely outdated.  The same happens
in xterm, so somehow the copy/paste into vim in a sudo session
is the problem - but it works perfectly with the regular user.

It also happens regardless of using 'sudo -i' or 'sudo bash' or
'su -' followed by entering vi, or also directly 'sudo vi file',
or 'su -c "vi /etc/hosts"'.
Strange and annoying ...

Have a nice day,
Berny

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: tumbleweed and vim question

Wol's lists
On 04/11/17 12:30, Bernhard Voelker wrote:
> --> pastes something completely outdated.  The same happens
> in xterm, so somehow the copy/paste into vim in a sudo session
> is the problem - but it works perfectly with the regular user.

Something to do with sharing copy/paste buffers?

I have the same sort of problem pasting between linux and Windows
VirtualBox. It's a case of finding the right place to fix the settings :-(

Cheers,
Wol

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: tumbleweed and vim question

Bernhard Voelker
On 11/04/2017 01:36 PM, Wols Lists wrote:
> On 04/11/17 12:30, Bernhard Voelker wrote:
>> --> pastes something completely outdated.  The same happens
>> in xterm, so somehow the copy/paste into vim in a sudo session
>> is the problem - but it works perfectly with the regular user.
>
> Something to do with sharing copy/paste buffers?
>
> I have the same sort of problem pasting between linux and Windows
> VirtualBox. It's a case of finding the right place to fix the settings :-(

no, this is bare metal - a Dell OptiPlex 9020 which was
running oS:13.2 before.

Have a nice day,
Berny

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: tumbleweed and vim question

Andrei Borzenkov
In reply to this post by Bernhard Voelker
04.11.2017 15:30, Bernhard Voelker пишет:

> - open gnome-terminal in regular user session (openbox here),
> - sudo -i
> - root$ vi /etc/hosts
> - enter 'insert' mode with 'i',
> - go into another terminal and double-click a word
>   for selection
> - paste with middle mouse in root's vi session
> --> pastes something completely outdated.  The same happens
> in xterm, so somehow the copy/paste into vim in a sudo session
> is the problem - but it works perfectly with the regular user.
>

Compare "set mouse" in both cases.


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: tumbleweed and vim question

Bernhard Voelker
On 11/04/2017 06:58 PM, Andrei Borzenkov wrote:

> 04.11.2017 15:30, Bernhard Voelker пишет:
>> - open gnome-terminal in regular user session (openbox here),
>> - sudo -i
>> - root$ vi /etc/hosts
>> - enter 'insert' mode with 'i',
>> - go into another terminal and double-click a word
>>    for selection
>> - paste with middle mouse in root's vi session
>> --> pastes something completely outdated.  The same happens
>> in xterm, so somehow the copy/paste into vim in a sudo session
>> is the problem - but it works perfectly with the regular user.
>>
>
> Compare "set mouse" in both cases.

Bingo: "mouse=" as regular user, "mouse=a" as root.
Don't know where this comes from: the regular user doesn't have this
in his .vimrc, and root doesn't (better didn't, hehe) have a .vimrc
at all.

Thanks & have a nice day,
Berny


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: tumbleweed and vim question

Sean Marlow
In reply to this post by Wol's lists
Hi,

On Sat, 2017-11-04 at 12:36 +0000, Wols Lists wrote:

> On 04/11/17 12:30, Bernhard Voelker wrote:
> > --> pastes something completely outdated.  The same happens
> > in xterm, so somehow the copy/paste into vim in a sudo session
> > is the problem - but it works perfectly with the regular user.
>
> Something to do with sharing copy/paste buffers?
>
> I have the same sort of problem pasting between linux and Windows
> VirtualBox. It's a case of finding the right place to fix the
> settings :-(
I've also run into this problem with the clipboard. Vim provided by
Factory is compiled without +clipboard support. You can check this
with:

vim --version | grep clipboard
# Should see +clipboard and/or +xterm_clipboard if supported

To get a version with clipboard support you can install gvim. Note:
This does come with a lot of extra features you may not use/want.

With clipboard support you can now set vim to use the system clipboard:

# ~/.vimrc
set clipboard=unnamedplus

More info on the Vim clipboard and registers can be found here http://v
im.wikia.com/wiki/Accessing_the_system_clipboard.

>
> Cheers,
> Wol
>

Cheers,

--
Sean Marlow
Public Cloud Developer
[hidden email]

signature.asc (849 bytes) Download Attachment