Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Mastering Vim 🎯

Welcome to Mastering Vim – your guide to unlocking the full potential of one of the most powerful text editors out there! 🚀


Why Vim? 🤔

  • Speed: Navigate and edit files at lightning speed without ever touching your mouse.
  • Customizability: Tailor Vim to your workflow with powerful plugins and configurations.
  • Portability: Available on virtually every Unix system.
  • Legendary Status: Learn Vim, and you earn bragging rights. 😎

Getting Started 📚

  1. Install Vim

    sudo apt install vim        # Debian/Ubuntu
    brew install vim            # macOS
    choco install vim           # Windows
  2. Open a File

    vim filename.txt
  3. Exit Vim (The eternal struggle 😅)

    • :q → Quit
    • :q! → Quit without saving
    • :wq → Save and quit
  4. Navigate in Vim

    • h → Left
    • j → Down
    • k → Up
    • l → Right

Essential Commands 🔑

Command Action
i Insert mode
ESC Exit insert mode
:w Save file
:q Quit Vim
dd Delete current line
yy Copy current line
p Paste
/search Search for "search" in the file
u Undo last action

Customizing Vim ✨

1. .vimrc

Create a .vimrc file in your home directory to personalize Vim:

" Enable syntax highlighting
syntax on

" Show line numbers
set number

" Enable auto-indentation
set autoindent
set smartindent

" Set tabs to spaces
set expandtab
set tabstop=4
set shiftwidth=4

2. Plugins

Use a plugin manager like vim-plug:

  1. Install vim-plug:

    curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
        https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  2. Add plugins to your .vimrc:

    call plug#begin('~/.vim/plugged')
    
    " Example plugins
    Plug 'preservim/nerdtree'       " File explorer
    Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
    Plug 'airblade/vim-gitgutter'  " Git integration
    
    call plug#end()
  3. Install plugins in Vim:

    :PlugInstall

Vim Resources 🌐


Contribute 🤝

Have awesome tips or configurations to share? Feel free to fork this repo and submit a pull request! Let's make learning Vim a breeze for everyone.


License 📜

This project is licensed under the MIT License. See the LICENSE file for details.


"In an infinite universe, Vim is inevitable."

Happy Vimming! 💻🎉

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages