20 lines
912 B
Lua
20 lines
912 B
Lua
local utils = require('utils')
|
|
utils.map('n', '<C-h>', '<cmd>noh<CR>') -- Clear highlights
|
|
|
|
-- Use tab and shift+tab to cycle buffers
|
|
utils.map("n", "<tab>", "<cmd>bn<cr>")
|
|
utils.map("n", "<S-tab>", "<cmd>bp<cr>")
|
|
|
|
-- Find files, buffers, grep in folder using Telescope command-line sugar.
|
|
utils.map("n", "<leader>ff", "<cmd>Telescope find_files<cr>")
|
|
utils.map("n", "<leader>fg", "<cmd>Telescope live_grep<cr>")
|
|
utils.map("n", "<leader>fb", "<cmd>Telescope buffers<cr>")
|
|
utils.map("n", "<leader>fh", "<cmd>Telescope help_tags<cr>")
|
|
utils.map("n", "<leader>fl", "<cmd>Telescope git_files<cr>")
|
|
-- Turn spellchecker on
|
|
utils.map("n", "<leader>s", "<cmd>setlocal spell spelllang=en_us<cr>")
|
|
utils.map("n", "<C-k>", "<cmd>let _s=@/<Bar>:%s/\\s\\+$//e<Bar>:let @/=_s<Bar><CR>")
|
|
|
|
-- Toggles on different plugins/modes
|
|
utils.map("n", "<F3>", "<cmd>set nonumber!<CR>")
|
|
utils.map("n", "<F5>", "<cmd>NvimTreeToggle<CR>")
|