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 +++++++++++++++++++-- .config/nvim/lua/plugin_settings.lua | 16 +++++++++------- 2 files changed, 28 insertions(+), 9 deletions(-) (limited to '.config/nvim/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}}} -- diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua index b10a002..4e28726 100644 --- a/.config/nvim/lua/plugin_settings.lua +++ b/.config/nvim/lua/plugin_settings.lua @@ -101,13 +101,6 @@ g.UltiSnipsExpandTrigger = "" g.UltiSnipsEnableSnipMate = "1" -- }}} UltiSnips -- --- float preview -g["float_preview#docked"] = 0 - --- highlight on yank -cmd('highlight HighlightedyankRegion cterm=reverse gui=reverse') -g.highlightedyank_highlight_duration = 200 - -- beacon {{{ -- g.beacon_size = 100 g.beacon_shrink = 1 @@ -124,3 +117,12 @@ g.slime_paste_file = "/home/yigit/.slime_paste" g.vimtex_view_method = 'zathura' g.vimtex_quickfix_mode = 0 -- }}} vimtex -- + +vim.g.polyglot_disabled={'latex', 'tex'} + +-- float preview +g["float_preview#docked"] = 0 + +-- highlight on yank +cmd('highlight HighlightedyankRegion cterm=reverse gui=reverse') +g.highlightedyank_highlight_duration = 200 -- cgit v1.2.3-70-g09d2