Some new .vimrc fixes

This commit is contained in:
2021-02-17 14:11:52 -05:00
parent 2b9da46949
commit 35d965acb1

38
.vimrc
View File

@@ -35,7 +35,7 @@ filetype plugin on
" ==> From Vim Zero: https://www.oliversherouse.com/2017/08/21/vim_zero.html " ==> From Vim Zero: https://www.oliversherouse.com/2017/08/21/vim_zero.html
" General " General
let mapleader = ',' let mapleader = '\'
set hidden " Allow background buffers without saving set hidden " Allow background buffers without saving
set splitright " Split to right by default set splitright " Split to right by default
@@ -70,7 +70,6 @@ endif
" ...one step above 'nocompatible' mode: a universal set of defaults that (hopefully) everyone can agree on. " ...one step above 'nocompatible' mode: a universal set of defaults that (hopefully) everyone can agree on.
Plug 'tpope/vim-sensible' Plug 'tpope/vim-sensible'
" Syntax highlights for markdown " Syntax highlights for markdown
Plug 'tpope/vim-markdown' Plug 'tpope/vim-markdown'
@@ -84,6 +83,9 @@ Plug 'junegunn/fzf.vim'
" fugitive.vim for git " fugitive.vim for git
Plug 'tpope/vim-fugitive' Plug 'tpope/vim-fugitive'
" vim.vinegar
Plug 'tpope/vim-vinegar'
" Linter " Linter
Plug 'dense-analysis/ale' Plug 'dense-analysis/ale'
@@ -99,10 +101,10 @@ call plug#end()
" ==> Colors " ==> Colors
" "
"set termguicolors "set termguicolors
"colorscheme slate colorscheme slate
"colorscheme marklar "colorscheme marklar
"colorscheme automation "colorscheme automation
colorscheme advantage "colorscheme advantage
highlight colorcolumn ctermbg=darkgray guibg=darkgray highlight colorcolumn ctermbg=darkgray guibg=darkgray
highlight VertSplit ctermbg=black guibg=black ctermfg=darkgray guifg=darkgray highlight VertSplit ctermbg=black guibg=black ctermfg=darkgray guifg=darkgray
@@ -112,7 +114,7 @@ highlight visual cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=wh
" In split windows - active buffer status bar is yellow, inactive is black " In split windows - active buffer status bar is yellow, inactive is black
hi statuslinenc ctermbg=gray ctermfg=black hi statuslinenc ctermbg=gray ctermfg=black
hi statusline ctermbg=black ctermfg=green hi statusline ctermbg=yellow ctermfg=green
" --------------------------------------------------------------------------------------------------------------------- " ---------------------------------------------------------------------------------------------------------------------
" => Statusline " => Statusline
@@ -140,16 +142,22 @@ nnoremap <leader><space> :nohls <enter>
nnoremap <Leader>c :set cursorline! cursorcolumn!<CR> nnoremap <Leader>c :set cursorline! cursorcolumn!<CR>
" --------------------------------------------------------------------------------------------------------------------- " ---------------------------------------------------------------------------------------------------------------------
" ==> Keymaps: Buffers " ==> Keymaps: Buffers & Panes
" <ctrl>-H to move to previous buffer " <ctrl>-H to move to previous BUFFER
nnoremap <C-H> :bp <enter> nnoremap <C-H> :bp <enter>
" <ctrl>-L to move to next buffer " <ctrl>-L to move to next BUFFER
nnoremap <C-L> :bn <enter> nnoremap <C-L> :bn <enter>
" comma-w to save buffer " <ctrl>-J to move to lower PANE
nnoremap <Leader>w :w <enter> nnoremap <C-J> <C-W><C-J>
" comma-q to quit buffer " <ctrl>-K to move to upper PANE
nnoremap <Leader>q :bd <enter> nnoremap <C-K> <C-W><C-K>
" <leader>-s to save buffer
nnoremap <Leader>s :w <enter>
" <leader>-c to close buffer
nnoremap <Leader>c :bd <enter>
" bring up the copy buffer " bring up the copy buffer
noremap <Leader>x "+ noremap <Leader>x "+
" <F5> to refresh buffer " <F5> to refresh buffer
@@ -197,7 +205,7 @@ imap <F4> <C-R>=strftime("%H:%M")<CR>
nnoremap <F10> :setlocal spell! spelllang=en_us<CR> nnoremap <F10> :setlocal spell! spelllang=en_us<CR>
set spell spelllang=en_us set spell spelllang=en_us
" Save custom dictionary in nextcloud so it's available on all machines " Save custom dictionary in nextcloud so it's available on all machines
set spellfile=/home/chawley/nextcloud-overlook/notes/system/en.utf-8.add " set spellfile=/home/chawley/nextcloud-overlook/notes/system/en.utf-8.add
hi clear SpellBad hi clear SpellBad
hi clear SpellCap hi clear SpellCap
hi clear SpellErrors hi clear SpellErrors
@@ -272,6 +280,10 @@ let g:netrw_browse_split = 4
let g:netrw_altv = 1 let g:netrw_altv = 1
let g:netrw_winsize = 25 let g:netrw_winsize = 25
" NetrwTreeListing readonly fix. (https://vi.stackexchange.com/a/13012)
" Per default, netrw leaves unmodified buffers open. This autocommand
" deletes netrw's buffer once it's hidden (using ':q', for example)
autocmd FileType netrw setl bufhidden=delete
" --------------------------------------------------------------------------------------------------------------------- " ---------------------------------------------------------------------------------------------------------------------
" ==> yaml stuff (https://lornajane.net/posts/2018/vim-settings-for-working-with-yaml) " ==> yaml stuff (https://lornajane.net/posts/2018/vim-settings-for-working-with-yaml)