local map = vim.api.nvim_set_keymap map('', 'Y', 'y$', {}) -- 'Y' yank to the end of the line map('i', 'kj', '', {}) -- kj to exit insert mode map('', 'Q', '', {}) -- remove visual mode keybinding map('n', 'sc', 'source $MYVIMRC', {}) -- source vimrc map('n', ';', 'mqA;`q', {}) -- put semicolon at the end of line map('n', 'cu', 'ct_', {}) -- common change until -- split navigation map('n', '', '', {}) map('n', '', '', {}) map('n', '', '', {}) map('n', '', '', {}) map('n', 's=', '=', {}) -- search with very magic map('n', ' /', '/\v', {}) map('n', ' ?', '?\v', {}) -- ctrl-j/k to navigate commands history map('c', '', '', {}) map('c', '', '', {}) -- -- hook -- -- remove trailing white space on save -- autocmd vimrc BufWritePre * %s/\s\+$//e -- -- dirty hack to disable this feature on markdown (autocmd! wouldn't work) -- autocmd vimrc BufReadPre *.md autocmd! BufWritePre -- augroup vimrc_files -- autocmd! -- -- school c -- autocmd Filetype c setlocal noexpandtab -- autocmd Filetype c setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ -- -- std::cout << ... << std::endl; shortcut -- autocmd Filetype cpp nnoremap cout istd::cout << << std::endl;2Fbd :g/^\s*breakpoint()$/d ]] vim.cmd [[ autocmd FileType python nmap ba mqobreakpoint()`q ]] -- pluggins -- -- eazy-align map('x', 'ga', 'EasyAlign', {}) map('n', 'ga', 'EasyAlign', {}) -- nnoremap l :SidewaysRight -- nnoremap h :SidewaysLeft -- nnoremap w :ArgWrap -- nnoremap ss :setlocal spell! map('n', '', 'Telescope git_files', {}) map('n', '', 'Telescope help_tags', {}) map('n', ';', 'Telescope commands', {})