diff --git a/nvim/init.lua b/nvim/init.lua index fc6dd5f..6fe6c31 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -46,11 +46,5 @@ require("nvim-tree").setup({ }, }) --- Key mapping -local map = vim.api.nvim_set_keymap -local opts = {noremap = true, silent = true} +require("maps") -map('n', 'confr', ':source $HOME/lib/nvim/init.lua\n', opts) -map('n', 'confe', ':e $HOME/lib/nvim/init.lua\n', opts) -map('n', '\\ft', ':NvimTreeToggle\n', opts) -map('n', '\\fT', ':NvimTreeOpen .\n', opts) diff --git a/nvim/lua/maps.lua b/nvim/lua/maps.lua new file mode 100644 index 0000000..c823727 --- /dev/null +++ b/nvim/lua/maps.lua @@ -0,0 +1,26 @@ + +-- Key mapping +local map = vim.api.nvim_set_keymap + +-- Configuration fast editing. +local opts = {noremap = true, silent = true} +map('n', 'confr', ':source $HOME/lib/nvim/init.lua\n', opts) +map('n', 'confe', ':e $HOME/lib/nvim/init.lua\n', opts) +-- File tree. +map('n', '\\ft', ':NvimTreeFocus\n', opts) +map('n', '\\fT', ':NvimTreeToggle .\n', opts) +-- Tabs. +map('n', '\\tn', ':tabnew\n', opts) + + +-- Windows + -- Moving + opts = {silent = true} + map('n', '', 'l', opts) + map('n', '', 'h', opts) + map('n', '', 'k', opts) + map('n', '', 'j', opts) + -- Splitting + map('n', '\\|', 'v', opts) + map('n', '\\-', 's', opts) + diff --git a/nvim/lua/plugin/tree.lua b/nvim/lua/plugin/tree.lua index adffb8a..d09a601 100644 --- a/nvim/lua/plugin/tree.lua +++ b/nvim/lua/plugin/tree.lua @@ -8,4 +8,7 @@ return { config = function() require("nvim-tree").setup {} end, + git = { + enable = false, + }, }