How to install vim on OpenSUSE / SUSE Linux with zypper
This article will show you how to install the VIM text editor on OpenSUSE / SUSE Linux (SELS) using the zypper command.
How to install vim on OpenSUSE / SUSE Linux
VIM means Vi IMproved and is often called the text editor of a programmer. VIM is very popular among sysadmins, DevOps engineers, regular Linux users. By default, OpenSUSE Linux does not come with vi or vim. However, we can search and install VIM as follows.
Step 1: Search for vim packages
Open a terminal and enter the following command. We can search vim packages with metadata for keywords. Use the following command:
$ sudo zypper search vim
The result will get the following:
Loading repository data. Reading installed packages. S | Name | Summary | Type --+---------------------------+---------------------------------------------------------------------+----------- | gvim | A GUI for Vi | package | llvm-vim-plugins | Vim plugins for LLVM | package | llvm5-vim-plugins | Vim plugins for LLVM | package | llvm7-vim-plugins | Vim plugins for LLVM | package | meson-vim | Vim support for meson.build files | package | neovim | Vim-fork focused on extensibility and agility | package | neovim | Vim-fork focused on extensibility and agility | srcpackage | neovim-lang | Translations for package neovim | package | python-Jinja2-vim | Jinja2 syntax files for Vim | package | python2-neovim | Python client to Neovim | package | python3-neovim | Python client to Neovim | package | rtorrent-vim | Vim syntax file for rTorrent's config file | package | texlive-context-vim | Generate ConTeXt syntax highlighting code from vim | package | texlive-context-vim-doc | Documentation for texlive-context-vim | package | vagrant-vim | Vagrantfile syntax files for the vim editor | package | vim | Vi IMproved | package | vim | Vi IMproved | srcpackage | vim-bootstrap | Vim Bootstrap is a vimrc generator | package | vim-data | Data files needed for extended vim functionality | package | vim-data-common | Common Data files for vim & gvim | package | vim-icinga2 | Vim syntax highlighting for icinga2 | package | vim-plugin-NERDcommenter | A plugin that allows for easy commenting of code for many filetypes | package | vim-plugin-NERDtree | A tree explorer plugin for navigating the filesystem | package | vim-plugin-a | Alternate files quickly | package | vim-plugin-ack | Run the ack search tool from Vim | package | vim-plugin-align | Plugin to produce aligned text, equations, declarations, etc | package | vim-plugin-bufexplorer | Buffer Explorer / Browser | package | vim-plugin-calendar | Calendar for vim | package | vim-plugin-colorschemes | Vim color schemes selection | package | vim-plugin-colorsel | A RGB/HSV color selector | package | vim-plugin-conky | Conky Configuration File Support for Vim | package | vim-plugin-devhelp | Devhelp plugin for Vim | package | vim-plugin-diffchanges | Show changes since the last save | package | vim-plugin-editorconfig | EditorConfig plugin for Vim | package | vim-plugin-fugitive | Fugitive plugin for Vim | package | vim-plugin-gitdiff | Show git diff in a split window | package | vim-plugin-gnupg | Plugin for transparent editing of gpg encrypted files | package | vim-plugin-latex | A rich set of tools for editing LaTeX | package | vim-plugin-locateopen | Edit file without entering the whole path | package | vim-plugin-matrix | Matrix screensaver for vim | package | vim-plugin-minibufexpl | Elegant buffer explorer that takes very little screen space | package | vim-plugin-multiplesearch | Display multiple searches at the same time | package | vim-plugin-neomutt | Neomutt plugin for Vim | package | vim-plugin-nginx | VIM support for nginx config files | package | vim-plugin-powerline | Powerline VIM plugin | package | vim-plugin-project | Organize/Navigate projects of files | package | vim-plugin-quilt | Quilt support for vim | package | vim-plugin-rails | Support for Ruby on Rails development | package | vim-plugin-searchcomplete | Tab completion of words inside of a search | package | vim-plugin-showmarks | Visually shows the location of marks | package | vim-plugin-snipmate | Implements some of TextMate's snippets features in Vim | package | vim-plugin-supertab | Easy insert mode completion with Tab key | package | vim-plugin-taglist | Source code browser with support for many languages | package | vim-plugin-tlib | Utility functions for vim | package | vim-plugin-tregisters | List, edit, and run/execute registers/clipboards | package | vim-plugin-tselectbuffer | A quick buffer selector/switcher | package | vim-plugin-tselectfiles | A quick file selector/browser/explorer | package | vim-plugin-utl | Universal text linking for vim | package | vim-plugin-vimwiki | Personal wiki for vim | package | vim-plugin-zoomwin | Zoom in/out of windows (toggle between one window and multi-window) | package
Step 2: Get information about vim packages on OpenSUSE or SUSE Enterprise Linux
So what we need is vim package. To find out application version information, run:
$ sudo zypper info vim $ sudo zypper info vim-plugin-nginx
Sample output:
Loading repository data. Reading installed packages. Information for package vim: ---------------------------- Repository : Main Update Repository Name : vim Version : 8.0.1568-lp151.5.6.1 Arch : x86_64 Vendor : openSUSE Installed Size : 3.1 MiB Installed : No Status : not installed Source package : vim-8.0.1568-lp151.5.6.1.src Summary : Vi IMproved Description : Vim (Vi IMproved) is an almost compatible version of the UNIX editor vi. Almost every possible command can be performed using only ASCII characters. Only the 'Q' command is missing (you do not need it). Many new features have been added: multilevel undo, command line history, file name completion, block operations, and editing of binary data.
Step 3: Install VIM on OpenSUSE Linux 15.1 server
Execute the following zypper command to install vim:
$ sudo zypper install vim
Step 4: Start using vim
All you have to do is type the following command:
$ vim filename $ sudo vim /etc/nginx/nginx.conf $ vim [options] do-to-rds-migration.sh
We can create a permanent Bash alias:
$ alias vi='vim'
Next, add the bash shell alias to the ~ / .bashrc or ~ / .bash_aliases file:
$ echo "alias vi='vim'" >> ~/.bashrc
Reload, type:
$ source ~/.bashrc
We can also set vim as the default text editor across SUSE Linux Enterprise Server (SLES) systems as follows:
$ sudo -i # echo 'export VISUAL="vim"' > /etc/profile.d/vimeditor.sh # echo 'export EDITOR="vim"' >> /etc/profile.d/vimeditor.sh
Instructions for using VIM
New to VIM? Want to learn all about the Vim commands and editor? No need to search the Internet or buy books about studying. VIM comes with full instructions from start to finish. All you have to do is type the following command at shell prompt:
$ vimtutor
The optional [language] argument is a two-letter name of a language, like 'it' or 'es'. To list installed languages, run the following ls command:
$ ls -l /usr/share/vim/vim*/tutor/
Then type:
$ vimtutor es $ vimtutor lv $ vimtutor tr $ vimtutor it
Install VIM Plugin
First we have to look for vim related packages and plugins as follows:
$ sudo zypper search vim
Assuming you want to install support for Ruby on Rails, use the command:
$ sudo zypper install vim-plugin-rails
Conclude
Vi is the first real screen-based editor for UNIX, and is still very popular among systems and developers. VIM improves vi by adding new features, more windows, undo multiple levels, highlight blocks, etc.
You should read it
- The 5 best Linux server distributions
- How to install Solus Linux
- 8 easy tools to create your own Linux Distro
- 10 reasons to switch to Linux right in 2012
- How to install Linux operating system on Mac
- 28 interesting facts about Linux
- 12 best Linux server operating systems
- 10 things to keep in mind when switching to Linux mobile operating system
May be interested
- How to install fcgiwrap for Nginx on Ubuntu 20.04fcgiwrap is a simple server used to run cgi applications via fastcgi. we can use it to provide clean cgi support for nginx webserver. here's how to install fcgiwrap on ubuntu 20.04.
- How to check the pressure of a Linux systemtesting pressure on linux servers is a good idea if you want to see if they work well. in this post, tipsmake introduces some tools that can help you add pressure to the system to test and evaluate results.
- Releax OS: Independent Linux operating system interesting and full of potential'releax' is not 'relax'. the name 'unlike anyone' actually originated from a typo by the author himself.
- How to use pandoc to convert files on Linuxyou can use pandoc on linux to convert over 40 different file formats. you can also use it to create a simple docs-as-code system by writing to markdown, saving with git and exporting it in any supported format.
- Why are Linux computers still important?phrases like 'the year of the linux computer' or something like that will probably never appear on the market. does this mean linux computers have no power at all? absolutely not! computers running the linux operating system are still great.
- 3.5 million WSL users can now use GPU Compute from Linux right on Windowsgpu compute is often used in machine learning tasks, on wsl 2.