Fading Coder

One Final Commit for the Last Sprint

Home > Tech > Content

Compiling and Installing Vim from Source on Ubuntu

Tech 1

First, remove any pre-installed Vim packages from your Ubuntu system to avoid conflicts:

sudo apt-get remove --purge vim vim-runtime vim-tiny vim-common

Next, clone the latest Vim source code to your home directory:

cd ~ && git clone https://github.com/vim/vim.git

Install all required build dependencies and development libraries to enable full language and feature support:

sudo apt-get install libncurses5-dev python-dev python3-dev ruby-dev liblua5.3-dev libperl-dev git

Navigate to the source build directory, clean any previous build artifacts, configure the build with your desired features, compile, and install:

cd vim/src
# Clean up old build data if you have compiled Vim here before
make distclean
./configure \
            --prefix=/usr/local \
            --with-features=huge \
            --enable-multibyte \
            --enable-cscope \
            --enable-python3interp=yes \
            --with-python3-config-dir=$(python3-config --configdir) \
            --enable-rubyinterp=yes \
            --enable-perlinterp=yes \
            --enable-luainterp=yes
make
sudo make install

Update system alternatives to set your newly compiled Vim as the default editor for both vi and editor commands:

sudo update-alternatives --install /usr/bin/editor editor /usr/local/bin/vim 1
sudo update-alternatives --set editor /usr/local/bin/vim
sudo update-alternatives --install /usr/bin/vi vi /usr/local/bin/vim 1
sudo update-alternatives --set vi /usr/local/bin/vim

Related Articles

Understanding Strong and Weak References in Java

Strong References Strong reference are the most prevalent type of object referencing in Java. When an object has a strong reference pointing to it, the garbage collector will not reclaim its memory. F...

Comprehensive Guide to SSTI Explained with Payload Bypass Techniques

Introduction Server-Side Template Injection (SSTI) is a vulnerability in web applications where user input is improper handled within the template engine and executed on the server. This exploit can r...

Implement Image Upload Functionality for Django Integrated TinyMCE Editor

Django’s Admin panel is highly user-friendly, and pairing it with TinyMCE, an effective rich text editor, simplifies content management significantly. Combining the two is particular useful for bloggi...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.