Disclaimer: I do not have enough "reputations" for writing a comment so I post this message as an answer.
Please check with whereis vim
and then try to find the ELF file using the file <pathname>
command. When you find it, use it directly and see if you still have the problem.
Example (for my machine and note that the lines starting with $
are the commands I typed):
$ whereis vim
vim: /usr/bin/vim.basic /usr/bin/vim.gnome /usr/bin/vim /usr/bin/vim.tiny /etc/vim /usr/share/vim /usr/share/man/man1/vim.1.gz
$ file /usr/bin/vim
/usr/bin/vim: symbolic link to /etc/alternatives/vim
$ file /etc/alternatives/vim
/etc/alternatives/vim: symbolic link to /usr/bin/vim.gnome
$ file /usr/bin/vim.gnome
/usr/bin/vim.gnome: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=4780361a80931ec2b91b7c62c32364d4b0bd49aa, stripped
$ /usr/bin/vim.gnome
If everything act normally with the ELF file, this means somewhere you have an alias or a script file changing the behaviour.
Search in your .bashrc
(or anything corresponding to your shell) for aliases like
alias vim='/usr/bin/vim example you got pranked'
Maybe when searching for the ELF file, file
indicated that one file is a script file (example /usr/bin/vim: Bourne-Again shell script, ASCII text executable
). If this is the case, check the file, maybe you will have something like this:
#!/bin/bash
/usr/bin/vim.gnome example you got pranked
I hope it helped.
PS: In our school, a classmate and I thought it was sad that most of the students use gedit when doing exams on the school computers. He had the great idea to move, on some school computers, /usr/bin/gedit
to /usr/bin/gedit.bak
and to create a script file /usr/bin/gedit
that would open the freshly moved gedit alongside with ten terminals with Vim opened in them.