mirror of
https://github.com/m1ngsama/chopsticks.git
synced 2026-03-26 02:43:50 +00:00
Compare commits
1 commit
462a82874c
...
2864ad1aed
| Author | SHA1 | Date | |
|---|---|---|---|
| 2864ad1aed |
2 changed files with 104 additions and 135 deletions
146
.vimrc
146
.vimrc
|
|
@ -37,6 +37,15 @@ if !g:is_tty
|
||||||
set cursorline
|
set cursorline
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Set shift width to 4 spaces
|
||||||
|
set shiftwidth=4
|
||||||
|
|
||||||
|
" Set tab width to 4 columns
|
||||||
|
set tabstop=4
|
||||||
|
|
||||||
|
" Use space characters instead of tabs
|
||||||
|
set expandtab
|
||||||
|
|
||||||
" Do not save backup files
|
" Do not save backup files
|
||||||
set nobackup
|
set nobackup
|
||||||
|
|
||||||
|
|
@ -61,6 +70,9 @@ set showcmd
|
||||||
" Show the mode you are on the last line
|
" Show the mode you are on the last line
|
||||||
set showmode
|
set showmode
|
||||||
|
|
||||||
|
" Show matching words during a search
|
||||||
|
set showmatch
|
||||||
|
|
||||||
" Use highlighting when doing a search
|
" Use highlighting when doing a search
|
||||||
set hlsearch
|
set hlsearch
|
||||||
|
|
||||||
|
|
@ -112,8 +124,10 @@ set lazyredraw
|
||||||
" For regular expressions turn magic on
|
" For regular expressions turn magic on
|
||||||
set magic
|
set magic
|
||||||
|
|
||||||
" Show matching brackets and how many tenths of a second to blink
|
" Show matching brackets when text indicator is over them
|
||||||
set showmatch
|
set showmatch
|
||||||
|
|
||||||
|
" How many tenths of a second to blink when matching brackets
|
||||||
set mat=2
|
set mat=2
|
||||||
|
|
||||||
" No annoying sound on errors
|
" No annoying sound on errors
|
||||||
|
|
@ -138,16 +152,11 @@ endif
|
||||||
" Use Unix as the standard file type
|
" Use Unix as the standard file type
|
||||||
set ffs=unix,dos,mac
|
set ffs=unix,dos,mac
|
||||||
|
|
||||||
|
" Turn backup off, since most stuff is in SVN, git etc. anyway
|
||||||
|
set nobackup
|
||||||
set nowb
|
set nowb
|
||||||
set noswapfile
|
set noswapfile
|
||||||
|
|
||||||
" Persistent undo across sessions
|
|
||||||
if has('persistent_undo')
|
|
||||||
set undofile
|
|
||||||
let &undodir = expand('~/.vim/.undo')
|
|
||||||
silent! call mkdir(&undodir, 'p', 0700)
|
|
||||||
endif
|
|
||||||
|
|
||||||
" ============================================================================
|
" ============================================================================
|
||||||
" => Vim-Plug Plugin Manager
|
" => Vim-Plug Plugin Manager
|
||||||
" ============================================================================
|
" ============================================================================
|
||||||
|
|
@ -166,6 +175,7 @@ call plug#begin('~/.vim/plugged')
|
||||||
Plug 'preservim/nerdtree' " File explorer
|
Plug 'preservim/nerdtree' " File explorer
|
||||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||||
Plug 'junegunn/fzf.vim' " Fuzzy finder
|
Plug 'junegunn/fzf.vim' " Fuzzy finder
|
||||||
|
Plug 'ctrlpvim/ctrlp.vim' " Fuzzy file finder
|
||||||
|
|
||||||
" ===== Git Integration =====
|
" ===== Git Integration =====
|
||||||
Plug 'tpope/vim-fugitive' " Git wrapper
|
Plug 'tpope/vim-fugitive' " Git wrapper
|
||||||
|
|
@ -352,7 +362,7 @@ au TabLeave * let g:lasttab = tabpagenr()
|
||||||
map <leader>te :tabedit <C-r>=expand("%:p:h")<cr>/
|
map <leader>te :tabedit <C-r>=expand("%:p:h")<cr>/
|
||||||
|
|
||||||
" Switch CWD to the directory of the open buffer
|
" Switch CWD to the directory of the open buffer
|
||||||
map <leader>wd :cd %:p:h<cr>:pwd<cr>
|
map <leader>cd :cd %:p:h<cr>:pwd<cr>
|
||||||
|
|
||||||
" Remap VIM 0 to first non-blank character
|
" Remap VIM 0 to first non-blank character
|
||||||
map 0 ^
|
map 0 ^
|
||||||
|
|
@ -384,38 +394,6 @@ nnoremap <F4> :set invrelativenumber<CR>
|
||||||
" Enable folding with the spacebar
|
" Enable folding with the spacebar
|
||||||
nnoremap <space> za
|
nnoremap <space> za
|
||||||
|
|
||||||
" Y yanks to end of line (consistent with D, C)
|
|
||||||
nnoremap Y y$
|
|
||||||
|
|
||||||
" Disable accidental Ex mode
|
|
||||||
nnoremap Q <nop>
|
|
||||||
|
|
||||||
" Keep visual selection after indent
|
|
||||||
vnoremap < <gv
|
|
||||||
vnoremap > >gv
|
|
||||||
|
|
||||||
" Center cursor when jumping through search results
|
|
||||||
nnoremap n nzzzv
|
|
||||||
nnoremap N Nzzzv
|
|
||||||
|
|
||||||
" Center cursor after half-page scroll
|
|
||||||
nnoremap <C-d> <C-d>zz
|
|
||||||
nnoremap <C-u> <C-u>zz
|
|
||||||
|
|
||||||
" System clipboard yank (conditional: requires clipboard provider)
|
|
||||||
if has('clipboard')
|
|
||||||
nnoremap <leader>y "+y
|
|
||||||
vnoremap <leader>y "+y
|
|
||||||
nnoremap <leader>Y "+Y
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Quickfix list shortcuts ([q/]q from vim-unimpaired handles navigation)
|
|
||||||
nnoremap <leader>qo :copen<CR>
|
|
||||||
nnoremap <leader>qc :cclose<CR>
|
|
||||||
|
|
||||||
" Auto-equalize splits when terminal window is resized
|
|
||||||
autocmd VimResized * wincmd =
|
|
||||||
|
|
||||||
" ============================================================================
|
" ============================================================================
|
||||||
" => Plugin Settings
|
" => Plugin Settings
|
||||||
" ============================================================================
|
" ============================================================================
|
||||||
|
|
@ -425,10 +403,7 @@ map <C-n> :NERDTreeToggle<CR>
|
||||||
map <leader>n :NERDTreeFind<CR>
|
map <leader>n :NERDTreeFind<CR>
|
||||||
|
|
||||||
" Close vim if the only window left open is a NERDTree
|
" Close vim if the only window left open is a NERDTree
|
||||||
augroup NERDTreeAutoClose
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||||
autocmd!
|
|
||||||
autocmd BufEnter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
" Show hidden files
|
" Show hidden files
|
||||||
let NERDTreeShowHidden=1
|
let NERDTreeShowHidden=1
|
||||||
|
|
@ -450,8 +425,7 @@ endif
|
||||||
map <C-p> :Files<CR>
|
map <C-p> :Files<CR>
|
||||||
map <leader>b :Buffers<CR>
|
map <leader>b :Buffers<CR>
|
||||||
map <leader>rg :Rg<CR>
|
map <leader>rg :Rg<CR>
|
||||||
map <leader>rt :Tags<CR>
|
map <leader>t :Tags<CR>
|
||||||
map <leader>gF :GFiles<CR>
|
|
||||||
|
|
||||||
" FZF customization for better project search
|
" FZF customization for better project search
|
||||||
let g:fzf_layout = { 'down': '40%' }
|
let g:fzf_layout = { 'down': '40%' }
|
||||||
|
|
@ -481,6 +455,13 @@ else
|
||||||
command! -bang GFiles call fzf#vim#gitfiles('', fzf#vim#with_preview(), <bang>0)
|
command! -bang GFiles call fzf#vim#gitfiles('', fzf#vim#with_preview(), <bang>0)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" --- CtrlP ---
|
||||||
|
let g:ctrlp_working_path_mode = 'ra'
|
||||||
|
let g:ctrlp_show_hidden = 1
|
||||||
|
let g:ctrlp_custom_ignore = {
|
||||||
|
\ 'dir': '\v[\/]\.(git|hg|svn)$',
|
||||||
|
\ 'file': '\v\.(exe|so|dll|pyc)$',
|
||||||
|
\ }
|
||||||
|
|
||||||
" --- Airline ---
|
" --- Airline ---
|
||||||
" Disable powerline fonts in TTY for compatibility
|
" Disable powerline fonts in TTY for compatibility
|
||||||
|
|
@ -537,18 +518,17 @@ let g:ale_fixers = {
|
||||||
\ 'markdown': ['prettier'],
|
\ 'markdown': ['prettier'],
|
||||||
\}
|
\}
|
||||||
|
|
||||||
" Don't fix on save if LSP is handling formatting (avoids double-format)
|
let g:ale_fix_on_save = 1
|
||||||
let g:ale_fix_on_save = !g:use_vimlsp
|
|
||||||
let g:ale_sign_error = 'X'
|
let g:ale_sign_error = 'X'
|
||||||
let g:ale_sign_warning = '!'
|
let g:ale_sign_warning = '!'
|
||||||
let g:ale_lint_on_text_changed = 'never'
|
let g:ale_lint_on_text_changed = 'never'
|
||||||
let g:ale_lint_on_insert_leave = 0
|
let g:ale_lint_on_insert_leave = 0
|
||||||
let g:ale_lint_on_enter = 0
|
let g:ale_lint_on_enter = 0
|
||||||
|
|
||||||
" Navigate between errors: [e/]e (unimpaired style), <leader>aD for detail
|
" Navigate between errors
|
||||||
nmap <silent> [e :ALENext<cr>
|
nmap <silent> <leader>aj :ALENext<cr>
|
||||||
nmap <silent> ]e :ALEPrevious<cr>
|
nmap <silent> <leader>ak :ALEPrevious<cr>
|
||||||
nmap <silent> <leader>aD :ALEDetail<cr>
|
nmap <silent> <leader>ad :ALEDetail<cr>
|
||||||
|
|
||||||
" --- Tagbar ---
|
" --- Tagbar ---
|
||||||
nmap <F8> :TagbarToggle<CR>
|
nmap <F8> :TagbarToggle<CR>
|
||||||
|
|
@ -640,10 +620,10 @@ if g:use_coc
|
||||||
nnoremap <silent> <leader>cc :CocList commands<CR>
|
nnoremap <silent> <leader>cc :CocList commands<CR>
|
||||||
|
|
||||||
" Resume latest CoC list
|
" Resume latest CoC list
|
||||||
nnoremap <silent> <leader>cr :CocListResume<CR>
|
nnoremap <silent> <leader>cp :CocListResume<CR>
|
||||||
|
|
||||||
" Show all diagnostics
|
" Show all diagnostics
|
||||||
nnoremap <silent> <leader>cD :CocList diagnostics<CR>
|
nnoremap <silent> <leader>cd :CocList diagnostics<CR>
|
||||||
|
|
||||||
" Text object for function/class (requires language server support)
|
" Text object for function/class (requires language server support)
|
||||||
xmap if <Plug>(coc-funcobj-i)
|
xmap if <Plug>(coc-funcobj-i)
|
||||||
|
|
@ -726,7 +706,7 @@ if g:use_vimlsp
|
||||||
" Workspace
|
" Workspace
|
||||||
nmap <buffer> <leader>ws <plug>(lsp-workspace-symbol-search)
|
nmap <buffer> <leader>ws <plug>(lsp-workspace-symbol-search)
|
||||||
nmap <buffer> <leader>o <plug>(lsp-document-symbol-search)
|
nmap <buffer> <leader>o <plug>(lsp-document-symbol-search)
|
||||||
nmap <buffer> <leader>cD <plug>(lsp-document-diagnostics)
|
nmap <buffer> <leader>cd <plug>(lsp-document-diagnostics)
|
||||||
|
|
||||||
" Enable auto-format on save for filetypes with reliable LSP formatters
|
" Enable auto-format on save for filetypes with reliable LSP formatters
|
||||||
if index(['python', 'go', 'rust', 'typescript', 'javascript', 'sh'], &filetype) >= 0
|
if index(['python', 'go', 'rust', 'typescript', 'javascript', 'sh'], &filetype) >= 0
|
||||||
|
|
@ -902,6 +882,9 @@ set secure
|
||||||
" Quick format entire file
|
" Quick format entire file
|
||||||
nnoremap <leader>F gg=G``
|
nnoremap <leader>F gg=G``
|
||||||
|
|
||||||
|
" Toggle between source and header files (for C/C++)
|
||||||
|
nnoremap <leader>a :A<CR>
|
||||||
|
|
||||||
" Quick save all buffers
|
" Quick save all buffers
|
||||||
nnoremap <leader>wa :wa<CR>
|
nnoremap <leader>wa :wa<CR>
|
||||||
|
|
||||||
|
|
@ -952,7 +935,7 @@ augroup END
|
||||||
" ============================================================================
|
" ============================================================================
|
||||||
|
|
||||||
" Show syntax highlighting groups for word under cursor
|
" Show syntax highlighting groups for word under cursor
|
||||||
nmap <leader>sh :call <SID>SynStack()<CR>
|
nmap <leader>sp :call <SID>SynStack()<CR>
|
||||||
function! <SID>SynStack()
|
function! <SID>SynStack()
|
||||||
if !exists("*synstack")
|
if !exists("*synstack")
|
||||||
return
|
return
|
||||||
|
|
@ -1022,7 +1005,15 @@ if g:is_tty
|
||||||
" Simpler status line for TTY
|
" Simpler status line for TTY
|
||||||
set statusline=%f\ %h%w%m%r\ %=%(%l,%c%V\ %=\ %P%)
|
set statusline=%f\ %h%w%m%r\ %=%(%l,%c%V\ %=\ %P%)
|
||||||
|
|
||||||
" Reduce syntax highlighting complexity in TTY (global is 200, lower here)
|
" Disable some visual effects
|
||||||
|
set novisualbell
|
||||||
|
set noerrorbells
|
||||||
|
|
||||||
|
" Faster redraw
|
||||||
|
set lazyredraw
|
||||||
|
set ttyfast
|
||||||
|
|
||||||
|
" Reduce syntax highlighting complexity
|
||||||
set synmaxcol=120
|
set synmaxcol=120
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
@ -1049,7 +1040,7 @@ if exists('g:plugs["vim-which-key"]')
|
||||||
nnoremap <silent> <leader> :<C-u>WhichKey ','<CR>
|
nnoremap <silent> <leader> :<C-u>WhichKey ','<CR>
|
||||||
vnoremap <silent> <leader> :<C-u>WhichKeyVisual ','<CR>
|
vnoremap <silent> <leader> :<C-u>WhichKeyVisual ','<CR>
|
||||||
|
|
||||||
" Top-level single-key bindings (w and q also have sub-groups below)
|
" Top-level single-key bindings
|
||||||
let g:which_key_map = {}
|
let g:which_key_map = {}
|
||||||
let g:which_key_map['x'] = 'save-and-quit'
|
let g:which_key_map['x'] = 'save-and-quit'
|
||||||
let g:which_key_map['F'] = 'format-file'
|
let g:which_key_map['F'] = 'format-file'
|
||||||
|
|
@ -1058,28 +1049,26 @@ if exists('g:plugs["vim-which-key"]')
|
||||||
let g:which_key_map['n'] = 'nerdtree-find'
|
let g:which_key_map['n'] = 'nerdtree-find'
|
||||||
let g:which_key_map['o'] = 'outline'
|
let g:which_key_map['o'] = 'outline'
|
||||||
let g:which_key_map['b'] = 'buffers'
|
let g:which_key_map['b'] = 'buffers'
|
||||||
let g:which_key_map['h'] = 'prev-buffer'
|
|
||||||
let g:which_key_map['l'] = 'next-buffer'
|
|
||||||
let g:which_key_map['*'] = 'search-replace-word'
|
let g:which_key_map['*'] = 'search-replace-word'
|
||||||
let g:which_key_map[','] = 'last-file'
|
let g:which_key_map[','] = 'last-file'
|
||||||
let g:which_key_map['y'] = 'clipboard-yank'
|
|
||||||
let g:which_key_map['Y'] = 'clipboard-yank-line'
|
|
||||||
|
|
||||||
" [a]LE lint group ([e/]e navigate; <leader>aD for detail)
|
" [a]LE / lint group
|
||||||
let g:which_key_map['a'] = {
|
let g:which_key_map['a'] = {
|
||||||
\ 'name': '+ale-lint',
|
\ 'name': '+ale-lint',
|
||||||
\ 'D': 'ale-detail',
|
\ 'j': 'next-error',
|
||||||
|
\ 'k': 'prev-error',
|
||||||
|
\ 'd': 'detail',
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
" [c]ode / [c]opy group
|
" [c]opy / [c]ode group
|
||||||
let g:which_key_map['c'] = {
|
let g:which_key_map['c'] = {
|
||||||
\ 'name': '+code/copy',
|
\ 'name': '+code/copy',
|
||||||
\ 'a': 'code-action-cursor',
|
\ 'a': 'code-action-cursor',
|
||||||
\ 'A': 'code-action-source',
|
\ 'A': 'code-action-source',
|
||||||
\ 'c': 'coc-commands',
|
\ 'c': 'coc-commands',
|
||||||
\ 'D': 'diagnostics-list',
|
\ 'd': 'diagnostics',
|
||||||
\ 'l': 'code-lens',
|
\ 'l': 'code-lens',
|
||||||
\ 'r': 'coc-list-resume',
|
\ 'r': 'resume-list',
|
||||||
\ 'p': 'copy-filepath',
|
\ 'p': 'copy-filepath',
|
||||||
\ 'f': 'copy-filename',
|
\ 'f': 'copy-filename',
|
||||||
\ }
|
\ }
|
||||||
|
|
@ -1099,26 +1088,22 @@ if exists('g:plugs["vim-which-key"]')
|
||||||
\ 'l': 'pull',
|
\ 'l': 'pull',
|
||||||
\ 'd': 'diff',
|
\ 'd': 'diff',
|
||||||
\ 'b': 'blame',
|
\ 'b': 'blame',
|
||||||
\ 'F': 'git-files-fzf',
|
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
" [q]uickfix group (also: <leader>q = fast quit)
|
" [q]uickfix group
|
||||||
let g:which_key_map['q'] = {
|
let g:which_key_map['q'] = {
|
||||||
\ 'name': '+quickfix',
|
\ 'name': '+quickfix',
|
||||||
\ 'f': 'lsp-fix-current',
|
\ 'f': 'auto-fix',
|
||||||
\ 'o': 'open-quickfix',
|
|
||||||
\ 'c': 'close-quickfix',
|
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
" [r]efactor / [r]ipgrep / [r]eplace group
|
" [r]efactor group
|
||||||
let g:which_key_map['r'] = {
|
let g:which_key_map['r'] = {
|
||||||
\ 'name': '+search/refactor',
|
\ 'name': '+refactor',
|
||||||
\ 'n': 'rename',
|
\ 'n': 'rename',
|
||||||
\ 'g': 'ripgrep',
|
\ 'g': 'ripgrep',
|
||||||
\ 't': 'tags-search',
|
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
" [s]pell / [s]ource group
|
" [s]pell / source group
|
||||||
let g:which_key_map['s'] = {
|
let g:which_key_map['s'] = {
|
||||||
\ 'name': '+spell/source',
|
\ 'name': '+spell/source',
|
||||||
\ 's': 'toggle-spell',
|
\ 's': 'toggle-spell',
|
||||||
|
|
@ -1128,10 +1113,10 @@ if exists('g:plugs["vim-which-key"]')
|
||||||
\ '?': 'suggest',
|
\ '?': 'suggest',
|
||||||
\ 'v': 'source-vimrc',
|
\ 'v': 'source-vimrc',
|
||||||
\ 'o': 'source-file',
|
\ 'o': 'source-file',
|
||||||
\ 'h': 'syntax-highlight-stack',
|
\ 'y': 'syntax-stack',
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
" [t]ab / [t]erminal group
|
" [t]ab / terminal group
|
||||||
let g:which_key_map['t'] = {
|
let g:which_key_map['t'] = {
|
||||||
\ 'name': '+tab/terminal',
|
\ 'name': '+tab/terminal',
|
||||||
\ 'n': 'new-tab',
|
\ 'n': 'new-tab',
|
||||||
|
|
@ -1144,12 +1129,11 @@ if exists('g:plugs["vim-which-key"]')
|
||||||
\ 'h': 'terminal-horizontal',
|
\ 'h': 'terminal-horizontal',
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
" [w]orkspace / [w]indow / save group (also: <leader>w = fast save)
|
" [w]orkspace / window / save group
|
||||||
let g:which_key_map['w'] = {
|
let g:which_key_map['w'] = {
|
||||||
\ 'name': '+save/window',
|
\ 'name': '+save/window',
|
||||||
\ 'a': 'save-all',
|
\ 'a': 'save-all',
|
||||||
\ 's': 'workspace-symbols',
|
\ 's': 'workspace-symbols',
|
||||||
\ 'd': 'change-dir',
|
|
||||||
\ }
|
\ }
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
93
README.md
93
README.md
|
|
@ -120,8 +120,6 @@ Press `,` and wait 500ms for an interactive guide to all bindings (vim-which-key
|
||||||
| `Ctrl+p` | Fuzzy file search (FZF) |
|
| `Ctrl+p` | Fuzzy file search (FZF) |
|
||||||
| `,b` | Search open buffers (FZF) |
|
| `,b` | Search open buffers (FZF) |
|
||||||
| `,rg` | Project-wide search (ripgrep+FZF) |
|
| `,rg` | Project-wide search (ripgrep+FZF) |
|
||||||
| `,rt` | Search tags (FZF) |
|
|
||||||
| `,gF` | Search git-tracked files (FZF) |
|
|
||||||
| `,l` | Next buffer |
|
| `,l` | Next buffer |
|
||||||
| `,h` | Previous buffer |
|
| `,h` | Previous buffer |
|
||||||
| `,bd` | Close current buffer |
|
| `,bd` | Close current buffer |
|
||||||
|
|
@ -158,8 +156,7 @@ Press `,` and wait 500ms for an interactive guide to all bindings (vim-which-key
|
||||||
| `,cl` | Run code lens (CoC) |
|
| `,cl` | Run code lens (CoC) |
|
||||||
| `,o` | File outline |
|
| `,o` | File outline |
|
||||||
| `,ws` | Workspace symbols |
|
| `,ws` | Workspace symbols |
|
||||||
| `,cD` | Diagnostics list |
|
| `,cd` | Diagnostics list |
|
||||||
| `,cr` | Resume last CoC list |
|
|
||||||
| `Tab` | Next completion item |
|
| `Tab` | Next completion item |
|
||||||
| `Shift+Tab` | Previous completion item |
|
| `Shift+Tab` | Previous completion item |
|
||||||
| `Enter` | Confirm completion |
|
| `Enter` | Confirm completion |
|
||||||
|
|
@ -168,67 +165,55 @@ Text objects (CoC only): `if`/`af` (function), `ic`/`ac` (class)
|
||||||
|
|
||||||
### Linting (ALE)
|
### Linting (ALE)
|
||||||
|
|
||||||
| Key | Action |
|
| Key | Action |
|
||||||
|----------|-----------------------|
|
|--------|-----------------------|
|
||||||
| `[e` | Next error/warning |
|
| `,aj` | Next error/warning |
|
||||||
| `]e` | Previous error/warning|
|
| `,ak` | Previous error/warning|
|
||||||
| `,aD` | Show error details |
|
| `,ad` | Show error details |
|
||||||
|
|
||||||
Signs: `X` = error, `!` = warning
|
Signs: `X` = error, `!` = warning
|
||||||
|
|
||||||
### Git Workflow (fugitive)
|
### Git Workflow (fugitive)
|
||||||
|
|
||||||
| Key | Action |
|
| Key | Action |
|
||||||
|--------|---------------------------------|
|
|--------|----------------|
|
||||||
| `,gs` | Git status |
|
| `,gs` | Git status |
|
||||||
| `,gc` | Git commit |
|
| `,gc` | Git commit |
|
||||||
| `,gp` | Git push |
|
| `,gp` | Git push |
|
||||||
| `,gl` | Git pull |
|
| `,gl` | Git pull |
|
||||||
| `,gd` | Git diff |
|
| `,gd` | Git diff |
|
||||||
| `,gb` | Git blame |
|
| `,gb` | Git blame |
|
||||||
| `,gF` | Search git-tracked files (FZF) |
|
|
||||||
|
|
||||||
### Engineering Utilities
|
### Engineering Utilities
|
||||||
|
|
||||||
| Key | Action |
|
| Key | Action |
|
||||||
|----------|-------------------------------------|
|
|----------|---------------------------------|
|
||||||
| `,ev` | Edit `~/.vimrc` |
|
| `,ev` | Edit `~/.vimrc` |
|
||||||
| `,sv` | Reload `~/.vimrc` |
|
| `,sv` | Reload `~/.vimrc` |
|
||||||
| `,F` | Format entire file (= indent) |
|
| `,F` | Format entire file (= indent) |
|
||||||
| `,W` | Strip trailing whitespace |
|
| `,W` | Strip trailing whitespace |
|
||||||
| `,wa` | Save all open buffers |
|
| `,wa` | Save all open buffers |
|
||||||
| `,wd` | Change CWD to current buffer's dir |
|
| `,cp` | Copy file path to clipboard |
|
||||||
| `,cp` | Copy file path to clipboard |
|
| `,cf` | Copy filename to clipboard |
|
||||||
| `,cf` | Copy filename to clipboard |
|
| `,*` | Search+replace word under cursor|
|
||||||
| `,y` | Yank to system clipboard |
|
| `,tv` | Open terminal (vertical split) |
|
||||||
| `,Y` | Yank line to system clipboard |
|
| `,th` | Open terminal (horizontal, 10r) |
|
||||||
| `,*` | Search+replace word under cursor |
|
| `Esc` | Exit terminal mode |
|
||||||
| `,qo` | Open quickfix list |
|
|
||||||
| `,qc` | Close quickfix list |
|
|
||||||
| `,tv` | Open terminal (vertical split) |
|
|
||||||
| `,th` | Open terminal (horizontal, 10r) |
|
|
||||||
| `Esc` | Exit terminal mode |
|
|
||||||
|
|
||||||
### Navigation and Editing
|
### Navigation and Editing
|
||||||
|
|
||||||
| Key | Action |
|
| Key | Action |
|
||||||
|------------|---------------------------------------------|
|
|----------|--------------------------------------|
|
||||||
| `s`+2ch | EasyMotion jump to any location |
|
| `s`+2ch | EasyMotion jump to any location |
|
||||||
| `Space` | Toggle code fold |
|
| `Space` | Toggle code fold |
|
||||||
| `Y` | Yank to end of line (like `D`, `C`) |
|
| `F2` | Toggle paste mode |
|
||||||
| `n` / `N` | Search next/prev (cursor centered) |
|
| `F3` | Toggle line numbers |
|
||||||
| `Ctrl+d/u` | Half-page scroll (cursor centered) |
|
| `F4` | Toggle relative line numbers |
|
||||||
| `>` | Indent (keeps visual selection) |
|
| `F5` | Toggle undo history (UndoTree) |
|
||||||
| `<` | Dedent (keeps visual selection) |
|
| `F8` | Toggle code tag browser (Tagbar) |
|
||||||
| `[q` / `]q`| Previous/next quickfix (vim-unimpaired) |
|
| `0` | Jump to first non-blank character |
|
||||||
| `[e` / `]e`| Previous/next ALE error/warning |
|
| `Alt+j` | Move line down |
|
||||||
| `F2` | Toggle paste mode |
|
| `Alt+k` | Move line up |
|
||||||
| `F3` | Toggle line numbers |
|
|
||||||
| `F4` | Toggle relative line numbers |
|
|
||||||
| `F5` | Toggle undo history (UndoTree) |
|
|
||||||
| `F8` | Toggle code tag browser (Tagbar) |
|
|
||||||
| `0` | Jump to first non-blank character |
|
|
||||||
| `Alt+j/k` | Move line up/down |
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue