Adding the wiki (and yank/paste moves)

This commit is contained in:
Martin Potier 2017-07-21 10:54:22 +02:00
parent d7fbf5afec
commit e3064c94a0

36
vim.nix
View file

@ -36,13 +36,15 @@ let plugins = let inherit (vimUtils) buildVimPluginFrom2Nix; in {
{ names = [ { names = [
"Solarized" "Solarized"
"better-whitespace" "better-whitespace"
"systemd-syntax"
"opencl-syntax"
"elm-vim" "elm-vim"
"calendar-vim"
"fugitive" "fugitive"
"opencl-syntax"
"surround" "surround"
"systemd-syntax"
"vim-nix" "vim-nix"
"vimtex" "vimtex"
"vimwiki"
#https://github.com/vim-voom/VOoM #https://github.com/vim-voom/VOoM
#https://github.com/tpope/vim-obsession #https://github.com/tpope/vim-obsession
]; } ]; }
@ -106,8 +108,17 @@ let plugins = let inherit (vimUtils) buildVimPluginFrom2Nix; in {
set notimeout set notimeout
set ttimeout set ttimeout
" Color lines in a different shade up to 80 columns
let &colorcolumn=join(range(81,999),",") let &colorcolumn=join(range(81,999),",")
" automatically jump to the end of the text you just copied/pasted:
xnoremap <silent> y y`]
nnoremap <silent> yy yy`]
xnoremap <silent> p p`]
xnoremap <silent> P P`]
nnoremap <silent> p p`]
nnoremap <silent> P P`]
" vimtex options " vimtex options
let g:vimtex_fold_enabled=1 let g:vimtex_fold_enabled=1
let g:vimtex_fold_manual=1 let g:vimtex_fold_manual=1
@ -140,5 +151,26 @@ let plugins = let inherit (vimUtils) buildVimPluginFrom2Nix; in {
" Set filetype tex for tikz files " Set filetype tex for tikz files
au BufNewFile,BufRead *.tikz set filetype=tex 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 <leader>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 <leader>c :call ToggleCalendar()
''; '';
} }