Skip to content

Commit

Permalink
Update some hotkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
AGou-ops committed Dec 22, 2021
1 parent 1594857 commit 119df7e
Showing 1 changed file with 36 additions and 16 deletions.
52 changes: 36 additions & 16 deletions neovim/macOS/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ Plug 'morhetz/gruvbox'
Plug 'sainnhe/gruvbox-material'
" welcome page
Plug 'mhinz/vim-startify'

" scroll bar
Plug 'Xuyuanp/scrollbar.nvim'
" smmoth scroll: :h scroll.txt for help
Plug 'psliwka/vim-smoothie'


call plug#end()
Expand Down Expand Up @@ -132,7 +135,7 @@ let g:gruvbox_material_better_performance = 1

colorscheme gruvbox-material

" ==================
" ======================================================================
"
"========== Plugin Settings
"
Expand All @@ -147,6 +150,21 @@ autocmd VimEnter *.go Tagbar
" not working on macOS
let g:indentLine_setColors = 0

" ======== scrollbar settings =========
" more settings --> :h Scrollbar.nvim
augroup ScrollbarInit
autocmd!
autocmd WinScrolled,VimResized,QuitPre * silent! lua require('scrollbar').show()
autocmd WinEnter,FocusGained * silent! lua require('scrollbar').show()
autocmd WinLeave,BufLeave,BufWinLeave,FocusLost * silent! lua require('scrollbar').clear()
augroup end

let g:scrollbar_shape = {
\ 'head': '',
\ 'body': '',
\ 'tail': '',
\ }

" ======== illuminate settings =========
" Time in milliseconds (default 0)
let g:Illuminate_delay = 3000
Expand Down Expand Up @@ -245,10 +263,10 @@ hi FloatermNC guibg=gray
" hi CurrentWord guifg=0 guibg=163 gui=underline,bold,italic ctermfg=0 ctermbg=163 cterm=underline,bold,italic

" ========== vim-cursor settings ===========
let g:cursorword_highlight = 0
" let g:cursorword_highlight = 0
let g:cursorword_delay = 0
autocmd Colorscheme * highlight CursorWord0 cterm=underline gui=underline ctermbg=52 guibg=#303030
autocmd Colorscheme * highlight CursorWord1 cterm=underline gui=underline ctermbg=52 guibg=#303030
" autocmd Colorscheme * highlight CursorWord0 cterm=underline gui=underline ctermbg=52 guibg=#303030
" autocmd Colorscheme * highlight CursorWord1 cterm=underline gui=underline ctermbg=52 guibg=#303030
" highlight CursorWord0 cterm=underline gui=underline guisp=#ebcb8b
" highlight CursorWord1 cterm=underline gui=underline guisp=#ebcb8b
" augroup cursorword
Expand Down Expand Up @@ -300,7 +318,7 @@ endfunction
" let g:workspace_autosave_always = 1
" let g:workspace_session_directory = $HOME . '/.vim/sessions/'

" ===========
" ==========================================================================

" ========= Auto Shell comment.
autocmd BufNewFile *.sh,*.py exec ":call SetTitle()"
Expand Down Expand Up @@ -605,21 +623,23 @@ nnoremap <D-k> <C-w>k
nnoremap <D-h> <C-w>h
nnoremap <D-l> <C-w>l
" =====================
nnoremap <C-Down> <C-w>j
nnoremap <C-Up> <C-w>k
nnoremap <C-Left> <C-w>h
nnoremap <C-Right> <C-w>l
nnoremap <A-Down> <C-w>j
nnoremap <A-Up> <C-w>k
nnoremap <A-Left> <C-w>h
nnoremap <A-Right> <C-w>l
noremap H ^
noremap L $
nnoremap / /\v
vnoremap / /\v
vnoremap // y/<c-r>"<cr>
noremap <A-left> :bp<CR>
noremap <A-right> :bn<CR>
noremap <C-left> :bp<CR>
noremap <C-right> :bn<CR>
nnoremap ; :
" not working on macOS
noremap <leader>1 1gt
noremap <leader>2 2gt
noremap <leader>3 3gt
" ================
noremap <leader>0 :tablast<cr>
nnoremap <C-t> :tabnew<CR>
inoremap <C-t> <Esc>:tabnew<CR>
Expand All @@ -639,10 +659,10 @@ nmap <leader>s <Plug>(coc-codeaction-selected)
" vnoremap <leader>y "+y
vnoremap <C-c> "+y
vnoremap <C-v> "+p
nnoremap <C-h> <C-w>>
nnoremap <C-j> <C-w>+
nnoremap <C-k> <C-w>-
nnoremap <C-l> <C-w><
" nnoremap <C-h> <C-w>>
" nnoremap <C-j> <C-w>+
" nnoremap <C-k> <C-w>-
" nnoremap <C-l> <C-w><
nnoremap p ]p
nnoremap P [p
nnoremap ( %
Expand Down

0 comments on commit 119df7e

Please sign in to comment.