dotfiles

Cross platform dotfiles for linux, mac and windows
git clone git@getsh.org:dotfiles.git
Log | Files | Refs

commit d081e9a9537cdad588d19dc4ed597082cf91761c
parent 196100ea661784d3147367d85ccb8a0dd1065207
Author: Bharatvaj <bharatvaj@yahoo.com>
Date:   Fri, 24 Feb 2023 13:41:55 +0530

FZF keybinding added

Replaces CommandT

Diffstat:
M.config/nvim/lua/keybindings.lua | 15+++++++++------
M.config/vim/keybindings.vim | 9+++++++--
2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/.config/nvim/lua/keybindings.lua b/.config/nvim/lua/keybindings.lua @@ -56,20 +56,21 @@ function file_mv_helper() end -- general +map("n", "<leader>H", ":Lex<cr>") map("n", "<leader>aa", ":argadd **<cr>") -map("n", "<leader>co", ":copen<cr>") map("n", "<leader>cd", ":cdo<space>s/") +map("n", "<leader>co", ":copen<cr>") map("n", "<leader>ec", ":edit $XDG_CONFIG_HOME/nvim/init.lua<cr>") map("n", "<leader>ek", ":edit $XDG_CONFIG_HOME/nvim/lua/keybindings.lua<cr>") map("n", "<leader>et", ":set expandtab<cr>") map("n", "<leader>lb", ":ls<CR>:b<space>") -map("n", "<leader>lo", ":lopen<cr>") map("n", "<leader>ld", ":ldo<space>s/") +map("n", "<leader>lo", ":lopen<cr>") map("n", "<leader>p", ":Rg<cr>") map("n", "<leader>sc", ":source $XDG_CONFIG_HOME/nvim/init.lua<cr>") map("n", "<leader>so", ":source %<cr>") -map("n", "<leader>spp", ":set paste<cr>") map("n", "<leader>spa", ":set path+=**<cr>") +map("n", "<leader>spp", ":set paste<cr>") map("n", "<leader>tl", ":lua toggle_list(true)<CR>") map("n", "<leader>tt", ":tabnew<cr>") map("n", "<leader>vg", ":vimgrep<space>") @@ -109,6 +110,7 @@ map("n", "<leader>dcb", ":lua require'dap'.ToggleConditionalBreakpoint()") -- map("n", "<leader>dtcb", ":call vimspector#CleanLineBreakpoint()<CR>") map("n", "<leader>bb", ":lua save_and_build()<CR>") +map("n", "<leader>be", ":AbortDispatch<CR>") map("n", "<leader>bc", ":Make clean<CR>") @@ -116,10 +118,11 @@ map("n", "<leader>bc", ":Make clean<CR>") map("n", "<leader>oc", ":grepadd /:: %") map("n", "<leader>oh", ":grepadd /:: %") -vim.keymap.set('n', '\\f', ":CommandTGit<cr>") -vim.keymap.set('n', '\\F', ":CommandTFind<cr>") +vim.keymap.set('n', '\\a', ":A<cr>") +vim.keymap.set('n', '\\f', ":GFiles<cr>") +vim.keymap.set('n', '\\F', ":Files<cr>") vim.keymap.set('n', '\\g', ":CommandTGit<cr>") -vim.keymap.set('n', '\\b', ":CommandTBuffer<cr>") +map("n", "\\b", ":lua save_and_build()<CR>") -- quick navigation diff --git a/.config/vim/keybindings.vim b/.config/vim/keybindings.vim @@ -5,8 +5,8 @@ nnoremap <leader>cs :cdo<space>s/ nnoremap <leader>ec :edit $XDG_CONFIG_HOME/vim/vimrc<cr> nnoremap <leader>ek :edit $XDG_CONFIG_HOME/vim/keybindings.vim<cr> nnoremap <leader>et :set expandtab<cr> -nnoremap <leader>fa :find * -nnoremap <leader>ff :b * +nnoremap <leader>ff :find * +nnoremap <leader>fb :buffer * nnoremap <leader>lb :ls<cr>:b<space> nnoremap <leader>lo :lopen<cr> nnoremap <leader>ls :ldo<space>s/ @@ -45,6 +45,7 @@ nnoremap <leader>tl :call ToggleList()<CR> " development nnoremap <leader>bb :call SaveAndBuild()<CR> +nnoremap <leader>be :AbortDispatch<CR> nnoremap <leader>bc :Make clean<CR> nnoremap <leader>fmv :call FileMvHelper()<CR> @@ -97,6 +98,10 @@ fun! GotoWindow(id) call win_gotoid(a:id) endfun +" Navigation maps +nnoremap \f :GFiles<CR> +nnoremap \F :Files<CR> + " Debugger remaps nnoremap <leader>dd :call vimspector#Launch()<CR> nnoremap <leader>dc :call GotoWindow(g:vimspector_session_windows.code)<CR>