diff --git a/doc/notes.txt b/doc/notes.txt new file mode 100644 index 00000000..2440f4a8 --- /dev/null +++ b/doc/notes.txt @@ -0,0 +1,5 @@ +NOTES + +:g/^$/d delete empty lines +:v/\w\+/d (skip lines with one or more words) delete empty lines +!column -t column format diff --git a/lua/custom/plugins/cmp.lua b/lua/custom/plugins/cmp.lua index cf2de985..c23f4f0d 100644 --- a/lua/custom/plugins/cmp.lua +++ b/lua/custom/plugins/cmp.lua @@ -55,10 +55,10 @@ return { [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping(function(fallback) - if luasnip.expand_or_locally_jumpable() then - luasnip.expand_or_jump() - elseif cmp.visible() then + if cmp.visible() then cmp.confirm { select = true } + elseif luasnip.expand_or_locally_jumpable() then + luasnip.expand_or_jump() else cmp.complete() end diff --git a/lua/myconfigs.lua b/lua/myconfigs.lua index 4743e726..8551e098 100644 --- a/lua/myconfigs.lua +++ b/lua/myconfigs.lua @@ -59,3 +59,5 @@ function _G.toggle_diagnostics() end vim.api.nvim_set_keymap('n', 'uv', ':call v:lua.toggle_diagnostics()', { noremap = true, silent = true, desc = 'Toggle diagnostic text' }) + +vim.api.nvim_create_user_command('Notes', 'edit' .. vim.fn.stdpath 'config' .. '/doc/notes.txt', {})