-
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
You might already be aware, but I use a similar plugin that throws these kinds of words into different categories for you to highlight. vim-wordy
-
For those who use Tim Pope's unimpaired plugin, a similar feature (exchange lines) is provided by ]e and [e, which are also repeatable with his repeat plugin.
-
For those who use Tim Pope's unimpaired plugin, a similar feature (exchange lines) is provided by ]e and [e, which are also repeatable with his repeat plugin.
-
" edit vimrc from vim nmap v :tabe ~/.vimrc autocmd bufwritepost .vimrc source ~/.vimrc " When editing a file, always jump to the last known cursor position. autocmd BufReadPost * \ if line("'\"") > 1 && line("'\"") <= line("$") | \ exe "normal! g`\"" | \ endif " Go to first and last char of current line easier noremap H ^ noremap L $ " Yank from the cursor to the end of the line, to be consistent with C and D. nnoremap Y y$ " save bash shebang as a macro in register b. use @b to get it in vim let @b='i#!/usr/bin/env bashq' " save readonly file changes cmap w!! w !sudo tee >/dev/null % " Execute macros over multiple visual lines xnoremap @ :call ExecuteMacroOverVisualRange() function! ExecuteMacroOverVisualRange() echo "@".getcmdline() execute ":'<,'>normal @".nr2char(getchar()) endfunction " Display a message when the current file is not in utf-8 format. " Note that we need to use `unsilent` command here because of this issue: " https://github.com/vim/vim/issues/4379 augroup non_utf8_file_warn autocmd! autocmd BufRead * if &fileencoding != 'utf-8' \ | unsilent echomsg 'File not in UTF-8 format!' | endif augroup END " Search for selected text, forwards or backwards. vnoremap * : \let old_reg=getreg('"')let old_regtype=getregtype('"') \gvy/=substitute( \escape(@", '/\.*$^~['), '\_s\+', '\\_s\\+', 'g') \gV:call setreg('"', old_reg, old_regtype) vnoremap # : \let old_reg=getreg('"')let old_regtype=getregtype('"') \gvy?=substitute( \escape(@", '?\.*$^~['), '\_s\+', '\\_s\\+', 'g') \gV:call setreg('"', old_reg, old_regtype)
-
My vimrc is, uhh, big, but I've tried to keep it commented.