diff --git a/vim.nix b/vim.nix index 417559d..654b102 100644 --- a/vim.nix +++ b/vim.nix @@ -36,13 +36,15 @@ let plugins = let inherit (vimUtils) buildVimPluginFrom2Nix; in { { names = [ "Solarized" "better-whitespace" - "systemd-syntax" - "opencl-syntax" "elm-vim" + "calendar-vim" "fugitive" + "opencl-syntax" "surround" + "systemd-syntax" "vim-nix" "vimtex" + "vimwiki" #https://github.com/vim-voom/VOoM #https://github.com/tpope/vim-obsession ]; } @@ -106,8 +108,17 @@ let plugins = let inherit (vimUtils) buildVimPluginFrom2Nix; in { set notimeout set ttimeout + " Color lines in a different shade up to 80 columns let &colorcolumn=join(range(81,999),",") + " automatically jump to the end of the text you just copied/pasted: + xnoremap y y`] + nnoremap yy yy`] + xnoremap p p`] + xnoremap P P`] + nnoremap p p`] + nnoremap P P`] + " vimtex options let g:vimtex_fold_enabled=1 let g:vimtex_fold_manual=1 @@ -140,5 +151,26 @@ let plugins = let inherit (vimUtils) buildVimPluginFrom2Nix; in { " Set filetype tex for tikz files au BufNewFile,BufRead *.tikz set filetype=tex + " vimwiki stuff + let g:vimwiki_list = [ + \{'path': '~/vimwiki/personal.wiki'} + \] + au BufRead,BufNewFile *.wiki set filetype=vimwiki + :autocmd FileType vimwiki map d :VimwikiMakeDiaryNote + function! ToggleCalendar() + execute ":Calendar" + if exists("g:calendar_open") + if g:calendar_open == 1 + execute "q" + unlet g:calendar_open + else + g:calendar_open = 1 + end + else + let g:calendar_open = 1 + end + endfunction + :autocmd FileType vimwiki map c :call ToggleCalendar() + ''; }