mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
vim improvements
This commit is contained in:
parent
4ef570ea95
commit
2a605f703d
@ -593,33 +593,7 @@ key_bindings:
|
||||
- { key: A, mods: Super, chars: "\x02" } # CMD-A sends CTRL-B for tmux
|
||||
- { key: D, mods: Super, chars: "\x14" } # CMD-D sends CTRL-T for fzf
|
||||
- { key: O, mods: Super, chars: "edit\x0D" } # CMD-O opens file in vim
|
||||
|
||||
- { key: A, mods: Alt, chars: "\x1ba" }
|
||||
- { key: B, mods: Alt, chars: "\x1bb" }
|
||||
- { key: C, mods: Alt, chars: "\x1bc" }
|
||||
- { key: D, mods: Alt, chars: "\x1bd" }
|
||||
- { key: E, mods: Alt, chars: "\x1be" }
|
||||
- { key: F, mods: Alt, chars: "\x1bf" }
|
||||
- { key: G, mods: Alt, chars: "\x1bg" }
|
||||
- { key: H, mods: Alt, chars: "\x1bh" }
|
||||
- { key: I, mods: Alt, chars: "\x1bi" }
|
||||
- { key: J, mods: Alt, chars: "\x1bj" }
|
||||
- { key: K, mods: Alt, chars: "\x1bk" }
|
||||
- { key: L, mods: Alt, chars: "\x1bl" }
|
||||
- { key: M, mods: Alt, chars: "\x1bm" }
|
||||
- { key: N, mods: Alt, chars: "\x1bn" }
|
||||
- { key: O, mods: Alt, chars: "\x1bo" }
|
||||
- { key: P, mods: Alt, chars: "\x1bp" }
|
||||
- { key: Q, mods: Alt, chars: "\x1bq" }
|
||||
- { key: R, mods: Alt, chars: "\x1br" }
|
||||
- { key: S, mods: Alt, chars: "\x1bs" }
|
||||
- { key: T, mods: Alt, chars: "\x1bt" }
|
||||
- { key: U, mods: Alt, chars: "\x1bu" }
|
||||
- { key: V, mods: Alt, chars: "\x1bv" }
|
||||
- { key: W, mods: Alt, chars: "\x1bw" }
|
||||
- { key: X, mods: Alt, chars: "\x1bx" }
|
||||
- { key: Y, mods: Alt, chars: "\x1by" }
|
||||
- { key: Z, mods: Alt, chars: "\x1bz" }
|
||||
- { key: Return, mods: Shift, chars: "\x1b[13;2u" }
|
||||
|
||||
#- { key: Paste, action: Paste }
|
||||
#- { key: Copy, action: Copy }
|
||||
|
@ -27,6 +27,7 @@ Plug 'godlygeek/tabular' " Spacing and alignment
|
||||
Plug 'unblevable/quick-scope' " Hints for f and t
|
||||
Plug 'vimwiki/vimwiki' " Wiki Markdown System
|
||||
Plug 'jreybert/vimagit' " Git 'gui' buffer
|
||||
Plug 'airblade/vim-rooter' " Change directory to git route
|
||||
Plug 'tpope/vim-fugitive' " Other git commands
|
||||
Plug 'machakann/vim-highlightedyank' " Highlight text when copied
|
||||
Plug 'itchyny/lightline.vim' " Status bar
|
||||
@ -60,6 +61,8 @@ set incsearch " Search while typing
|
||||
set visualbell " No sounds
|
||||
set scrolljump=1 " Scroll more than one line (or 1 line)
|
||||
set scrolloff=3 " Margin of lines when to start scrolling
|
||||
set splitright " Vertical splits on the right side
|
||||
set splitbelow " Horizontal splits on the lower side
|
||||
set pastetoggle=<F3> " Use F3 to enter raw paste mode
|
||||
set clipboard+=unnamedplus " Uses system clipboard for yanking
|
||||
set updatetime=300 " Faster diagnostics
|
||||
@ -110,6 +113,7 @@ nnoremap <Leader>/ :Rg<CR>
|
||||
|
||||
" Quit vim
|
||||
nnoremap <Leader>q :quit<cr>
|
||||
nnoremap <Leader>Q :quitall<cr>
|
||||
|
||||
" Save file
|
||||
nnoremap <Leader>fs :write<cr>
|
||||
@ -153,6 +157,9 @@ nnoremap <Leader>ws :vsplit<cr>
|
||||
" Close all other splits
|
||||
nnoremap <Leader>wm :only<cr>
|
||||
|
||||
" Exit terminal mode (requires Alacritty escape)
|
||||
tnoremap <S-CR> <C-\><C-n>
|
||||
|
||||
" Open file tree
|
||||
noremap <silent> <Leader>ft :Fern . -drawer -width=35 -toggle<CR><C-w>=
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user