" No Arrowkeys no no no no ino ino ino ino vno vno vno vno " Misc Keybindings let mapleader = "," " Buffers nmap :Buffers imap :Buffers vmap :Buffers " Bufferline.nvim nnoremap [b :BufferLineCyclePrev nnoremap ]b :BufferLineCycleNext " Nerdtree nmap :NERDTreeToggle " Tagbar nmap :TagbarToggle " SingleCompile nmap :SCChooseCompiler nmap :SCCompile nmap :SCCompileRun " Window Movement nnoremap nnoremap nnoremap nnoremap " Yankstack nmap yankstack_substitute_newer_paste nmap yankstack_substitute_older_paste " CTRL + Space = Autocomplete " inoremap " imap cmap w!! w !sudo tee > /dev/null % " Toggle Case nmap g~iw " Rmarkdown autocmd Filetype rmd nmap :w\|:!echo"require(rmarkdown);render('%')"\|R--vanilla autocmd Filetype rmd imap :w\|:!echo"require(rmarkdown);render('%')"\|R--vanilla map imap " nvim smartbuffs " Jump to the N buffer (by index) according to :ls buffer list " where N is NOT the buffer number but the INDEX in such list " NOTE: it does not include terminal buffers nnoremap 1 :lua require("nvim-smartbufs").goto_buffer(1) nnoremap 2 :lua require("nvim-smartbufs").goto_buffer(2) nnoremap 3 :lua require("nvim-smartbufs").goto_buffer(3) nnoremap 4 :lua require("nvim-smartbufs").goto_buffer(4) nnoremap 5 :lua require("nvim-smartbufs").goto_buffer(5) nnoremap 6 :lua require("nvim-smartbufs").goto_buffer(6) nnoremap 7 :lua require("nvim-smartbufs").goto_buffer(7) nnoremap 8 :lua require("nvim-smartbufs").goto_buffer(8) nnoremap 9 :lua require("nvim-smartbufs").goto_buffer(9) " Improved :bnext :bprev behavior (without considering terminal buffers) nnoremap :lua require("nvim-smartbufs").goto_next_buffer() nnoremap :lua require("nvim-smartbufs").goto_prev_buffer() " Open terminal buffer and set it as hidden so it won't get deleted nnoremap c1 :lua require("nvim-smartbufs").goto_terminal(1) nnoremap c2 :lua require("nvim-smartbufs").goto_terminal(2) nnoremap c3 :lua require("nvim-smartbufs").goto_terminal(3) nnoremap c4 :lua require("nvim-smartbufs").goto_terminal(4) " Delete current buffer and goes back to the previous one nnoremap qq :lua require("nvim-smartbufs").close_current_buffer() " Delete the N buffer according to :ls buffer list nnoremap q1 :lua require("nvim-smartbufs").close_buffer(1) nnoremap q2 :lua require("nvim-smartbufs").close_buffer(2) nnoremap q3 :lua require("nvim-smartbufs").close_buffer(3) nnoremap q4 :lua require("nvim-smartbufs").close_buffer(4) nnoremap q5 :lua require("nvim-smartbufs").close_buffer(5) nnoremap q6 :lua require("nvim-smartbufs").close_buffer(6) nnoremap q7 :lua require("nvim-smartbufs").close_buffer(7) nnoremap q8 :lua require("nvim-smartbufs").close_buffer(8) nnoremap q9 :lua require("nvim-smartbufs").close_buffer(9)