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
- Reasons to switch to Linuxlinux is often considered a joke by non-users, but there are many reasons to love distributions like ubuntu and opensuse. here's why you should switch to linux!
- 11 best Linux distributions for programmersyou can do many things on linux distributions in addition to browsing. it is configured for most uses including programming.
- What is the difference between Linux distributions?the following article points out the differences between linux distributions like ubuntu, fedora, linux mint, debian, opensuse and many others. why are there so many linux distributions and what are the differences between them?
- How to install and use Kali Linux on VmWare virtual machineuntil now, a famous linux distro, kali linux, has always been sought by security experts or hackers. why? simply because kali linux has a built-in range of tools for penetration, hacking, analysis, etc. all are categorized very clearly.
- How to install Solus Linuxrecently, the linux community has given winged compliments to solus linux. this is understandable because this is a beautiful operating system with lots of great features. in a world where most popular linux distributions are 'derivative ubuntu', solus linux really stands out.
- 5 reasons to install Linux on old computersa lot of people like to use linux on older machines. everyone has a different reason. some people may want to save money by not upgrading to a new computer, while others may want to avoid wasting usable electronics.
- How to install Kali Linux on macOSsince the release of kali linux 1.0.8, kali linux supports efi. this additional feature simplifies the process of installing and running potassium on various apple macbook air, pro and retina models.
- Steps to install Webex for Linuxwebex is now available for linux. linux communities and users can use webex to bring you live messaging, meetings, and calling in work and education environments.
- How to install NVIDIA drivers on Kali Linuxthis document explains how to install nvidia drivers on kali linux and supports cuda, allowing integration with popular intrusion testing tools.
- How to install Kali Linux on Android using Linux Deployinstalling kali linux on android devices is no longer a difficult job thanks to the linux deploy tool. read the following article to learn how to do it.