diff --git a/nvim/init.lua b/nvim/init.lua index b53310c..093aa99 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -11,7 +11,7 @@ vim.opt.swapfile = false vim.o.number = true vim.o.cursorline = true -vim.o.guicursor = 'n-v-c-sm-i-ci-ve:block,r-cr-o:hor20,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor' +vim.o.guicursor = 'n-v-c-sm-i-ci-ve:block,r-cr-o:hor20,a:blinkoff700-blinkoff400-blinkoff250-Cursor/lCursor' require("indent") diff --git a/nvim/lua/maps.lua b/nvim/lua/maps.lua index 68441c3..bdfdeeb 100644 --- a/nvim/lua/maps.lua +++ b/nvim/lua/maps.lua @@ -9,8 +9,19 @@ local opts = {silent = true} map('n', '\\econf', ':e $HOME/lib/nvim/init.lua\n', opts) map('n', '\\emap', ':e $HOME/lib/nvim/lua/maps.lua\n', opts) +-- Quit + map('n', '\\q', ":quit\n", opts) + map('n', '\\qa', ":qa\n", opts) + -- Moving around. map('n', '\\home', ":cd $HOME\n", opts) + map('n', '\\cd', ":cd ", {silent = false}) + map('n', '\\lcd', ":lcd ", {silent = false}) + map('n', '\\tcd', ":tcd ", {silent = false}) + map('n', '\\pwd', ':pwd\n', {silent = false}) + map('n', '\\aa', ':argadd ', {silent = false}) + map('n', '\\bb', ':b ', {silent = false}) + map('n', '\\b#', ':b#\n ', {silent = true}) map('n', '\\lex', ":Lexplore\n", opts) map('n', '\\ex', ":Explore\n", opts) @@ -21,9 +32,16 @@ local opts = {silent = true} -- Tabs. map('n', '\\tn', ':tabnew\n', opts) --- Line - -- map('n', '\\nl', ':if &cursorline==1set nocursorlineelse set cursorelineendif', opts) +-- Insert + -- Literal tabs with Shift-Tab + map('i', '', '\t', opts) + +-- Empty + map('n', '', '', opts) + +-- vim.api.nvim_del_keymap('n', '') +-- vim.api.nvim_del_keymap('n', '') -- Windows -- Moving opts = {silent = true} @@ -34,11 +52,20 @@ local opts = {silent = true} -- Resizing map('n', '', '+', opts) map('n', '', '-', opts) - map('n', '', '3<', opts) - map('n', '', '3>', opts) + -- map('n', '', '3<', opts) + -- map('n', '', '3>', opts) map('n', '', '3>', opts) map('n', '', '3<', opts) -- Splitting map('n', '\\|', 'v', opts) map('n', '\\-', 's', opts) +-- Netrw +vim.api.nvim_create_autocmd('filetype', { + pattern = 'netrw', + callback = function() + local buf = vim.api.nvim_get_current_buf() + vim.api.nvim_buf_set_keymap(buf, "n", 'f', '%', opts) + end, +}) +