Useful plugins

Plugins I’ll try someday

Tips’n tricks I keep forgetting about

.vimrc

set nocompatible  		"use vim setting rather than vi settings (this must be first)
set termguicolors     		"enable true colors support
set encoding=utf-8  		"use UTF-8 encoding
set foldmethod=marker  		"fold using {{{ and }}}
set nofoldenable 		"default unfolded
filetype plugin on
syntax on  			"enable syntax highliting and filetype recognition
set backspace=indent,eol,start 	"make backspace a more flexible
set number 			"turn on line numbers
set scrolloff=10 		"Keep 10 lines (top/bottom) for scope
set showcmd 			"show the command being typed
set showmatch 			"show matching brackets
filetype indent on 		"automatic indentation
let mapleader = ","
let maplocalleader = ","

" some shortcuts and autocorrect
iabbrev wihch which
iabbrev wich which

"moving faster
noremap j 10j
noremap k 10k
noremap h 10h
noremap l 10l


"plugins
call plug#begin('~/.vim/plugged')
Plug 'vimwiki/vimwiki'
Plug 'lervag/vimtex'
Plug 'JuliaEditorSupport/julia-vim'
Plug 'ayu-theme/ayu-vim'
Plug 'chentoast/marks.nvim'
Plug 'tools-life/taskwiki'
Plug 'ervandew/supertab', { 'branch': 'main' }
Plug 'itchyny/lightline.vim'
Plug 'mbbill/undotree'
Plug 'SirVer/ultisnips'
call plug#end()


"vimtex
let g:vimtex_quickfix_open_on_warning=0
let g:tex_flavor='latex'
let g:vimtex_view_method = 'sioyek'

"color scheme 
colors ayu

"vimwikis, one private, one public
let g:vimwiki_list = [{'path': '/home/adrien/Nextcloud/vimwiki','syntax': 'markdown', 'ext': '.md'}, 
		 	{'path': '/home/adrien/Nextcloud/publicwiki','syntax': 'markdown', 'ext': '.md'}]

"ultisnips, following https://ejmastnak.com/tutorials/vim-latex/ultisnips/
let g:UltiSnipsExpandTrigger       = '<Tab>'    " use Tab to expand snippets
let g:UltiSnipsJumpForwardTrigger  = '<Tab>'    " use Tab to move forward through tabstops
let g:UltiSnipsJumpBackwardTrigger = '<S-Tab>'  " use Shift-Tab to move backward through tabstops
let g:UltiSnipsSnippetDirectories=['/home/adrien/Nextcloud/snips']   

"lightline
set laststatus=2
let g:lightline = {
      \ 'colorscheme': 'PaperColor',
      \ }
      
"supertab
let g:SuperTabDefaultCompletionType = "<C-X><C-O>"

"undotree
nnoremap <localleader>lu :UndotreeToggle<CR>

tex.vim

"~/.vim/ftplugin/tex.vim

"math mode
imap \[ \[<CR><CR>\]<Up>
iabbrev ** \begin{align*}<CR><CR>\end{align*}<UP>

" shortcut for \item
iabbrev ii \item

"word<F4> inserts "\begin{word} ... \end{word}"
imap <F4> <Esc>v^yi\begin{<Esc>$a}<CR><CR>\end{<Esc>pa}<Up>


imap ( ()<Left>