updated vimrc
This commit is contained in:
@@ -9,12 +9,11 @@ set foldcolumn=2
|
||||
set mouse=a
|
||||
set encoding=utf8
|
||||
set guifont=JetBrains\ Mono\ Nerd\ Font\ 11
|
||||
"-------- colorcolumn ------------------
|
||||
"colorcolumn
|
||||
set colorcolumn=110
|
||||
highlight ColorColumn ctermbg=darkgray
|
||||
"---------------------------------------
|
||||
|
||||
"-------------------- plugins ------------------------
|
||||
"plugins
|
||||
call plug#begin()
|
||||
Plug 'preservim/nerdtree'
|
||||
Plug 'ryanoasis/vim-devicons'
|
||||
@@ -27,45 +26,63 @@ call plug#begin()
|
||||
Plug 'pangloss/vim-javascript'
|
||||
Plug 'mxw/vim-jsx'
|
||||
Plug 'theRealCarneiro/hyprland-vim-syntax'
|
||||
Plug 'junegunn/fzf.vim'
|
||||
call plug#end()
|
||||
"-----------------------------------------------------
|
||||
|
||||
"--------- keybinds -------------------------
|
||||
"keybinds
|
||||
nnoremap <C-n> :NERDTreeToggle<CR>
|
||||
inoremap <C-n> :NERDTreeToggle<CR>
|
||||
nnoremap <C-a> :NERDTreeFocus<CR>
|
||||
inoremap <C-a> <Esc>:NERDTreeFocus<CR>
|
||||
nnoremap <Space>e :NERDTreeFocus<CR>
|
||||
inoremap <Space>e :NERDTreeFocus<CR>
|
||||
nnoremap <C-e> :NERDTree<CR>
|
||||
nnoremap <C-z> :NERDTreeToggle<CR>
|
||||
inoremap <C-z> :NERDTreeToggle<CR>
|
||||
nnoremap <C-g> :NERDTreeRefresh<CR>
|
||||
inoremap <C-g> <Esc>:NERDTreeRefresh<CR>
|
||||
"------------ tabs -----------------------
|
||||
nnoremap <C-p> :tabprevious<CR>
|
||||
nnoremap <C-n> :tabnext<CR>
|
||||
nnoremap <C-t> :tabnew<CR>
|
||||
inoremap <C-p> <Esc>:tabprevious<CR>i
|
||||
inoremap <C-n> <Esc>:tabnext<CR>i
|
||||
inoremap <C-t> <Esc>:tabnew<CR>
|
||||
nnoremap <C-d> :tabclose<CR>
|
||||
inoremap <C-d> <Esc>:tabclose<CR>
|
||||
"-----------------------------------------
|
||||
"----------------- term --------
|
||||
"tabs
|
||||
nnoremap <Space>[ :tabprevious<CR>
|
||||
inoremap <Space>[ <Esc>:tabprevious<CR>
|
||||
nnoremap <Space>] :tabnext<CR>
|
||||
inoremap <Space>] <Esc>:tabnext<CR>i
|
||||
nnoremap <Space>t :tabnew<CR>
|
||||
inoremap <Space>t <Esc>:tabnew<CR>
|
||||
nnoremap <Space>w :tabclose<CR>
|
||||
inoremap <Space>w <Esc>:tabclose<CR>
|
||||
"term
|
||||
nnoremap <C-x> :term<CR>
|
||||
inoremap <C-x> <Esc>:term<CR>
|
||||
"-------------------------------
|
||||
"------------- gitlens -----------------------
|
||||
"Open terminal bottom with 15split size
|
||||
function! OpenTerminalBelow()
|
||||
belowright term
|
||||
resize 15 term
|
||||
endfunc
|
||||
|
||||
nnoremap <Space>h :call OpenTerminalBelow()<CR>
|
||||
inoremap <Space>h <Esc>:call OpenTerminalBelow()<CR>
|
||||
nnoremap <Space>l :resize +5<CR>
|
||||
inoremap <Space>l <Esc>:resize +5<CR>
|
||||
nnoremap <Space>k :resize -5<CR>
|
||||
inoremap <Space>k <Esc>:resize -5<CR>
|
||||
"gitlens
|
||||
nnoremap <C-l> :call ToggleGitLens()<CR>
|
||||
inoremap <C-l> <Esc>:call ToggleGitLens()<CR>
|
||||
"---------------------------------------------
|
||||
"save file
|
||||
nnoremap <C-s> :w<CR>
|
||||
inoremap <C-s> <Esc>:w<CR>
|
||||
"quit
|
||||
nnoremap <C-q> :q<CR>
|
||||
inoremap <C-q> <Esc>:q<CR>
|
||||
"------------- vim-plug --------------
|
||||
"vim-plug
|
||||
nnoremap <C-i> :PlugInstall<CR>
|
||||
inoremap <C-i> <Esc>:PlugInstall<CR>
|
||||
"-------------------------------------
|
||||
"update vim config
|
||||
nnoremap <C-u> :so%<CR>
|
||||
inoremap <C-u> <Esc>:so%<CR>
|
||||
"--------------------------------------------
|
||||
"--------------------------------------------
|
||||
|
||||
"fzf
|
||||
nnoremap <Space>f :Files<CR>
|
||||
inoremap <Space>f <Esc>:Files<CR>
|
||||
nnoremap <Space>g :Rg<CR>
|
||||
inoremap <Space>g <Esc>:Rg<CR>
|
||||
nnoremap <Space>r :vimgrep // **/*<Left><Left><Left><Left><Left><Left><Left>
|
||||
|
||||
Reference in New Issue
Block a user