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
pkg upgrade
2.Install neovim
Open termux and run this command
pkg install neovim -y
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'
configuration file
cd .config
mkdir nvim
touch init.vim
4.Install Plugs
Open termux and run these commands
nvim init.vim
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
Open termux and run this command to open neovim
nvim
After entering noevim run these commands
:PlugInstall
Click ESC on your keyboard
Then run this command in neovim to exit neovim
:q
Then open neovim again and you will see that your theme will change to one dark
nvim
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'
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>
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'
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'
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'
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'}
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
Install the Plugs
:PlugInstall
Click ESC on your keyboard
Then run this command in neovim to exit neovim
:q
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
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>
Top comments (5)
That helped me very much.
Thank you.
I'm just here to share my knowledge and I'm grateful to see that my knowledge helps people my linkedin.com oscar jeremias
curl: (3) URL using bad/illegal format or missing URL
I'm trying to install the plugins but the curl is not working on me , can you help me
It's because of the backslash
change this url
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ raw.githubusercontent.com/junegunn...'
to this
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \raw.githubusercontent.com/junegunn...'
after --create-dirs there is a space between \ and https, just delete that extra space,