diff --git a/vim/keybindings.vim b/vim/keybindings.vim new file mode 100644 index 0000000..605688b --- /dev/null +++ b/vim/keybindings.vim @@ -0,0 +1,84 @@ +" KEYBINDINGS +" imap +nmap :set paste!set paste? +nmap :! +" nmap :NERDTreeToggle +nmap :NvimTreeToggle +" nnoremap :wa:vertical botright term ++kill=term +nmap Q !!$SHELL + +" reselect visual selection after indent +vnoremap < >gv + +" open file under cursor, create if necessary +nnoremap gF :edit + +" fzf +nnoremap // :CocCommand fzf-preview.Lines +nnoremap ?? :CocCommand fzf-preview.BufferLines + +" aniwrapper/ani-cli (until i find better use for a keys) +nmap as :FloatermNew --title=aniwrapper aniwrapper -qtdoomone -D144 +nmap ad :FloatermNew --title=aniwrapper ani-cli -q720p -cd/home/sudacode/Videos/sauce -D144 +" buffers +nmap bB :CocCommand fzf-preview.AllBuffers +nmap bb :CocCommand fzf-preview.Buffers +nmap bk :bdelete +nmap bn :bnext +nmap bp :bprev +nmap :bnext +nmap :bprev +" git +nmap gc :CocCommand fzf-preview.GitLogs +nmap gf :CocCommand fzf-preview.GitFiles +if has('nvim') + nmap gg :Neogit +else + nmap gg :FloatermNew --title=lazygit --opener=vsplit --width=1.0 --height=1.0 lazygit +endif +nmap gs :CocCommand fzf-preview.GitStatus +nmap gr :CocCommand fzf-preview.CocReferences +" help/history +nmap hc :CocCommand fzf-preview.CommandPalette +nmap hk :Maps +" insert snippets +nmap isp :-1read $HOME/Templates/python.py4jw +" any jump plugin +nmap j :AnyJump +nmap n :NvimTreeToggle +" toggle/open +nmap ob :FloatermNew --title=bpytop --opener=vsplit bpytop +nmap od :FloatermNew --title=lazydocker --opener=vsplit lazydocker +nmap on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp +nmap oo :OverCommandLine +nmap or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD" +" nmap ot :vertical botright ter ++kill=terminal ++close +nmap ot :FloatermNew --title=floaterm --name=vsplit-term --wintype=vsplit --position=botright --width=0.5 +" refresh nvimtree for now +nmap r :NvimTreeRefresh +" search +nmap sc :nohls +nmap sf :Files +nmap sF :AllFiles +" toggle coc outline +nmap to :CocOutline +" terminal +nmap tt :FloatermToggle vsplit-term +nmap :wa:FloatermToggle floatingterm +" for toggling/hiding the vsplit-term +tnoremap tt :FloatermToggle vsplit-term +tnoremap :FloatermToggle floatingterm +tnoremap + + +nmap ss :SessionSave +nmap sl :SessionLoad +nnoremap fh :DashboardFindHistory +" search fzf, refs, impls, defs +nmap ff :CocCommand fzf-preview.ProjectFiles +" nnoremap ff :DashboardFindFile +nnoremap tc :DashboardChangeColorscheme +nnoremap fa :DashboardFindWord +nnoremap fb :DashboardJumpMark +nnoremap cn :DashboardNewFile