dotfiles/.config/nvim/init.vim

63 lines
1.3 KiB
VimL
Raw Normal View History

let mapleader = " "
2021-06-03 00:36:07 +00:00
function! s:LoadPlugins()
call plug#begin('~/.config/nvim/plugged')
source ~/.config/nvim/plugins.vim
call plug#end()
endfunction
function! s:SourceConfigFilesIn(directory)
let directory_splat = '~/.config/nvim/' . a:directory . '/*'
for config_file in split(glob(directory_splat), '\n')
if filereadable(config_file)
execute 'source' config_file
endif
endfor
endfunction
2021-06-03 00:36:07 +00:00
call s:LoadPlugins()
2021-05-08 18:48:15 +00:00
syntax on
filetype on
filetype indent on
filetype plugin on
2021-05-08 18:02:07 +00:00
set complete+=kspell
set expandtab
set foldlevelstart=99 " Start unfolded
set foldmethod=indent
set noswapfile
set nowrap
set number relativenumber
set scrolloff=10 " Automatically scroll
set shiftwidth=2
set smartindent
set tabstop=2 softtabstop=2
set termguicolors
2021-06-04 11:00:00 +00:00
call s:SourceConfigFilesIn('plugins')
2021-05-29 06:22:37 +00:00
colorscheme nord
" Remaps
nnoremap <leader>pv :Vex<CR>
nnoremap <Leader>so :so ~/.config/nvim/init.vim<CR>
nnoremap <C-p> :Files<CR>
2021-05-06 20:49:52 +00:00
" Remove arrow keys
noremap <up> <nop>
noremap <down> <nop>
noremap <left> <nop>
noremap <right> <nop>
2021-05-08 18:48:15 +00:00
autocmd FileType gitcommit highlight ColorColumn ctermbg=8
autocmd FileType gitcommit setlocal colorcolumn=50,72
autocmd FileType gitcommit setlocal textwidth=72
autocmd FileType gitcommit setlocal spell
2021-05-21 23:20:45 +00:00
" Display extra whitespace
set list listchars=tab:»·,trail
let g:blamer_delay = 500
let g:blamer_enabled = 1