local k = vim.api.nvim_set_keymap local options = { noremap = true, silent = true } vim.g.mapleader = ' ' k('', '', '', options) k('i', 'jk', '', options) -- move around visually (when line is wrapped) k('n', 'j', 'gj', options) k('n', 'k', 'gk', options) -- window navigation k('n', '', '', options) k('n', '', '', options) k('n', '', '', options) k('n', '', '', options) vim.g.winresizer_start_key = 'e' -- tab navigation k('n', 'H', 'gT', options) k('n', 'L', 'gt', options) -- tree nav k('n', '', ':NvimTreeToggle', options) -- folds k('n', 'l', 'za', options) -- add keymap to unfold and others -- visual -- copy to clipbaord in visual mode k('v', '', '"+y', options) -- move blocks of text visually k('v', 'J', ':m \'>+1gv=gv', options) k('v', 'K',':m \'<-2gv=gv', options) -- stay in visual mode while indenting k('v', '>', '>gv', options) k('v', '<', '', ':Telescope find_files', options) k('n', 'f', ':Telescope live_grep', options) k('n', '', ':Telescope buffers', options) k('n', 'h', ':Telescope help_tags', options) k('n', 'm', ':nohlsearch', options) k('n', 'z', '_', options) k('n', 'n', 'nzz', options) -- fugitive k('n', 'g', ':G', options)