" Collection of custom bindings. " Last Changed: 2021-05-18 " 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]omment " | |_[c]ompile " | |_toggle [q]uickfix window " | |_[s]end line (Slime) " | |_[S]end paragraph/region to REPL (Slime) " | |_comment [l]ine (commentary) " | " |_[f]iles " | |_[f]ind (fzf) " | " |_[g]it " | |_[d]iff (Fugitive) " | |_toggle [g]utter (GitGutter) " | |_[s]tatus (Fugitive) " | |_[p]ush to current branch (Fugitive) " | |_[w]rite (Fugitive) " | " |_[g]oyo " | |_toggle Go[y]o with 75% width (Goyo) " | |_toggle Go[Y]o (Goyo) " | " |_[h]elp " | |_[h]elp on subject " | |_[H]elp on word under cursor " | |_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 " | |_toggle [f]ile explorer (netrw) " | |_toggle [t]agbar (tagbar) " | |_toggle [u]ndotree (undotree) " | " |_[s]yntax " | |_set spell checking lang to [i]talian (it) " | |_set spell checking lang to [en]glish (en_gb) " | |_(toggle spell checking with ) " | " |_[w]rite file " (LOCAL)LEADER: noremap noremap \ let mapleader = "\" let maplocalleader = "\\" " BUFFER: nnoremap bb :ls:buffer if get(g:,'loaded_bbye',0) nnoremap bd :Bdelete else nnoremap bd :bdelete endif nnoremap bD :ls:bdelete 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 * nmap cS SlimeParagraphSend xmap cs SlimeRegionSend endif " COMMENT: if get(g:,'loaded_commentary',0) nmap cl gcc xmap cl gc 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 gs :Gstatus nnoremap gp :execute ":Gpush origin " . fugitive#head() nnoremap gw :Gwrite 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 hH :help nnoremap hg :silent! helptags ALL nnoremap hq :helpclose " SEARCH: nnoremap sh :silent! noh \| let @/="" nnoremap sr :%s// " SIDEBAR: nnoremap sf :20Lexplore 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