This is series of articles explaining our development Environment. This time we will be discussing
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 vim
set 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 brace
set hlsearchHighlight all search results
set smartcaseEnable smart-case search
set ignorecaseAlways case-insensitive
set incsearchSearches for strings incrementally
set autoindentAuto-indent new lines
set smartindentEnable smart-indent
set smarttabEnable smart-tabs
set softtabstop=4Number of spaces per Tab
autocmd BufRead,BufNewFile *.md setlocal spellEnables spell check for markdown files, ending with extension md
set complete+=kspellEnables spelling auto complete.
set ruler” Show row and column ruler information
set showtabline=0” Show tab bar
set undolevels=200” Number of undo levels
set backspace=indent,eol,start” Backspace behaviours
filetype plugin onEnables filetype detection along with plugins.
set tabstop=2Set tabstop to tell vim 2 columns a tab counts for
set shiftwidth=2Set number of space characters inserted for indentation
set shiftroundRound indent to multiple of ‘shiftwidth’.
set expandtabspaces to insert a
set clipboard=unnamedUse the system clipboard
set regexpengine=1Enables regular expression engine
set autoreadWatch for file changes outside vim
set acdChanges the working directory on each load
let mapleader = "\<Space>"Map leader to Space bar
nnoremap <leader><leader> <C-^>Switch buffers
You can view the help text for any commands by running
:help COMMAND eg;
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