2023-08-27 18:22:29 +00:00
|
|
|
-- HELPERS ----------------------------------------------------
|
|
|
|
local cmd = vim.cmd -- to execute Vim commands e.g. cmd('pwd')
|
|
|
|
local fn = vim.fn -- to call Vim functions e.g. fn.bufnr()
|
|
|
|
local g = vim.g -- a table to access global variables
|
|
|
|
local keymap = vim.keymap -- keymap
|
|
|
|
local scopes = {o = vim.o, b = vim.bo, w = vim.wo}
|
|
|
|
|
|
|
|
g.mapleader = ';'
|
|
|
|
|
|
|
|
keymap.set('n', '<leader>sw', '<c-w>')
|
|
|
|
keymap.set('n', '<leader>sww', '<c-w>k')
|
|
|
|
keymap.set('n', '<leader>sws', '<c-w>j')
|
|
|
|
keymap.set('n', '<leader>swa', '<c-w>h')
|
|
|
|
keymap.set('n', '<leader>swd', '<c-w>l')
|
|
|
|
|
|
|
|
keymap.set('n', '<leader>aa', 'gT')
|
|
|
|
keymap.set('n', '<leader>dd', 'gt')
|
|
|
|
|
|
|
|
keymap.set('n', '<F9>', ':%!jq .<CR>')
|
2024-01-13 15:53:13 +00:00
|
|
|
|
|
|
|
keymap.set('n', '<leader>sg', ':lua vim.diagnostic.open_float(0, {scope="line"})<CR>')
|