In this article, we will setup a powerful and highly customizable setup of vim to make it easy to develop on any technology and language(python, js, C++, go, etc). These steps and commands were performed on Ubuntu for WSL and will work on native ubuntu as well. Also sudo access is required to complete the setup.
zsh and oh-my-zsh should be setup. You can follow this article to set it up — https://medium.com/@genericfornow/simple-and-awesome-zsh-tmux-development-environment-setup-9dc6ac991033
Also clone the repo which contains vim configuration file
git clone https://github.com/aviralwal/newserversetup
Just copy and run the commands 1 by 1 to have a powerful vim setup up and running. You can customize it according to your needs by editing the
~/.vimrc file. Don’t run Python installation steps if you have Python 3.6 installed. Also don’t run vim setup steps if you have vim with Python3 configured.
Installing python 3 for vim
You can skip this step if you have python 3.6 installed in your system(Ubuntu 18.04 comes default with python 3.6 installed). Some of the highly useful and awesome vim plugins use Python 3 as dependency, due to which we need to install Python 3 before proceeding with installing
Skip to Vundle setup if you are using Ubuntu 18.04 since it has vim build with python 3.6 by deafult or if vim is pre built with Python3.
Now that all the required steps for vim are completed, we will proceed with installing vim. First we will remove existing instance of vim from system. Since the ubuntu package manager contains older versions of vim, we will clone the source code for vim and build it in order to use it. We will do it as follows
Finally we’ll setup Vundle. Vundle is a famous vim package manager which we can use to include powerful plugins in vim to make development powerful yet easy. Also we will copy our sample vimrc file which contains all our configuration
Finally we will setup YouCompleteMe. It’s a brilliant and intelligent code completion tool for vim. We need to build it using python3. If you want to use for some specific language, just read the steps here — http://ycm-core.github.io/YouCompleteMe/#user-guide
This completes of awesome vim setup in combination with zsh to improve our development environment so that we can easily write quality code using some great tools. In the next article, we will setup tmux so that we can increase our productivity multi-fold using some very simple and intuitive tricks. Thank you for ready and happy coding.
Also let me know what other tutorials you would like to see to help yourself become better. Also
.vimrc contains a lot of configuration. Since it is quite a long configuration list, we’ll go through it in a separate article.