-- remap leader key vim.g.mapleader = "," -- remap Nvim_Tree toggle to CTRL+B keymap('n', '', ':NvimTreeToggle', {}) -- Tab Shortcuts keymap('n', '', ':tabnew', {}) keymap('n', '', ':tabprevious', {}) keymap('n', '', ':tabnext', {}) -- Use ctrl- [hl] to select the active split! keymap('n', '', ':wincmd h', {}) keymap('n', '', ':wincmd l', {}) -- Toggle NERDCommenter with Ctrl + c vim.cmd[[:map NERDCommenterToggle]] -- redraws the screen and removes any search highlighting keymap('n', '', ':nohl', {silent = true}) -- Can't quite get working yet -- keybind map Ctrl + m to :MarkdownPreview -- vim.cmd[[nmap MarkdownPreviewToggle]] keymap('n', '', ':MarkdownPreview', {}) -- -- Toggle Multi-Cursor with j or k vim.cmd[[nmap ]] vim.cmd[[nmap ]] -- Escape Insert Mode with ii keymap('i', 'ii', '', {}) -- Insert a console.log() vim.cmd[[ inoremap cll console.log()i]] -- Alias replace all to shift + S vim.cmd[[nnoremap S :%s///gI]] -- Prettify using shortcut gp (careful, only use on files that have a parser) -- vim.cmd[[nnoremap gp :silent %!prettier --stdin-filepath %]] -- Format C and C++ Code using cp alias vim.cmd[[nnoremap cp :silent :ClangFormat]] -- j/k will move virtual lines (lines that wrap) vim.cmd[[noremap j (v:count == 0 ? 'gj' : 'j')]] vim.cmd[[noremap k (v:count == 0 ? 'gk' : 'k')]]