Originally published on Web Warrior Toolbox
NvChad is a code editor that is light weight and can be used from terminal screens. It has a system of add-ons (e.g. lazy vim) that lets you add functionalities found in GUI like editors. If you have a server that has only CLI and you want a rich feature editor, use this. NvChad can also be practicall when you have a dev-pc that will run heavy loads while you need to use an editor at same time(serving a heavy app locally while running Figma, youtube someone?). Anyway give it a try so you have another editor that you can use in these scenarios or other that you think it could be worth it.
How to install (Linux PC)
the process to install has these parts
Install git. You will need to clone a git repo after that.
sudo apt update
sudo apt install git
git --version // check version
Install Neovim. you need version 0.10 or higher
sudo apt update
sudo apt install neovim
nvim --version // check version
install nerdfonts
mkdir -p ~/.local/share/fonts
cd ~/.local/share/fonts
wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip
unzip JetBrainsMono.zip
fc-cache -fv
β οΈ Then set the font in your terminal emulator.
Clone the NvChad repo:
git clone https://github.com/NvChad/starter ~/.config/nvim
start nvchad
nvim
now when you access NvChad you can look at the file tree using space e to open it. Here some more commands to use with the tree
tab // expand/collapse a folder
E // expand folder and subfolder
CC // collapse folder and subfolders
H // show/hide hidden folders
and to move between panel use these commands
ctrl+w // window mode
ctrl+<direction_key> // use hjkl
To open and close terminal window use
alt + h // toggles horizontal terminal.
Tab > Window > Buffer
nvchad has these 3 elements to organize what is shown on screen
A buffer is a file loaded in memory. when you press enter on a file in file tree you open a buffer. Remember these commands.
in normal mode
:bd // close buffer (buffer delete)
:ls // get a list of buffers and its numbers
:b <N> // opens buffer with number N (space can be ommited)
tab // go to next buffer
shifht+tab // previous buffer
Windows and Tabs
A windows is an element that shows 1 buffer. use :q to close a window (you will also close the buffer it contains). Use :qa to close all windows (this closes nvchad)
A tab is an element that shows multiple windows. Here are some commands to manage them
:tabnew // create tab
:split // split with horizontal window
:vsplit // vertical split
:tabs // lists all tabs and windows
Be patient and keep practicing to develop your skills and muscle memory πͺπ₯
Top comments (0)