Add simple nvim personalizations

This commit is contained in:
Marty Oehme 2019-03-09 21:27:14 +01:00
parent 6ee6fb96f6
commit 712b6b389a

View file

@ -3,5 +3,40 @@
call plug#begin('~/.local/share/nvim/plugged') call plug#begin('~/.local/share/nvim/plugged')
Plug 'tpope/vim-sensible' Plug 'tpope/vim-sensible'
Plug 'stephpy/vim-yaml'
call plug#end() call plug#end()
" many of these come from
" http://stevelosh.com/blog/2010/09/coming-home-to-vim/#using-the-leader
" sets tabs to be 4 characters, expanded into spaces, but still removable with
" one press of backspace.
" great explanation: http://vimcasts.org/transcripts/2/en/
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
" shows linenumbers relative to the one you are on, for easy movement and
" dNUMBERd deletions
set relativenumber
" keeps an undofile next to files so that you can even undo if vim is closed
" in between
set undofile
let mapleader = "<space>"
" ignores case by default but will use case when search is specifically not
" all lowercased
set ignorecase
set smartcase
" remove search highlights by pressing space+n
nnoremap <leader>n :noh<cr>
" move around between matching brackets with tab
nnoremap <tab> %
nnoremap <tab> %