stow/vim/.vimrc

54 lines
1.3 KiB
VimL
Raw Normal View History

2023-12-09 20:20:56 +00:00
set nocompatible
if filereadable(expand('~/.vim/autoload/plug.vim'))
call plug#begin('~/.local/share/vim/plugins')
2023-12-10 16:14:28 +00:00
" Syntax highlighting and language-specific rules
2023-12-09 20:20:56 +00:00
Plug 'sheerun/vim-polyglot'
2023-12-10 16:14:28 +00:00
" Snippets
Plug 'SirVer/ultisnips'
2023-12-09 20:20:56 +00:00
2023-12-10 16:14:28 +00:00
" Web development
2023-12-09 20:20:56 +00:00
Plug 'mattn/emmet-vim'
2023-12-10 16:14:28 +00:00
" Go programming
2023-12-09 20:20:56 +00:00
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
2023-12-10 16:14:28 +00:00
" Zettelkasten support
2023-12-09 20:20:56 +00:00
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug '~/code/zk.vim/'
call plug#end()
2023-12-10 16:14:28 +00:00
" 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
2023-12-09 20:20:56 +00:00
endif
2023-12-10 16:14:28 +00:00
" Autocommands
autocmd BufEnter ~/.local/share/zk/* set filetype=markdown
" Enable line-numbering
2023-12-09 20:20:56 +00:00
set number
set relativenumber
2023-12-10 16:14:28 +00:00
" 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+=**