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

View File

@@ -19,7 +19,7 @@ A cheat sheet for my vim customizations
## Highlights ## Highlights
* `<leader><leader>` - turn off search highlight * `<leader><space>` - turn off search highlight
* `<Leader>C` - toggle row/column cursor * `<Leader>C` - toggle row/column cursor
## Buffers ## Buffers
@@ -41,6 +41,7 @@ A cheat sheet for my vim customizations
## FZF ## FZF
* `<leader>f` - open FZF files * `<leader>f` - open FZF files
* `<leader><leader>` - open FZF files
* `<leader>b` - open FZF buffers * `<leader>b` - open FZF buffers
## Editing ## Editing

21
.vimrc
View File

@@ -4,7 +4,7 @@
set nocompatible " be iMproved, required set nocompatible " be iMproved, required
set number " turn on line numbers set number " turn on line numbers
set relativenumber " lines are numbered relative to current line 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 belloff=all " no sound/flash on errors
set autoread " set to auto read when a file is changed from the outside 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 'godlygeek/tabular'
Plug 'preservim/vim-markdown' Plug 'preservim/vim-markdown'
call plug#end() call plug#end()
" --------------------------------------------------------------------------------------------------------------------- " ---------------------------------------------------------------------------------------------------------------------
@@ -172,10 +171,10 @@ set statusline+=\ %P " percent through file
" => Keymaps: Highlights " => Keymaps: Highlights
" <leader><leader> to turn off search highlight " <leader><leader> to turn off search highlight
nnoremap <leader><leader> :nohls <enter> nnoremap <leader><space> :nohls <enter>
" <leader>C to toggle row/column highlight " <leader>C to toggle row/column highlight
nnoremap <Leader>C :set cursorline! cursorcolumn!<CR> nnoremap <leader>C :set cursorline! cursorcolumn!<CR>
" --------------------------------------------------------------------------------------------------------------------- " ---------------------------------------------------------------------------------------------------------------------
" ==> Keymaps: Buffers & Panes " ==> Keymaps: Buffers & Panes
@@ -196,16 +195,19 @@ nnoremap <C-K> <C-W><C-K>
map <leader>b :Buffers<CR> map <leader>b :Buffers<CR>
" <leader>s to save buffer " <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 " <leader>c to close buffer
nnoremap <Leader>c :bd <enter> nnoremap <leader>c :bd <enter>
" <leader>a to abandon buffer " <leader>a to abandon buffer
nnoremap <Leader>a :bd! <enter> nnoremap <leader>a :bd! <enter>
" <leader>x to bring up the copy buffer " <leader>x to bring up the copy buffer
noremap <Leader>x "+ noremap <leader>x "+
" <F5> to refresh buffer " <F5> to refresh buffer
nnoremap <F5> <C-R>:checktime <CR> nnoremap <F5> <C-R>:checktime <CR>
@@ -214,7 +216,8 @@ nnoremap <F5> <C-R>:checktime <CR>
" ==> Keymaps " ==> Keymaps
" <leader>f to open FZF files " <leader>f to open FZF files
map <Leader>f :Files<CR> map <leader>f :Files<CR>
map <leader><leader> :Files<CR>
" <leader>r to open registers " <leader>r to open registers
map <leader>r :registers<CR> map <leader>r :registers<CR>