Notes for second vim-fundamentals course meetup =============================================== newline another Date: August 27, 2021 newline another Mahesh Subrajmanium Venkatachalam - Plugins | Installing a Theme Hunter Phillips - Quickfix | Offline Ordering with getqflist Andrea Wackerle - Search & Replace | Macros Matthew Fletcher - Registers | Advanced Motions Jump, Delete, & Select | Advanced Motions: Paste & Move Nicholas Payne - My First Vim Plugin | What Makes a Good Plugin Zev Averbach - Harpoon | Wrap up ## Plugin-manager - get a plugin manager - unless you are going full lua, most people use vim-plug by the great junegunn [https://github.com/junegunn/vim-plug](https://github.com/junegunn/vim-plug){.hoverlink} ## Install pluggged ```bash curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim ``` ```vim call plug#begin('~/.vim/plugged') Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' call plug#end() ``` ## Install Plugins ```vim :PlugInstall :PlugClean :PlugUpdate ``` ## Installing a Theme install using plug ```vim Plug 'ayu-theme/ayu-vim' ``` set the theme ```vim set termguicolors let ayucolor="dark" colorscheme ayu ``` ## Quickfix sending things to the quickfix list ```vim :grep SOCKET_OPEN **/*.(c\|h) ``` quickfix commands ```vim :copen :cnext :cdo s/vim/nvim/g ``` ## Some remaps to consider ```vim nnoremap :cnext nnoremap :cprev nnoremap :copen ``` ## Offline Ordering with getqflist ## Search & Replace Walk through example. ```bash curl https://raw.githubusercontent.com/ThePrimeagen/vim-fundamentals/master/course-website/lessons/exercise-3-search-and-replace.md > exercise.md && vim exercise.md ``` ## Macros - Macro Pressure ```bash curl https://raw.githubusercontent.com/ThePrimeagen/vim-fundamentals/master/course-website/lessons/exercise-4-macros.md > exercise.md && vim exercise.md ```