This document provides guides and instructions on how to quickly set up vim as part of an efficient developer's workflow.
i=> Enter Insert mode.Esc=> Exit Insert mode.yy=> Copy entire line into vim clipboard.p=> Paste clipboard content.dd=> Delete entire line where cursor is currently positioned.Shift+Z+Z=> Exitvimeditor.Shift+G=> Go to end-of-file.
Copy the following in the the file ~/.vimrc on Linux or C:\Users\%USERNAME%\_vimrc on Windows . If the file does not exist, create it using cd $HOME && touch .vimrc command:
" Allow easier navigation of vim editor via mouse clicks as well as copying of text outside of vim.setmouse=a" Prevent sections in .md files from collapsing unexpected and causing dev frustrations.setnofoldenable" Prevent vim from automatically shrinking paragraphs for easier editing.setsecuresetclipboard=unnamedplus" Allow lines copied in vim to be pasted onto global clipboard.setnumber" Display line number when editing.setnoswapfile" Optional - Prevent backup files from being generated automatically.setnobackup" Optional - Prevent backup files from being generated automatically.setnowritebackup" Optional - Prevent backup files from being generated automatically.Follow the instructions below to install plugins using Vundle. For Vundle installation instructions, please refer to the official Vundle GitHub page.
- Include the following plugin statement in
.vimrcor_vimrcbetween the two lines as shown below:
callvundle#begin()
Plugin'<github/url_slug>'" Eg. Plugin 'plasticboy/vim-markdown'callvundle#end()- Run
:PluginInstallto install the newly added plugin.
vim
# Within the vim shell
:PluginInstallFollow the instructions below to remove plugins using Vundle.
vim
# Within the vim shell
:PluginClean
# Indicate y to continue.- Install
vimvia Chocolatey. Open a command prompt with administrative rights:
choco install vim -y- Configure
vimvia modifying the file,C:\tools\vim\_vimrc:
notepad C:\tools\vim\_vimrcYou can configure based on the Configurations recommended settings above.
- How To Install vim Plugins by Seth Kenlon: https://opensource.com/article/20/2/how-install-vim-plugins
- Writing and Previewing Markdown in Real Time with Vim 8+: https://nickjanetakis.com/blog/writing-and-previewing-markdown-in-real-time-with-vim-8