keybinding updates

* `<leader><leader` to open `:Files`
* `<leader>q`       to quit
* `<leader><space>` to clear highlights
This commit is contained in:
2024-02-23 16:45:38 -05:00
parent e64fc7a335
commit 3822bfed91
2 changed files with 15 additions and 11 deletions

23
.vimrc
View File

@@ -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
" <leader><leader> to turn off search highlight
nnoremap <leader><leader> :nohls <enter>
nnoremap <leader><space> :nohls <enter>
" <leader>C to toggle row/column highlight
nnoremap <Leader>C :set cursorline! cursorcolumn!<CR>
nnoremap <leader>C :set cursorline! cursorcolumn!<CR>
" ---------------------------------------------------------------------------------------------------------------------
" ==> Keymaps: Buffers & Panes
@@ -196,16 +195,19 @@ nnoremap <C-K> <C-W><C-K>
map <leader>b :Buffers<CR>
" <leader>s to save buffer
nnoremap <Leader>s :w <enter>
nnoremap <leader>s :w <enter>
" <leader>q to quit vim
nnoremap <leader>q :q <enter>
" <leader>c to close buffer
nnoremap <Leader>c :bd <enter>
nnoremap <leader>c :bd <enter>
" <leader>a to abandon buffer
nnoremap <Leader>a :bd! <enter>
nnoremap <leader>a :bd! <enter>
" <leader>x to bring up the copy buffer
noremap <Leader>x "+
noremap <leader>x "+
" <F5> to refresh buffer
nnoremap <F5> <C-R>:checktime <CR>
@@ -213,8 +215,9 @@ nnoremap <F5> <C-R>:checktime <CR>
" ---------------------------------------------------------------------------------------------------------------------
" ==> Keymaps
" <leader> f to open FZF files
map <Leader>f :Files<CR>
" <leader>f to open FZF files
map <leader>f :Files<CR>
map <leader><leader> :Files<CR>
" <leader>r to open registers
map <leader>r :registers<CR>