" Collection of custom bindings. " Last Changed: 2021-08-03 " Author: Federico Igne <> " License: This file is placed in the public domain. " " | " |_[b]uffer " | |_go to [b]uffer " | |_[d]elete current buffer (bbye) " | |_[D]elete buffers " | |_go to [p]revious " | " |_[c]ompile " | |_[c]ompile " | |_toggle [q]uickfix window " | |_[s]end line (Slime) " | " |_[f]iles " | |_[f]ind (fzf) " | " |_[g]it " | |_[d]iff (Fugitive) " | |_toggle [g]utter (GitGutter) " | |_[s]tatus (Fugitive) " | |_[p]ush to current branch (Fugitive) " | " |_[g]oyo " | |_toggle Go[y]o with 60% width (Goyo) " | |_toggle Go[Y]o (Goyo) " | " |_[h]elp " | |_[h]elp on subject " | |_re[g]enerate helptags (for plugins, ecc.) " | |_[q]uit help split (if any) " | " |_[s]earch " | |_disable search [h]ighlight " | |_[r]eplace word under cursor " | " |_[s]idebar " | |_open [f]ile explorer (netrw) " | |_open [t]agbar (tagbar) " | |_toggle [u]ndotree (undotree) " | " |_[s]yntax (toggle spell checking with ) " | |_set spell checking lang to [i]talian (it) " | |_set spell checking lang to [en]glish (en_gb) " | " |_[t]erminal (toggle terminal "scratchpad" with `) " (LOCAL)LEADER: noremap noremap \ let mapleader = "\" let maplocalleader = "\\" " BUFFER: nnoremap bb :ls:buffer if get(g:,'loaded_bbye',0) nnoremap bd :Bdelete nnoremap bD :ls:Bdelete else nnoremap bd :bdelete nnoremap bD :ls:bdelete endif nnoremap bp :buffer # " COMPILE: "nnoremap cc :make nnoremap cq :call dyamon#qf#toggle() if get(g:,'loaded_slime',0) " Custom vim-slime SendLine nmap cs ^v$h:SlimeSend1 * xmap cs SlimeRegionSend endif " FILES: if get(g:,'loaded_fzf',0) nnoremap ff :Files else nnoremap ff :find endif " GIT: if get(g:,'loaded_gitgutter',0) nnoremap gg :GitGutterToggle endif if get(g:,'loaded_fugitive',0) nnoremap gd :Gdiff nnoremap gl :botright vsplit \| Glog nnoremap gp :execute ":Gpush origin " . fugitive#head() nnoremap gs :Gstatus endif " GOYO: if exists(':Goyo') " We need to check for `:Goyo` because `g:loaded_goyo` does not exists. nnoremap gy :Goyo 60% nnoremap gY :Goyo endif " HELP: nnoremap hh :help nnoremap hg :silent! helptags ALL nnoremap hq :helpclose " SEARCH: noremap sh :silent! noh \| let @/="" "nnoremap sr :%s// " SIDEBAR: nnoremap sf :30Lexplore if exists(':Tagbar') " We need to check for `:Tagbar` because `g:loaded_tagbar` is set " only when the autoloaded code is invoked. nnoremap st :Tagbar endif if get(g:,'loaded_undotree',0) nnoremap su :UndotreeToggle endif " SPELL: nnoremap :call dyamon#spell#toggle() nnoremap si :set spelllang=it nnoremap se :set spelllang=en_gb " WRITE: nnoremap w :w " TERMINAL: nnoremap ` :call dyamon#terminal#toggle()