neovim-config/lua/binds.lua

35 lines
801 B
Lua

--
-- Configuration Tools
--
local ct = require('conftool')
local defs = require('defs')
--
-- Maps
--
-- select all
ct.map('n', '<Leader>a', '<esc>ggVG<CR>')
--[[
-- spawn terminal
ct.map('n', '<C-M-t>', ':!' .. defs.external_term .. ' . &<CR><CR>')
-- spwan file manager
ct.map('n', '<C-M-f>', ':!' .. defs.external_filemgr .. ' . &<CR><CR>')
]]
-- spellchecking
ct.map('n', '<Leader>s', ':set spell!<CR>')
-- Buffer Navigation
ct.map('n', '<Leader>w', ':bnext<CR>')
ct.map('n', '<Leader>W', ':bprevious<CR>')
-- close buffer
ct.map('n', '<Leader>q', ':bd<CR>')
ct.map('n', '<Leader>wq', '<cmd>w<CR><cmd>bd<CR>')
--
-- Commands
--
-- ct.defcmd('Xrdb', '!xrdb %')
ct.defcmd('ExTerm', '!' .. defs.external_term .. '&<CR><CR>')
ct.defcmd('ExFileMgr', '!' .. defs.external_filemgr .. '. &<CR><CR>')