Make improvements to .vimrc

This commit is contained in:
The Magician 2023-12-10 16:14:28 +00:00
parent 5e5b1f4b2a
commit e1ef4f14fb
1 changed files with 34 additions and 4 deletions

View File

@ -1,23 +1,53 @@
set nocompatible set nocompatible
if filereadable(expand('~/.vim/autoload/plug.vim')) if filereadable(expand('~/.vim/autoload/plug.vim'))
"let g:polyglot_disabled = ['markdown.plugin'] " Disable vim-polyglot's Markdown so we can use vim-pandoc instead
call plug#begin('~/.local/share/vim/plugins') call plug#begin('~/.local/share/vim/plugins')
" Syntax highlighting and language-specific rules
Plug 'sheerun/vim-polyglot' Plug 'sheerun/vim-polyglot'
Plug 'vim-pandoc/vim-pandoc'
" Snippets
Plug 'SirVer/ultisnips'
" Web development
Plug 'mattn/emmet-vim' Plug 'mattn/emmet-vim'
" Go programming
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' } Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
" Zettelkasten support
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim' Plug 'junegunn/fzf.vim'
Plug '~/code/zk.vim/' Plug '~/code/zk.vim/'
call plug#end() call plug#end()
autocmd BufEnter ~/dox/zettelkasten/* set filetype=markdown " 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 endif
" Autocommands
autocmd BufEnter ~/.local/share/zk/* set filetype=markdown
" Enable line-numbering
set number set number
set relativenumber 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+=**