how to configure neovim from scratch in termux

oscarjeremiasdev

Oscar Jeremias jc

Posted on April 2, 2022

how to configure neovim from scratch in termux

Hello devs in today's post we will learn how to configure neovim from scratch in termux.

Let's learn how to install Plus that will make your life easier as a front-end developer.

Follow the steps.

1.install termux

Click on this link termux and download the termux  and then run these commands below

pkg update
Enter fullscreen mode Exit fullscreen mode
pkg upgrade
Enter fullscreen mode Exit fullscreen mode

2.Install neovim

Open termux and run this command

pkg install neovim -y
Enter fullscreen mode Exit fullscreen mode

3.Install Plug-vim

Open termux and run these commands

Plug-vim

sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
Enter fullscreen mode Exit fullscreen mode

configuration file

cd .config
Enter fullscreen mode Exit fullscreen mode
mkdir nvim
Enter fullscreen mode Exit fullscreen mode
touch init.vim
Enter fullscreen mode Exit fullscreen mode

4.Install Plugs

Open termux and run these commands

nvim init.vim
Enter fullscreen mode Exit fullscreen mode

After executing this command, you will enter neovim and then you will copy and paste this code below in your neovim that will install one dark theme plug in your neovim

call plug#begin()

Plug 'one-dark/onedark.nvim'

call plug#end()

colorscheme onedark
Enter fullscreen mode Exit fullscreen mode

Open termux and run this command to open neovim

nvim
Enter fullscreen mode Exit fullscreen mode

After entering noevim run these commands

:PlugInstall
Enter fullscreen mode Exit fullscreen mode

Click ESC on your keyboard

Then run this command in neovim to exit neovim

:q
Enter fullscreen mode Exit fullscreen mode

Then open neovim again and you will see that your theme will change to one dark

nvim
Enter fullscreen mode Exit fullscreen mode

5.Install NERDtree

Plug for file management

You will add this code below in the same code where the one dark code is to install nerdtree

Plug 'preservim/nerdtree'
Enter fullscreen mode Exit fullscreen mode

Add this code below in the same code where the one dark code is below the one dark code this code is the nerdtree configuration for when you click CTRL + n to open a toolbar file browsing

nnoremap <C-n> :NERDTree<CR>
Enter fullscreen mode Exit fullscreen mode

6.Install vim-polyglot

Sytanx highlighter plug from various programming languages ​​like javascript python c c++ c# and more

You will add this code below in the same code where the one dark code is to install vim-polyglot

Plug 'sheerun/vim-polyglot'
Enter fullscreen mode Exit fullscreen mode

7.Install vim-rainbow

Parent braces and square brackets highlight plug

You will add this code below in the same code where the one dark code is to install vim-rainbow

Plug 'frazrepo/vim-rainbow'
Enter fullscreen mode Exit fullscreen mode

8.Install Plug lightline.vim

Neovim mode bar color plug

You will add this code below in the same code where the one dark code is to install lightline.vim

Plug 'itchyny/lightline.vim'
Enter fullscreen mode Exit fullscreen mode

9.Install coc.nvim

Front end technologies autocomplete plugin

You will add this code below in the same code where the one dark code is to install coc-nvim

Plug 'neoclide/coc.nvim', {'branch': 'release'}
Enter fullscreen mode Exit fullscreen mode

Now let's install the plugs added in the previous lines of the init.vim file

Open termux and run these commands

open neovim

nvim 
Enter fullscreen mode Exit fullscreen mode

Install the Plugs

:PlugInstall
Enter fullscreen mode Exit fullscreen mode

Click ESC on your keyboard

Then run this command in neovim to exit neovim

:q
Enter fullscreen mode Exit fullscreen mode

Open neovim again and you will see the results of the installed plugs and you will see how to change your neovim from 0 to 100.

nvim
Enter fullscreen mode Exit fullscreen mode

additional settings

call plug#begin()

   Plug 'one-dark/onedark.nvim'
   Plug 'sheerun/vim-polyglot'
   Plug 'preservim/nerdtree'
   Plug 'neoclide/coc.nvim', {'branch': 'release'}
   Plug 'frazrepo/vim-rainbow'
   Plug 'itchyny/lightline.vim'

  call plug#end()

  set number
  set nocompatible
  colorscheme onedark
  nnoremap <C-n> :NERDTree<CR>
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
oscarjeremiasdev
Oscar Jeremias jc

Posted on April 2, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related