DEV Community

Ayedoun Châ-Fine ADEBI
Ayedoun Châ-Fine ADEBI

Posted on

🎉 Welcome to the LazyVim Adventure! 🎉 Part1

So, you’ve bravely ventured into the mysterious world of LazyVim, huh? It’s like taming a wild dragon of productivity—but don’t worry, by the end of this guide, you’ll be riding that dragon like a pro. Let’s start from the basics and make this fun!


🛠️ Step 1: What the Heck is LazyVim?

LazyVim is a pre-configured setup for Neovim, the supercharged version of Vim. Think of it as a toolkit for coding ninjas—it’s powerful, lightweight, and can slice through your projects like butter.

If you’ve already installed LazyVim but are scratching your head on what to do next, don’t worry, my friend. Let’s get you up to speed.


🏁 Step 2: First Things First - Open LazyVim

Fire up your terminal (you know, the black screen where the magic happens) and type:

nvim
Enter fullscreen mode Exit fullscreen mode

🚨 If that doesn’t work, make sure Neovim is installed. You can install it using:

sudo apt install neovim     # For Debian/Ubuntu
sudo dnf install neovim     # For Fedora
sudo xbps-install -y neovim # Void linux
Enter fullscreen mode Exit fullscreen mode

When you type nvim, you should see something snazzy. If it looks like a wall of text with fancy colors, congrats! LazyVim is alive. 🎉


🖱️ Step 3: Quit Without Screaming

Can’t figure out how to exit? Don’t smash your keyboard! Just press the following keys in sequence:

  1. Hit ESC (to make sure you're in "normal mode").
  2. Type :q (short for quit).
  3. Press Enter.

Boom. You’ve quit like a champ. Now you know the first rule of Vim Club: Escape is your best friend.


🔍 Step 4: Exploring LazyVim's Superpowers

LazyVim is loaded with plugins that make coding faster and better. Let’s check out the basics:

📁 Open a File

Type:

nvim myfile.py
Enter fullscreen mode Exit fullscreen mode

Replace myfile.py with your actual file name (yes, even .txt works). LazyVim will load the file, and you’re ready to edit.

🧑‍💻 Write Some Code

Type anything you want. Let your creativity flow. Then save your masterpiece:

  1. Hit ESC.
  2. Type :w (short for write).
  3. Press Enter.

🛡️ Step 5: Lazy Load That Productivity

LazyVim comes with lazy.nvim, a plugin manager. Think of it as the wizard that handles all your spellbooks (a.k.a. plugins). Let’s summon it!

🔥 Open LazyVim’s Plugin Menu

Press:

<leader> + l
Enter fullscreen mode Exit fullscreen mode

What’s <leader>? It’s the spacebar! So, press Space + l, and voilà, your plugin manager appears.


🚀 Step 6: Supercharge with Plugins

Want to add more magic? Let’s install a plugin:

  1. Open the Lazy plugin menu with Space + l.
  2. Add a plugin to the configuration file(~/.config/nvim/init.lua). Type:
   return {
       { 'tpope/vim-surround' } -- Example plugin
   }
Enter fullscreen mode Exit fullscreen mode
  1. Save and reload your config: :so %.

🎨 Step 7: Customize LazyVim

LazyVim is highly customizable, so you can make it yours. Open your LazyVim config file:

nvim ~/.config/nvim/lua/custom/config.lua
Enter fullscreen mode Exit fullscreen mode

Tweak settings to your heart’s desire, like setting a new colorscheme:

vim.cmd('colorscheme gruvbox')
Enter fullscreen mode Exit fullscreen mode

🎯 Step 8: Quick Tips to Master LazyVim

  • Navigate Between Files:

    :e filename opens a file. Use :q to close it.

  • Split Windows:

    • Horizontal: :split or Ctrl-w s
    • Vertical: :vsplit or Ctrl-w v
  • Switch Between Splits:


    Use Ctrl-w + arrow keys.

  • Close Neovim:


    Type :qa (quit all).


🎉 Step 9: Celebrate!

You’re officially on your way to becoming a LazyVim wizard. Remember, it’s okay to feel overwhelmed at first. Take it one step at a time, and soon, you’ll be zipping through code like a true ninja.

Need more help? Type :help in Neovim—it’s like a treasure chest of tips. And most importantly, have fun! 🚀

Top comments (0)