From 1c0aa32806e097a2a0c30b760ae4cad481e758c6 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Fri, 8 Oct 2021 13:50:04 +0300 Subject: nvim: ported wiki functions --- .config/nvim/lua/mappings.lua | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to '.config/nvim/lua/mappings.lua') diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua index fe59a99..f27ac1b 100644 --- a/.config/nvim/lua/mappings.lua +++ b/.config/nvim/lua/mappings.lua @@ -84,6 +84,18 @@ map('n', 'cd', ':cd %:p:h:pwd') -- press \g and start writing prose map('n', 'g', ':Goyo') +-- call CreatePaper on word below cursor +map('n', 'np', 'gewi[[/papers/Ea]]bb:call CreatePaper(expand(""))') + +-- link paper +map('n', 'lp', 'gewi[[/papers/Ea]]') + +-- call CreateReference on word below cursor +map('n', 'nr', ':call CreateReference(expand(""))') + +-- create a new note +map('n', 'nn', ':call CreateNote()') + -- plug mappings {{{1 -- -- mappings should not be noremap @@ -101,8 +113,8 @@ plugmap('n', '`', 'Sneak_S') plugmap('n', "'", '`') -- use the special yoink paste that rotates -plugmap('n', 'p', '(YoinkPaste_p)') -plugmap('n', 'P', '(YoinkPaste_P)') +plugmap('n', 'p', '(YoinkPaste_p)') +plugmap('n', 'P', '(YoinkPaste_P)') -- substitute from yank plugmap('n', 'ys', '(SubversiveSubstitute)') @@ -128,4 +140,9 @@ plugmap('i', '', '(fzf-complete-word)') plugmap('i', '', '(fzf-complete-path)') plugmap('i', '', '(fzf-complete-line)') +-- checkmarks on vimwiki +plugmap('n', 'v', 'VimwikiToggleListItem') +-- add/increase header level +plugmap('n', 'a', 'VimwikiAddHeaderLevel') + -- 1}}} -- -- cgit v1.2.3-70-g09d2