This is series of articles explaining our development Environment. This time we will be discussing
about vimrc which is a configuration file that we can use to manage our Vim settings.
You can find the file here.
Basic Vim Settings
set numberIt enables line number in vimset relativenumberEnables relative numbers in vim. Means Vim will adjust line numbers based on your current cursor position.set linebreakBreak lines at word if you have enabled wraplines.set showbreak=+++Identify breaked lines with +++set textwidth=100Line wrap (number of cols)set showmatchHighlight matching braceset hlsearchHighlight all search resultsset smartcaseEnable smart-case searchset ignorecaseAlways case-insensitiveset incsearchSearches for strings incrementallyset autoindentAuto-indent new linesset smartindentEnable smart-indentset smarttabEnable smart-tabsset softtabstop=4Number of spaces per Tabautocmd BufRead,BufNewFile *.md setlocal spellEnables spell check for markdown files, ending with extension mdset complete+=kspellEnables spelling auto complete.
Advanced Settings
set ruler” Show row and column ruler informationset showtabline=0” Show tab barset undolevels=200” Number of undo levelsset backspace=indent,eol,start” Backspace behavioursfiletype plugin onEnables filetype detection along with plugins.set tabstop=2Set tabstop to tell vim 2 columns a tab counts forset shiftwidth=2Set number of space characters inserted for indentationset shiftroundRound indent to multiple of ‘shiftwidth’.set expandtabspaces to insert aTabset clipboard=unnamedUse the system clipboardset regexpengine=1Enables regular expression engineset autoreadWatch for file changes outside vimset acdChanges the working directory on each loadautochdirlet mapleader = "\<Space>"Map leader to Space barnnoremap <leader><leader> <C-^>Switch buffers
Remember
You can view the help text for any commands by running :help COMMAND eg; :help regexpengine
This article originally appeared on lightrains.com
Leave a comment
To make a comment, please send an e-mail using the button below. Your e-mail address won't be shared and will be deleted from our records after the comment is published. If you don't want your real name to be credited alongside your comment, please specify the name you would like to use. If you would like your name to link to a specific URL, please share that as well. Thank you.
Comment via email