Removed window movement and prepared commands file

This commit is contained in:
Fabian Schmidt 2021-02-24 20:52:43 +01:00
parent 6b421a3f3e
commit c79fcf8678
2 changed files with 19 additions and 13 deletions

5
lua/commands.lua Normal file
View File

@ -0,0 +1,5 @@
-- commands.lua
-- autocmd! User GoyoEnter Limelight
-- autocmd! User GoyoLeave Limelight!
-- command W :execute ':silent w !sudo tee % > /dev/null' | :edit!

View File

@ -1,3 +1,4 @@
-- maps.lua
local function map(mode, lhs, rhs, opts)
local options = {noremap = true}
if opts then options = vim.tbl_extend('force', options, opts) end
@ -10,19 +11,19 @@ map('n', '<C-g>', ':Goyo<Enter>', {noremap = false})
-- Open and move to resized terminal
map('n', '<leader>t', '<C-w>s<C-w>j :terminal<CR>:res 5<CR>i', {noremap = false})
-- Enter normal mode in terminal
map('t', '<Esc>', '<C-\\><C-N>')
map('t', '¿<C-N>', '<C-\\><C-N>')
-- Clear highlight
map('n', '<C-l>', '<cmd>noh<CR>')
-- Move to window in any mode
map('t', 'ª', '<C-\\><C-N><C-w>h')
map('t', 'º', '<C-\\><C-N><C-w>j')
map('t', '', '<C-\\><C-N><C-w>k')
map('t', '@', '<C-\\><C-N><C-w>l')
map('i', 'ª', '<C-\\><C-N><C-w>h')
map('i', 'º', '<C-\\><C-N><C-w>j')
map('i', '', '<C-\\><C-N><C-w>k')
map('i', '@', '<C-\\><C-N><C-w>l')
map('n', 'ª', '<C-w>h')
map('n', 'º', '<C-w>j')
map('n', '', '<C-w>k')
map('n', '@', '<C-w>l')
-- map('t', 'ª', '<C-\\><C-N><C-w>h')
-- map('t', 'º', '<C-\\><C-N><C-w>j')
-- map('t', '∆', '<C-\\><C-N><C-w>k')
-- map('t', '@', '<C-\\><C-N><C-w>l')
-- map('i', 'ª', '<C-\\><C-N><C-w>h')
-- map('i', 'º', '<C-\\><C-N><C-w>j')
-- map('i', '∆', '<C-\\><C-N><C-w>k')
-- map('i', '@', '<C-\\><C-N><C-w>l')
-- map('n', 'ª', '<C-w>h')
-- map('n', 'º', '<C-w>j')
-- map('n', '∆', '<C-w>k')
-- map('n', '@', '<C-w>l')