More Neovim shit.
This commit is contained in:
parent
9595610e7a
commit
c145338f26
3 changed files with 30 additions and 7 deletions
|
@ -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)
|
||||
|
|
26
nvim/lua/maps.lua
Normal file
26
nvim/lua/maps.lua
Normal file
|
@ -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', '<C-l>', '<C-w>l', opts)
|
||||
map('n', '<C-h>', '<C-w>h', opts)
|
||||
map('n', '<C-k>', '<C-w>k', opts)
|
||||
map('n', '<C-j>', '<C-w>j', opts)
|
||||
-- Splitting
|
||||
map('n', '\\|', '<C-w>v', opts)
|
||||
map('n', '\\-', '<C-w>s', opts)
|
||||
|
|
@ -8,4 +8,7 @@ return {
|
|||
config = function()
|
||||
require("nvim-tree").setup {}
|
||||
end,
|
||||
git = {
|
||||
enable = false,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue