Link to home
Start Free TrialLog in
Avatar of naseeam
naseeamFlag for United States of America

asked on

I need latest full featured vim installed in my linux laptop?

I have Darter Pro Linux Laptop running Ubuntu 18.04 LTS (64-bit).  It was shipped with vi editor pre-installed.  In following thread I asked how to install vim.
https://www.experts-exchange.com/questions/29165311/How-to-install-vim-in-Linux-laptop-that-is-pre-installed-with-vi.html
I selected following solution.
>> vim and vi in newer versions are one and the same, run vi --version;

Attached version information shows that I have vim 8.0.  I think lot of features are missing.  There is no multiple file support.  I open many files from
command prompt but only One file opens.
There is no support for python.  See attached     -python3, meaning python3 feature is missing.
Also, it says small version without GUI.  Please see attached version information.
Avatar of arnold
arnold
Flag of United States of America image

When you open multiple files, you can view one at a time, there is an option to move to the next file
Escape colon-n
:n
Moves to the next file
:p if memory serves moves to previous....
Avatar of naseeam

ASKER

I know the basics of working with multiple files in vim.  Please re-read my question.  I tried to open multiple files but only One file opened.
There is no multi-file support in vim 8.0 installed in my computer.  It's missing many features.

Oh! I forgot to attach screenshot of version information.
vi_version.png
https://www.vim.org/ - details of vim.

Version 8.0 is currently general version shipped.

If you require version 8.1.X then setup https://launchpad.net/~jonathonf/+archive/ubuntu/vim PPA to install latest version.

Tip: It's doubtful you'll find very much practical difference between the 8.0 + 8.1 versions.
Avatar of naseeam

ASKER

vim 8.0 is fine but why I cannot open multiple files.  Some or lot of features are missing from my vim 8.0 ?
Please clarify what you mean. It is a text editor.
What are you Expecting from vi/vim to open multiple windows?

man vi
Or within vi, :h will provide you with a guide. I think there are additional options..
See if the following helps, http://glaciated.org/vi/

:ref restarts from first file see options/directives in link.
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Even though the vi command announces itself as vim, it is a lightweight version.  See if things work as they once did if you run vim instead.

I alias vi=vim on all my machines.
To open multiple files, one at a time, you'll issue the command...

vi path(s)

Open in new window


If this fails, provide output of the following commands...

vi --version | head -n 1

id

ls -ld path(s)

Open in new window

>>To open multiple files, one at a time, you'll issue the command...

You don't have to specify them all on the command line.  You can open as many buffers as you want after you are in vim.
Avatar of naseeam

ASKER

>>  run vim instead
amernaseem@system76-pc:~/hobby_programming$ vim

Command 'vim' not found, but can be installed with:

sudo apt install vim      
sudo apt install vim-gtk3  
sudo apt install vim-tiny  
sudo apt install neovim    
sudo apt install vim-athena
sudo apt install vim-gtk  
sudo apt install vim-nox

>> I alias vi=vim
How do i do this alias.  vi is installed in /usr/bin/vi
there was a time where vi and vim where two separate or vim acted as the old vi.
I think in newer version, vi and vim and in the case we have, vim is not an installed command.
I am not sure what the issue is?
could you explain what issue you are running into , are you trying to edit specific types of files, but vi/vim does not recognize these types ?

to alias such that you can enter vim and get it running is
alias vim='/usr/bin/vi'
since in your case you have a vi command.

add this entry in .bashrc
and the next time you login whether you type vi or vim you will have the editor open up.
>>alias vim='/usr/bin/vi'

Don't do that.  vim has more features than the old vi and even vim-lite.  You would be losing features if you did that.

>>Command 'vim' not found, but can be installed with:

Then vim isn't installed or isn't in your PATH.

See if it is somewhere:
find / -name vim
Small/huge none come with a GUI it is a text editor. Not sure what GUI you are looking for.
Depending on the UBUNTU version you chose, you can Have Gnome, etc. as the desktop and it has its own text editor.
for GUI based editor, look at emacsx. If memory serves, emacs also includes the color markers for editing different types of files and color coding them.

Potentially, you may have to uninstall the vi package you have and install the larger one.

Go through the aptitude interface looking at text editors it might be easier through that mechanism, that using apt-get install vim which your prior attempts seem to have gone for not.
either it reported an error or seeing that you have a package installed and merely saw it as a conflict that fell through. thought it should have given you a warning or prompted you to see whether you want to remove the vi package in favor of the new one.

I do not understand what your epxectation is of opening "multiple files"
Are you thinking it will be "tabbed" through which you can choose in Graphical mode
versus going :n to the next file
if you want to go to the begining :rew
Avatar of naseeam

ASKER

>> find / -name vim > result.txt
Please see attached for results.

@arnold -  My laptop came with vim 8.0 lightweight.  I need vim 8.0 with all features.
etc_vim.png
usr_share_vim.png
var_lib_vim.png
result.txt
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
According to post https:#a42989167 the user indicates an attempt to install vim.

Which desktop GUI interface are you running?
you may need to run
apt-get install <package based on your GUI interface>

vim-athena
vim-gnome
vim-gtk


vim-nox to handle various scripts...
>>the user indicates an attempt to install vim.

I don't see the attempt in that post.  I see vim telling them what commands can be used to install it.
correction noted.
To install latest + full version (rather than tiny version) of vim, you'll do the following, as root...

# Show your current vim version
vim --version | head -n 1
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 06 2019 17:31:41)

# Setup vim 8.1+ PPA
sudo add-apt-repository ppa:jonathonf/vim < /dev/null

# Pull in new vim packages to local package cache
apt-get update

# Purge old version of vim (either vim-tiny or whatever other vim you've installed)
apt-get -y purge vim-tiny

# Install latest vim (which will vary daily, based on current version packaged)
# Notice this installs vim full version, rather than vim-tiny (normal default)
apt-get -y install vim

# Now you'll have vim latest installed
vim --version | head -n 1
VIM - Vi IMproved 8.1 (2018 May 18, compiled Nov 26 2019 13:18:48)
Avatar of naseeam

ASKER

# Setup vim 8.1+ PPA
sudo add-apt-repository ppa:jonathonf/vim < /dev/null

Can you explain this step?  What is PPA?  what is jonathan?  Do I type this exact command?
Avatar of naseeam

ASKER

Thank you for understanding my issue.
To understand PPAs, you'll require a good bit of reading.

The short version is PPAs are software repositories.

Some are sanctioned. Some are not.

Best to stick with the sanctioned PPAs... which means they've been around for a long time + either provide packages to all Ubuntu installs are have been around so long its clear the PPAs are legit. The rule here is... you just have to be involved with Ubuntu dev on a daily basis + you'll get a feel for which PPAs are useful + which should be avoided.

The add-app-repository simply adds a new PPA to your repository list, so in the case above you're adding a PPA named jonathan for latest vim packages, as this PPA seems to be one PPA where normal vim packages are build on a regular basis.

Each of the commands above is documented, so you can quickly tell which commands show information + which modify your system.

You must follow the above instructions to run add-app-repository + apt-add update to then be able to install a package from the new PPA added to your system.