Re: Please help validate my ~/.vimrc configuration for Python

David via Tutor <[email protected]> Tue, 19 Aug 2025 11:27:53 +0000
Newsgroups gmane.comp.python.tutor
Message-ID <CAMPXz=qhUQNugt98cZS-RKuUBA2iJeaVRNV9vFkzK1S8E_23GA@mail.gmail.com>
On Mon, 18 Aug 2025 at 15:08, Alex Kleider <[email protected]> wrote:

Hi Alex,

> That's very helpful and kind of you to explain all this.

You're welcome.

> Is it reasonable for me to assume that I could uninstall vim and
> install vim-nox and after that, if i didn't like my 'new' vim I could
> revert to what I have now by simply uninstalling vim-nox and
> reinstalling vim? I'd like to try that unless you warn me about some
> "gotcha"s that I might encounter.

You've already had helpful replies, but I'll add something.

Caution is wise, but in this case I dont think you need to worry at all.

This should all just work, thanks to the hard work of the package
maintainer in your Linux distribution.

This is the reason why they create binary packages, to automate package
installation and removal.

Of course you are responsible for anything you do on your system, and
backups are essential.

In my case, I have layers of recovery, so I can fiddle with things without
being afraid of consequences.

When I wrote my first post in this thread, I noticed that by historical
accident I had 3 different packaged versions of Vim installed.

  vim-tiny
  vim
  vim-gtk3

After writing to you I thought maybe I should be using vim-nox instead of
all of those.

So, I did:

  sudo apt remove vim-gtk3
  sudo apt remove vim
  sudo apt install vim-nox

Then I tried vim-nox and soon realised that I really do need the X Windows
features (I never run the GUI version, but I do use cut and paste
extensively using both X and system clipboard, neither of those work in
vim-nox version).

So I continued:

  sudo apt remove vim-nox
  sudo apt remove vim-tiny

At this point I have no Vim installed at all, so I reinstall:

sudo apt install vim-gtk3

and finally I have (only) Vim Gtk capable back again.

Everything works, nothing is broken. My .vimrc is still there.

This is due to two things:
Debian's handling of config files, see [1]
The Debian "alternatives" system, see [2]

Below is a log of the console while I did all of the above.

There you can see the "alternatives" system in action after each step,
where it automatically redefines what actually gets called when the user
runs for example /usr/bin/vim

I hope this helps.

[1] https://raphaelhertzog.com/2010/09/21/debian-conffile-configuration-file-managed-by-dpkg/
[2] https://wiki.debian.org/DebianAlternatives

----- console log start -----

[david@kablamm ~]$ sudo apt remove vim-gtk3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  vim-gui-common
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
  vim-gtk3
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 4,584 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 280407 files and directories currently installed.)
Removing vim-gtk3 (2:9.0.1378-2+deb12u2) ...
update-alternatives: using /usr/bin/vim.basic to provide
/usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim
(vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view
(view) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi
(vi) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim
(rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide
/usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex
(ex) in auto mode
update-alternatives: using /bin/nano to provide /usr/bin/editor
(editor) in auto mode

[david@kablamm ~]$ sudo apt remove vim
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  vim-gui-common vim-runtime
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  vim
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 3,738 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 280397 files and directories currently installed.)
Removing vim (2:9.0.1378-2+deb12u2) ...
update-alternatives: using /usr/bin/mcview to provide /usr/bin/view
(view) in auto mode
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/vi
(vi) in auto mode
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/rview
(rview) in auto mode
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/ex
(ex) in auto mode

[david@kablamm ~]$ sudo apt install vim-nox
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  vim-gui-common
Use 'sudo apt autoremove' to remove it.
Suggested packages:
  cscope
The following NEW packages will be installed:
  vim-nox
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 1,748 kB of archives.
After this operation, 4,258 kB of additional disk space will be used.
Get:1 http://approx:9999/debian bookworm/main amd64 vim-nox amd64
2:9.0.1378-2+deb12u2 [1,748 kB]
Fetched 1,748 kB in 0s (5,006 kB/s)
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
Selecting previously unselected package vim-nox.
(Reading database ... 280388 files and directories currently installed.)
Preparing to unpack .../vim-nox_2%3a9.0.1378-2+deb12u2_amd64.deb ...
Unpacking vim-nox (2:9.0.1378-2+deb12u2) ...
Setting up vim-nox (2:9.0.1378-2+deb12u2) ...
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/ex
(ex) in auto mode
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/rview
(rview) in auto mode
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/rvim
(rvim) in auto mode
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/vi
(vi) in auto mode
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/view
(view) in auto mode
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/vim
(vim) in auto mode
update-alternatives: using /usr/bin/vim.nox to provide
/usr/bin/vimdiff (vimdiff) in auto mode

[david@kablamm ~]$ sudo apt remove vim-nox
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  vim-gui-common vim-runtime
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  vim-nox
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 4,258 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 280398 files and directories currently installed.)
Removing vim-nox (2:9.0.1378-2+deb12u2) ...
update-alternatives: using /usr/bin/mcview to provide /usr/bin/view
(view) in auto mode
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/vi
(vi) in auto mode
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/rview
(rview) in auto mode
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/ex
(ex) in auto mode

[david@kablamm ~]$ sudo apt remove vim-tiny
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  vim-gui-common vim-runtime
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  vim-tiny
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 1,730 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 280388 files and directories currently installed.)
Removing vim-tiny (2:9.0.1378-2+deb12u2) ...

[david@kablamm ~]$ sudo apt install vim-gtk3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  cscope gnome-icon-theme
The following NEW packages will be installed:
  vim-gtk3
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 1,878 kB of archives.
After this operation, 4,584 kB of additional disk space will be used.
Get:1 http://approx:9999/debian bookworm/main amd64 vim-gtk3 amd64
2:9.0.1378-2+deb12u2 [1,878 kB]
Fetched 1,878 kB in 0s (6,758 kB/s)
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
Selecting previously unselected package vim-gtk3.
(Reading database ... 280377 files and directories currently installed.)
Preparing to unpack .../vim-gtk3_2%3a9.0.1378-2+deb12u2_amd64.deb ...
Unpacking vim-gtk3 (2:9.0.1378-2+deb12u2) ...
Setting up vim-gtk3 (2:9.0.1378-2+deb12u2) ...
update-alternatives: using /usr/bin/vim.gtk3 to provide
/usr/bin/editor (editor) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/eview
(eview) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/evim
(evim) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/ex
(ex) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/gview
(gview) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/gvim
(gvim) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide
/usr/bin/gvimdiff (gvimdiff) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide
/usr/bin/rgview (rgview) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/rgvim
(rgvim) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/rview
(rview) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/rvim
(rvim) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/vi
(vi) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/view
(view) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/vim
(vim) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide
/usr/bin/vimdiff (vimdiff) in auto mode

----- console log end -----
_______________________________________________
Tutor maillist  -  To unsubscribe send an email to [email protected]
To unsubscribe or change subscription options:
%(web_page_url)slistinfo/%(_internal_name)s