stow/vim/.vimrc

54 lines
1.3 KiB
VimL

set nocompatible
if filereadable(expand('~/.vim/autoload/plug.vim'))
call plug#begin('~/.local/share/vim/plugins')
" Syntax highlighting and language-specific rules
Plug 'sheerun/vim-polyglot'
" Snippets
Plug 'SirVer/ultisnips'
" Web development
Plug 'mattn/emmet-vim'
" Go programming
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
" Zettelkasten support
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug '~/code/zk.vim/'
call plug#end()
" Ultisnips config
let g:UltiSnipsSnippetsDir='~/.local/share/ultisnips'
let g:UltiSnipsSnippetDirectories=['~/.local/share/ultisnips']
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
let g:UltiSnipsEditSplit="context"
else
" Make tab = 4 spaces if vim-polyglot can't be loaded
set tabstop=4
set softtabstop=4
set shiftwidth=4
endif
" Autocommands
autocmd BufEnter ~/.local/share/zk/* set filetype=markdown
" Enable line-numbering
set number
set relativenumber
" Use swap directory instead of cluttering source directories with swapfiles
set directory^=$HOME/.vim/swap//
" Use system clipboard by default
set clipboard=unnamedplus
" Make file searching better
set wildmenu
set wildmode=list:full
set path+=**