update
This commit is contained in:
parent
431fa6a4e0
commit
27ae4b7f96
2 changed files with 16 additions and 0 deletions
1
init.lua
1
init.lua
|
|
@ -475,6 +475,7 @@ map('n', '<A-n>', '<Cmd>BufferMovePrevious<CR>', opts)
|
|||
map('n', '<A-m>', '<Cmd>BufferMoveNext<CR>', opts)
|
||||
map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
|
||||
map('n', '<A-p>', '<Cmd>BufferPick<CR>', opts)
|
||||
map('t', '<Esc>', '<C-\\><C-n>', opts)
|
||||
|
||||
vim.keymap.set('n', '<leader>fg', '<cmd>lua require("spectre").toggle()<CR>', {
|
||||
desc = "Toggle Spectre"
|
||||
|
|
|
|||
15
nvr_git
Normal file
15
nvr_git
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
nvr_git () {
|
||||
local main_module_repo_path=$(git rev-parse --show-superproject-working-tree 2>/dev/null)
|
||||
local repo_path=$(git rev-parse --show-toplevel 2>/dev/null)
|
||||
if [[ -z "$main_module_repo_path" ]]; then
|
||||
main_module_repo_path=$repo_path
|
||||
fi
|
||||
|
||||
if [ -n "$main_module_repo_path" ]; then
|
||||
local servername=/tmp/nvr$(echo $main_module_repo_path | tr "/" "_")
|
||||
nvr -s --servername $servername "$@"
|
||||
else
|
||||
/usr/bin/nvim "$@"
|
||||
fi
|
||||
}
|
||||
nvr_git()
|
||||
Loading…
Reference in a new issue