From 3822bfed91c6fde46de7f201a57d16d9c90de7ae Mon Sep 17 00:00:00 2001 From: chawley Date: Fri, 23 Feb 2024 16:45:38 -0500 Subject: [PATCH] keybinding updates * `q` to quit * `` to clear highlights --- .vim/vim-keys-help.md | 3 ++- .vimrc | 23 +++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.vim/vim-keys-help.md b/.vim/vim-keys-help.md index 0c22272..c60a630 100644 --- a/.vim/vim-keys-help.md +++ b/.vim/vim-keys-help.md @@ -19,7 +19,7 @@ A cheat sheet for my vim customizations ## Highlights -* `` - turn off search highlight +* `` - turn off search highlight * `C` - toggle row/column cursor ## Buffers @@ -41,6 +41,7 @@ A cheat sheet for my vim customizations ## FZF * `f` - open FZF files +* `` - open FZF files * `b` - open FZF buffers ## Editing diff --git a/.vimrc b/.vimrc index 1677693..f8b359c 100644 --- a/.vimrc +++ b/.vimrc @@ -4,7 +4,7 @@ set nocompatible " be iMproved, required set number " turn on line numbers set relativenumber " lines are numbered relative to current line -set scrolloff=8 " number of lines to keep above and below the cursor +set scrolloff=10 " number of lines to keep above and below the cursor set belloff=all " no sound/flash on errors set autoread " set to auto read when a file is changed from the outside @@ -107,7 +107,6 @@ Plug 'dense-analysis/ale' Plug 'godlygeek/tabular' Plug 'preservim/vim-markdown' - call plug#end() " --------------------------------------------------------------------------------------------------------------------- @@ -172,10 +171,10 @@ set statusline+=\ %P " percent through file " => Keymaps: Highlights " to turn off search highlight -nnoremap :nohls +nnoremap :nohls " C to toggle row/column highlight -nnoremap C :set cursorline! cursorcolumn! +nnoremap C :set cursorline! cursorcolumn! " --------------------------------------------------------------------------------------------------------------------- " ==> Keymaps: Buffers & Panes @@ -196,16 +195,19 @@ nnoremap map b :Buffers " s to save buffer -nnoremap s :w +nnoremap s :w + +" q to quit vim +nnoremap q :q " c to close buffer -nnoremap c :bd +nnoremap c :bd " a to abandon buffer -nnoremap a :bd! +nnoremap a :bd! " x to bring up the copy buffer -noremap x "+ +noremap x "+ " to refresh buffer nnoremap :checktime @@ -213,8 +215,9 @@ nnoremap :checktime " --------------------------------------------------------------------------------------------------------------------- " ==> Keymaps -" f to open FZF files -map f :Files +" f to open FZF files +map f :Files +map :Files " r to open registers map r :registers