From 19b90d4d2cd599e3f83b315c0c984b3c28163b10 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 26 Feb 2024 11:36:34 -0700 Subject: Add more bindings to init.vim --- init.vim | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/init.vim b/init.vim index cbb6d59..45bfeaf 100644 --- a/init.vim +++ b/init.vim @@ -91,6 +91,7 @@ noremap p (SynStack) " Way to find files. noremap ff Telescope find_files +noremap Telescope find_files inoremap (vsnip-expand) @@ -105,13 +106,12 @@ augroup InitVim au! autocmd BufRead *.java,*.c,*.cpp,*.cxx,*.hs TSBufEnable highlight - " Automatically start insert mode when opening a new terminal. - autocmd TermOpen * startinsert - - " When entering a terminal, automatically start "insert" and feed the escape - " key. This ensures the ZSH line-reader is in "normal" mode. I have - " integration with zsh to navigate vim panes from the zsh line editor. - autocmd BufEnter term://* startinsert | call feedkeys("\x1b") + " Automatically stop highligting things when leaving insert mode. If I want + " the highlight back, I can just hit 'n' and it will come back. + " + " I don't know why it can't just be 'noh' and why I have to do this feedkeys + " nonsense, but there appears to be a bug of some kind. + autocmd InsertLeave * call feedkeys("\noh\") autocmd TextYankPost * \ lua require'vim.highlight'.on_yank( @@ -149,6 +149,20 @@ noremap . lua require('windownav').goto_terminal() noremap I lua require('windownav').goto_initvim() noremap ' lua require('windownav').goto_lastwin() +nnoremap term +nnoremap TERM + +nmap œ k +nmap ï j +omap œ k +omap ï j +omap aœ ak +omap aï aj +omap iœ ik +omap iï ij +vmap œ k +vmap ï j + set textwidth=80 set colorcolumn=+1 if has('rneovim') -- cgit