Fuck netrw.
This commit is contained in:
parent
46a593d054
commit
67785f643e
2 changed files with 32 additions and 5 deletions
|
@ -11,7 +11,7 @@ vim.opt.swapfile = false
|
||||||
|
|
||||||
vim.o.number = true
|
vim.o.number = true
|
||||||
vim.o.cursorline = 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")
|
require("indent")
|
||||||
|
|
|
@ -9,8 +9,19 @@ local opts = {silent = true}
|
||||||
map('n', '\\econf', ':e $HOME/lib/nvim/init.lua\n', opts)
|
map('n', '\\econf', ':e $HOME/lib/nvim/init.lua\n', opts)
|
||||||
map('n', '\\emap', ':e $HOME/lib/nvim/lua/maps.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.
|
-- Moving around.
|
||||||
map('n', '\\home', ":cd $HOME\n", opts)
|
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', '\\lex', ":Lexplore\n", opts)
|
||||||
map('n', '\\ex', ":Explore\n", opts)
|
map('n', '\\ex', ":Explore\n", opts)
|
||||||
|
@ -21,9 +32,16 @@ local opts = {silent = true}
|
||||||
-- Tabs.
|
-- Tabs.
|
||||||
map('n', '\\tn', ':tabnew\n', opts)
|
map('n', '\\tn', ':tabnew\n', opts)
|
||||||
|
|
||||||
-- Line
|
-- Insert
|
||||||
-- map('n', '\\nl', ':if &cursorline==1<enter>set nocursorline<enter>else set cursoreline<enter>endif<enter><enter>', opts)
|
-- Literal tabs with Shift-Tab
|
||||||
|
map('i', '<S-Tab>', '\t', opts)
|
||||||
|
|
||||||
|
|
||||||
|
-- Empty
|
||||||
|
map('n', '<C-l>', '', opts)
|
||||||
|
|
||||||
|
-- vim.api.nvim_del_keymap('n', '<C-l>')
|
||||||
|
-- vim.api.nvim_del_keymap('n', '<C-r>')
|
||||||
-- Windows
|
-- Windows
|
||||||
-- Moving
|
-- Moving
|
||||||
opts = {silent = true}
|
opts = {silent = true}
|
||||||
|
@ -34,11 +52,20 @@ local opts = {silent = true}
|
||||||
-- Resizing
|
-- Resizing
|
||||||
map('n', '<C-k>', '<C-w>+', opts)
|
map('n', '<C-k>', '<C-w>+', opts)
|
||||||
map('n', '<C-j>', '<C-w>-', opts)
|
map('n', '<C-j>', '<C-w>-', opts)
|
||||||
map('n', '<C-h>', '3<C-w><', opts)
|
-- map('n', '<C-h>', '3<C-w><', opts)
|
||||||
map('n', '<C-l>', '3<C-w>>', opts)
|
-- map('n', '<C-l>', '3<C-w>>', opts)
|
||||||
map('n', '<Space>', '3<C-w>>', opts)
|
map('n', '<Space>', '3<C-w>>', opts)
|
||||||
map('n', '<C-Space>', '3<C-w><', opts)
|
map('n', '<C-Space>', '3<C-w><', opts)
|
||||||
-- Splitting
|
-- Splitting
|
||||||
map('n', '\\|', '<C-w>v', opts)
|
map('n', '\\|', '<C-w>v', opts)
|
||||||
map('n', '\\-', '<C-w>s', opts)
|
map('n', '\\-', '<C-w>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,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue