home: vim: add 'after'
This commit is contained in:
parent
d74aead9ae
commit
f1e4a4d914
14
home/vim/after/ftplugin/bash.vim
Normal file
14
home/vim/after/ftplugin/bash.vim
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Use shfmt as ALE fixer for bash
|
||||||
|
let b:ale_fixers=[ 'shfmt' ]
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
||||||
|
|
||||||
|
" Indent with 4 spaces, simplify script, indent switch cases, use Bash variant
|
||||||
|
let b:ale_sh_shfmt_options='-i 4 -s -ci -ln bash'
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_sh_shfmt_options'
|
||||||
|
|
||||||
|
" Use bash dialect explicitly, require explicit empty string test
|
||||||
|
let b:ale_sh_shellcheck_options='-s bash -o avoid-nullary-conditions'
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_sh_shellcheck_options'
|
13
home/vim/after/ftplugin/beancount.vim
Normal file
13
home/vim/after/ftplugin/beancount.vim
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Use a small indentation value on beancount files
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
let b:undo_ftplugin.='|setlocal shiftwidth<'
|
||||||
|
|
||||||
|
" Have automatic padding of transactions so that decimal is on 52nd column
|
||||||
|
let g:beancount_separator_col=52
|
||||||
|
|
||||||
|
" Automatic padding for transactions
|
||||||
|
nnoremap <buffer> <leader>= :AlignCommodity<CR>
|
||||||
|
vnoremap <buffer> <leader>= :AlignCommodity<CR>
|
14
home/vim/after/ftplugin/c.vim
Normal file
14
home/vim/after/ftplugin/c.vim
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" More warnings and the usual version in flags for Clang
|
||||||
|
let b:ale_c_clang_options='-Wall -Wextra -pedantic -std=c99'
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_c_clang_options'
|
||||||
|
|
||||||
|
" More warnings and the usual version in flags for GCC
|
||||||
|
let b:ale_c_gcc_options='-Wall -Wextra -pedantic -std=c99'
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_c_gcc_options'
|
||||||
|
|
||||||
|
" Use compile_commands.json to look for additional flags
|
||||||
|
let b:ale_c_parse_compile_commands=1
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_c_parse_compile_commands'
|
6
home/vim/after/ftplugin/cmake.vim
Normal file
6
home/vim/after/ftplugin/cmake.vim
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Use 2 spaces indentation inside CMake files
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
let b:undo_ftplugin.='|setlocal shiftwidth<'
|
14
home/vim/after/ftplugin/cpp.vim
Normal file
14
home/vim/after/ftplugin/cpp.vim
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" More warnings and the usual version in flags for Clang
|
||||||
|
let b:ale_cpp_clang_options='-Wall -Wextra -pedantic -std=c++17'
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_cpp_clang_options'
|
||||||
|
|
||||||
|
" More warnings and the usual version in flags for GCC
|
||||||
|
let b:ale_cpp_gcc_options='-Wall -Wextra -pedantic -std=c++17'
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_cpp_gcc_options'
|
||||||
|
|
||||||
|
" Use compile_commands.json to look for additional flags
|
||||||
|
let b:ale_c_parse_compile_commands=1
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_c_parse_compile_commands'
|
6
home/vim/after/ftplugin/d.vim
Normal file
6
home/vim/after/ftplugin/d.vim
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Use my desired ALE fixer for D
|
||||||
|
let b:ale_fixers=[ 'dfmt' ]
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
6
home/vim/after/ftplugin/fugitive.vim
Normal file
6
home/vim/after/ftplugin/fugitive.vim
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Don't highlight trailing whitespace in fugitive windows
|
||||||
|
let b:better_whitespace_enabled=0
|
||||||
|
let b:undo_ftplugin.='|unlet! b:better_whitespace_enabled'
|
6
home/vim/after/ftplugin/gitcommit.vim
Normal file
6
home/vim/after/ftplugin/gitcommit.vim
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Enable spell checking on commit messages
|
||||||
|
setlocal spell
|
||||||
|
let b:undo_ftplugin.='|setlocal spell<'
|
6
home/vim/after/ftplugin/gitconfig.vim
Normal file
6
home/vim/after/ftplugin/gitconfig.vim
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Git configuration files should use tabs to indent
|
||||||
|
setlocal noexpandtab
|
||||||
|
let b:undo_ftplugin.='|setlocal noexpandtab<'
|
6
home/vim/after/ftplugin/gitsendemail.vim
Normal file
6
home/vim/after/ftplugin/gitsendemail.vim
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Disable the prompt to delete whitespace
|
||||||
|
DisableStripWhitespaceOnSave
|
||||||
|
let b:undo_ftplugin.='|EnableStripWhitespaceOnSave'
|
30
home/vim/after/ftplugin/haskell.vim
Normal file
30
home/vim/after/ftplugin/haskell.vim
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Use a small indentation value on Haskell files
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
let b:undo_ftplugin.='|setlocal shiftwidth<'
|
||||||
|
|
||||||
|
" Use my desired ALE fixers for Haskell
|
||||||
|
let b:ale_fixers=[ 'brittany' ]
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
||||||
|
|
||||||
|
" Use stack-managed `hlint`
|
||||||
|
let b:ale_haskell_hlint_executable='stack'
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_haskell_hlint_executable'
|
||||||
|
|
||||||
|
" Use stack-managed `brittany`
|
||||||
|
let b:ale_haskell_brittany_executable='stack'
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_haskell_brittany_executable'
|
||||||
|
|
||||||
|
" Use dynamic libraries because of Arch linux, with default ALE options
|
||||||
|
let b:ale_haskell_ghc_options='--dynamic -fno-code -v0'
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_haskell_ghc_options'
|
||||||
|
|
||||||
|
" Automatically format files when saving them
|
||||||
|
let b:ale_fix_on_save=1
|
||||||
|
let b:undo_ftplugin='|unlet! b:ale_lint_on_save'
|
||||||
|
|
||||||
|
" Change max length of a line to 100 for this buffer to match official guidelines
|
||||||
|
setlocal colorcolumn=100
|
||||||
|
let b:undo_ftplugin.='|setlocal colorcolumn<'
|
6
home/vim/after/ftplugin/help.vim
Normal file
6
home/vim/after/ftplugin/help.vim
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Don't highlight trailing whitespace in help windows
|
||||||
|
let b:better_whitespace_enabled=0
|
||||||
|
let b:undo_ftplugin.='|unlet! b:better_whitespace_enabled'
|
6
home/vim/after/ftplugin/json.vim
Normal file
6
home/vim/after/ftplugin/json.vim
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Use my desired ALE fixer for JSON
|
||||||
|
let b:ale_fixers=[ 'jq' ]
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
6
home/vim/after/ftplugin/mail.vim
Normal file
6
home/vim/after/ftplugin/mail.vim
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Change max length of a line to 72 to follow the netiquette
|
||||||
|
setlocal colorcolumn=72
|
||||||
|
let b:undo_ftplugin.='|setlocal colorcolumn<'
|
6
home/vim/after/ftplugin/make.vim
Normal file
6
home/vim/after/ftplugin/make.vim
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Makefiles should use tabs to indent
|
||||||
|
setlocal noexpandtab
|
||||||
|
let b:undo_ftplugin.='|setlocal noexpandtab<'
|
6
home/vim/after/ftplugin/netrw.vim
Normal file
6
home/vim/after/ftplugin/netrw.vim
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Don't show Netrw in buffer list
|
||||||
|
setlocal bufhidden=delete
|
||||||
|
let b:undo_ftplugin='|setlocal bufhidden<'
|
14
home/vim/after/ftplugin/pandoc.vim
Normal file
14
home/vim/after/ftplugin/pandoc.vim
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Let ALE know that I want Markdown linters
|
||||||
|
let b:ale_linter_aliases=[ 'markdown' ]
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_linter_aliases'
|
||||||
|
|
||||||
|
" Use a small indentation value on Pandoc files
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
let b:undo_ftplugin.='|setlocal shiftwidth<'
|
||||||
|
|
||||||
|
" Use my usual text width
|
||||||
|
setlocal textwidth=80
|
||||||
|
let b:undo_ftplugin.='|setlocal textwidth<'
|
40
home/vim/after/ftplugin/python.vim
Normal file
40
home/vim/after/ftplugin/python.vim
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Use my desired ALE fixers for python
|
||||||
|
let b:ale_fixers=[ 'black', 'isort' ]
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
||||||
|
" Use my desired ALE linters for python
|
||||||
|
let b:ale_linters=[ 'flake8', 'mypy', 'pylint', 'pyls' ]
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_linters'
|
||||||
|
|
||||||
|
" Use pyls inside the python environment if needed
|
||||||
|
let b:ale_python_pyls_auto_pipenv=1
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_python_pyls_auto_pipenv'
|
||||||
|
|
||||||
|
" Disable pycodestyle checks from pyls because I'm already using flake8
|
||||||
|
let b:ale_python_pyls_config={
|
||||||
|
\ 'pyls': {
|
||||||
|
\ 'plugins': {
|
||||||
|
\ 'pycodestyle': {
|
||||||
|
\ 'enabled': v:false
|
||||||
|
\ },
|
||||||
|
\ },
|
||||||
|
\ },
|
||||||
|
\ }
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_python_pyls_config'
|
||||||
|
|
||||||
|
" Don't use mypy to check for syntax errors
|
||||||
|
let b:ale_python_mypy_ignore_invalid_syntax=1
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_python_mypy_ignore_invalid_syntax'
|
||||||
|
" Use mypy inside the python environment if needed
|
||||||
|
let b:ale_python_mypy_auto_pipenv=1
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_python_mypy_auto_pipenv'
|
||||||
|
|
||||||
|
" Automatically format files when saving them
|
||||||
|
let b:ale_fix_on_save=1
|
||||||
|
let b:undo_ftplugin='|unlet! b:ale_lint_on_save'
|
||||||
|
|
||||||
|
" Change max length of a line to 88 for this buffer to match black's settings
|
||||||
|
setlocal colorcolumn=88
|
||||||
|
let b:undo_ftplugin.='|setlocal colorcolumn<'
|
8
home/vim/after/ftplugin/qf.vim
Normal file
8
home/vim/after/ftplugin/qf.vim
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Use h/l to go to the previous/next non-empty quickfix or location list
|
||||||
|
nnoremap <silent> <buffer> h :call quickfixed#older()<CR>
|
||||||
|
let b:undo_ftplugin.='|nunmap <buffer> h'
|
||||||
|
nnoremap <silent> <buffer> l :call quickfixed#newer()<CR>
|
||||||
|
let b:undo_ftplugin.='|nunmap <buffer> l'
|
31
home/vim/after/ftplugin/rust.vim
Normal file
31
home/vim/after/ftplugin/rust.vim
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Check tests too
|
||||||
|
let b:ale_rust_cargo_check_tests=1
|
||||||
|
let b:undo_ftplugin='|unlet! b:ale_rust_cargo_check_tests'
|
||||||
|
|
||||||
|
" Check examples too
|
||||||
|
let b:ale_rust_cargo_check_examples=1
|
||||||
|
let b:undo_ftplugin='|unlet! b:ale_rust_cargo_check_examples'
|
||||||
|
|
||||||
|
" Use clippy if it's available instead of just cargo check
|
||||||
|
let b:ale_rust_cargo_use_clippy=executable('cargo-clippy')
|
||||||
|
let b:undo_ftplugin='|unlet! b:ale_rust_cargo_use_clippy'
|
||||||
|
|
||||||
|
" Use rust-analyzer instead of RLS as a linter
|
||||||
|
let b:ale_linters=[ 'cargo', 'analyzer' ]
|
||||||
|
let b:undo_ftplugin='|unlet! b:ale_linters'
|
||||||
|
|
||||||
|
|
||||||
|
" Use rustfmt as ALE fixer for rust
|
||||||
|
let b:ale_fixers=[ 'rustfmt' ]
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
||||||
|
|
||||||
|
" Automatically format files when saving them
|
||||||
|
let b:ale_fix_on_save=1
|
||||||
|
let b:undo_ftplugin='|unlet! b:ale_lint_on_save'
|
||||||
|
|
||||||
|
" Change max length of a line to 99 for this buffer to match official guidelines
|
||||||
|
setlocal colorcolumn=99
|
||||||
|
let b:undo_ftplugin.='|setlocal colorcolumn<'
|
14
home/vim/after/ftplugin/sh.vim
Normal file
14
home/vim/after/ftplugin/sh.vim
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Use shfmt as ALE fixer for sh
|
||||||
|
let b:ale_fixers=[ 'shfmt' ]
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
||||||
|
|
||||||
|
" Indent with 4 spaces, simplify the code, indent switch cases, use POSIX
|
||||||
|
let b:ale_sh_shfmt_options='-i 4 -s -ci -ln posix'
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_sh_shfmt_options'
|
||||||
|
|
||||||
|
" Require explicit empty string test
|
||||||
|
let b:ale_sh_shellcheck_options='-o avoid-nullary-conditions'
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_sh_shellcheck_options'
|
6
home/vim/after/ftplugin/tex.vim
Normal file
6
home/vim/after/ftplugin/tex.vim
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Use 2 spaces indentation inside TeX files
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
let b:undo_ftplugin.='|setlocal shiftwidth<'
|
6
home/vim/after/ftplugin/yaml.vim
Normal file
6
home/vim/after/ftplugin/yaml.vim
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Use a small indentation value on YAML files
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
let b:undo_ftplugin.='|setlocal shiftwidth<'
|
14
home/vim/after/ftplugin/zsh.vim
Normal file
14
home/vim/after/ftplugin/zsh.vim
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||||
|
call ftplugined#check_undo_ft()
|
||||||
|
|
||||||
|
" Use shfmt as ALE fixer for zsh
|
||||||
|
let b:ale_fixers=[ 'shfmt' ]
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
||||||
|
|
||||||
|
" Indent with 4 spaces, simplify script, indent switch cases, use Bash variant
|
||||||
|
let b:ale_sh_shfmt_options='-i 4 -s -ci -ln bash'
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_sh_shfmt_options'
|
||||||
|
|
||||||
|
" Use bash dialect explicitly, require explicit empty string test
|
||||||
|
let b:ale_sh_shellcheck_options='-s bash -o avoid-nullary-conditions'
|
||||||
|
let b:undo_ftplugin.='|unlet! b:ale_sh_shellcheck_options'
|
2
home/vim/after/plugin/mappings/ale.vim
Normal file
2
home/vim/after/plugin/mappings/ale.vim
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
" Use ALE LSP-powered symbol information
|
||||||
|
nnoremap <Leader>K :ALEHover<CR>
|
10
home/vim/after/plugin/mappings/fugitive.vim
Normal file
10
home/vim/after/plugin/mappings/fugitive.vim
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
" Visual bindings for merging diffs as in normal mode
|
||||||
|
xnoremap dp :diffput<cr>
|
||||||
|
xnoremap do :diffget<cr>
|
||||||
|
|
||||||
|
" Open status window
|
||||||
|
nnoremap <Leader>gs :Gstatus<CR>
|
||||||
|
" Open diff view of current buffer: the up/left window is the current index
|
||||||
|
nnoremap <Leader>gd :Gdiffsplit!<CR>
|
||||||
|
" Open current file log in new tab, populate its location list with history
|
||||||
|
nnoremap <Leader>gl :sp<CR><C-w>T:Gllog --follow -- %:p<CR>
|
38
home/vim/after/plugin/mappings/fzf.vim
Normal file
38
home/vim/after/plugin/mappings/fzf.vim
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
" Only git-tracked files, Vim needs to be in a Git repository
|
||||||
|
nnoremap <Leader>fg :GFiles<CR>
|
||||||
|
|
||||||
|
" All files
|
||||||
|
nnoremap <Leader>ff :Files<CR>
|
||||||
|
|
||||||
|
" Currently open buffers
|
||||||
|
nnoremap <Leader>fb :Buffers<CR>
|
||||||
|
|
||||||
|
" Buffer history
|
||||||
|
nnoremap <Leader>fh :History<CR>
|
||||||
|
|
||||||
|
" Tags in buffer
|
||||||
|
nnoremap <Leader>ft :BTags<CR>
|
||||||
|
|
||||||
|
" Tags in all project files
|
||||||
|
nnoremap <Leader>fT :Tags<CR>
|
||||||
|
|
||||||
|
" Snippets for the current fileytpe (using Ultisnips)
|
||||||
|
nnoremap <Leader>fs :Snippets<CR>
|
||||||
|
|
||||||
|
" All available commands
|
||||||
|
nnoremap <Leader>f: :Commands<CR>
|
||||||
|
|
||||||
|
" All commits (using fugitive)
|
||||||
|
nnoremap <Leader>fc :Commits<CR>
|
||||||
|
|
||||||
|
" All commits for the current buffer (using fugitive)
|
||||||
|
nnoremap <Leader>fC :BCommits<CR>
|
||||||
|
|
||||||
|
" Select normal mode mapping by searching for its name
|
||||||
|
nmap <Leader><Tab> <Plug>(fzf-maps-n)
|
||||||
|
|
||||||
|
" Select visual mode mapping by searching for its name
|
||||||
|
xmap <Leader><Tab> <Plug>(fzf-maps-x)
|
||||||
|
|
||||||
|
" Select operator pending mode mapping by searching for its name
|
||||||
|
omap <Leader><Tab> <Plug>(fzf-maps-o)
|
8
home/vim/after/plugin/mappings/misc.vim
Normal file
8
home/vim/after/plugin/mappings/misc.vim
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
" Yank until the end of line with Y, to be more consistent with D and C
|
||||||
|
nnoremap Y y$
|
||||||
|
|
||||||
|
" Run make silently, then skip the 'Press ENTER to continue'
|
||||||
|
noremap <Leader>m :silent! :make! \| :redraw!<CR>
|
||||||
|
|
||||||
|
" Remove search-highlighting
|
||||||
|
noremap <Leader><Leader> :nohls<CR>
|
11
home/vim/after/plugin/mappings/qf.vim
Normal file
11
home/vim/after/plugin/mappings/qf.vim
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
" Next and previous in quick-fix list
|
||||||
|
nmap <Leader>fn <Plug>(qf_qf_next)
|
||||||
|
nmap <Leader>fp <Plug>(qf_qf_previous)
|
||||||
|
|
||||||
|
" Next and previous in location list
|
||||||
|
nmap <Leader>ln <Plug>(qf_loc_next)
|
||||||
|
nmap <Leader>lp <Plug>(qf_loc_previous)
|
||||||
|
|
||||||
|
" Toggle quick-fix and location lists
|
||||||
|
nmap <Leader>tf <Plug>(qf_qf_toggle)
|
||||||
|
nmap <Leader>tl <Plug>(qf_loc_toggle)
|
7
home/vim/after/plugin/mappings/unimpaired.vim
Normal file
7
home/vim/after/plugin/mappings/unimpaired.vim
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
" Better fr layout mappings for vim-unimpaired and other '[' and ']' commands
|
||||||
|
nmap ( [
|
||||||
|
nmap ) ]
|
||||||
|
omap ( [
|
||||||
|
omap ) ]
|
||||||
|
xmap ( [
|
||||||
|
xmap ) ]
|
|
@ -47,6 +47,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
|
"nvim/after" = {
|
||||||
|
source = ./after;
|
||||||
|
};
|
||||||
|
|
||||||
"nvim/autoload" = {
|
"nvim/autoload" = {
|
||||||
source = ./autoload;
|
source = ./autoload;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue