" Show line numbers set number " This enables relative line numbering mode. With both number and " relativenumber enabled, the current line shows the true line number, while " all other lines (above and below) are numbered relative to the current line. " This is useful because you can tell, at a glance, what count is needed to " jump up or down to a particular line, by {count}k to go up or {count}j to go " down. set relativenumber " Wrap text set wrap " Encoding set encoding=utf-8 " Status bar " set laststatus=2 " set noshowmode " Set color if !has('gui_running') set t_Co=256 set termguicolors hi LineNr ctermbg=NONE guibg=NONE endif " Comments in Grey color and italic hi Comment guifg=#5C6370 ctermfg=50 cterm=italic " Vim is based on Vi. Setting `nocompatible` switches from the default " Vi-compatibility mode and enables useful Vim functionality. This " configuration option turns out not to be necessary for the file named " '~/.vimrc', because Vim automatically enters nocompatible mode if that file " is present. But we're including it here just in case this config file is " loaded some other way (e.g. saved as `foo`, and then Vim started with " `vim -u foo`). set nocompatible " Turn on syntax highlighting. syntax on " Highlight matching pairs of [] {} () set showmatch " Disable the default Vim startup message. set shortmess+=I " The backspace key has slightly unintuitive behavior by default. For example, " by default, you can't backspace before the insertion point set with 'i'. " This configuration makes backspace behave more reasonably, in that you can " backspace over anything. set backspace=indent,eol,start " By default, Vim doesn't let you hide a buffer (i.e. have a buffer that isn't " shown in any window) that has unsaved changes. This is to prevent you from " " forgetting about unsaved changes and then quitting e.g. via `:qa!`. We find " hidden buffers helpful enough to disable this protection. See `:help hidden` " for more information on this. set hidden " This setting makes search case-insensitive when all characters in the string " being searched are lowercase. However, the search becomes case-sensitive if " it contains any capital letters. This makes searching more convenient. set ignorecase set smartcase " Enable searching as you type, rather than waiting till you press enter. set incsearch " Highlight search pattern set hlsearch " Unbind some useless/annoying default key bindings. nmap Q " 'Q' in normal mode enters Ex mode. You almost never want this. " Disable audible bell because it's annoying. set noerrorbells visualbell t_vb= " Enable mouse support. You should avoid relying on this too much, but it can " sometimes be convenient. set mouse+=a " Sync vim clipboard with system clipboard " Works across Linux, MacOS & Windows set clipboard^=unnamed,unnamedplus " Try to prevent bad habits like using the arrow keys for movement. This is " not the only possible bad habit. For example, holding down the h/j/k/l keys " for movement, rather than using more efficient movement commands, is also a " bad habit. The former is enforceable through a .vimrc, while we don't know " how to prevent the latter. " Do this in normal mode... nnoremap :echoe "Use h" nnoremap :echoe "Use l" nnoremap :echoe "Use k" nnoremap :echoe "Use j" " ...and in insert mode inoremap :echoe "Use h" inoremap :echoe "Use l" inoremap :echoe "Use k" inoremap :echoe "Use j" " Center the cursor when doing 1/2 page down and page up nnoremap zz nnoremap zz " Call the .vimrc.plug file if filereadable(expand("~/.vimrc.plug")) source ~/.vimrc.plug endif " let g:lightline = { 'colorscheme': 'gotham'} let g:lightline = { 'colorscheme': 'deepspace'} colorscheme deep-space