feat(zsh): Add quick commands for vim
This commit is contained in:
parent
8b05631645
commit
90d4dc5ba5
@ -185,7 +185,6 @@ require("bufferline").setup({
|
|||||||
color_icons = true,
|
color_icons = true,
|
||||||
show_close_icon = false,
|
show_close_icon = false,
|
||||||
show_buffer_close_icons = false,
|
show_buffer_close_icons = false,
|
||||||
show_buffer_default_icon = false,
|
|
||||||
show_duplicate_prefix = false,
|
show_duplicate_prefix = false,
|
||||||
hover = {
|
hover = {
|
||||||
enabled = false
|
enabled = false
|
||||||
@ -222,3 +221,4 @@ require("telescope-config")
|
|||||||
require("telescope-mappings")
|
require("telescope-mappings")
|
||||||
|
|
||||||
require("keybindings")
|
require("keybindings")
|
||||||
|
require("custom-args")
|
||||||
|
15
.config/nvim/lua/custom-args.lua
Normal file
15
.config/nvim/lua/custom-args.lua
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
vim.api.nvim_create_autocmd("VimEnter", {
|
||||||
|
callback = function()
|
||||||
|
if vim.fn.argv(0) == 'p' then
|
||||||
|
require("telescope-config").project_files()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("VimEnter", {
|
||||||
|
callback = function()
|
||||||
|
if vim.fn.argv(0) == 'f' then
|
||||||
|
require("telescope.builtin").live_grep()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
6
.zshrc
6
.zshrc
@ -95,6 +95,12 @@ bindkey "^?" backward-delete-char
|
|||||||
# Enable backward incremental search
|
# Enable backward incremental search
|
||||||
bindkey '^R' history-incremental-search-backward
|
bindkey '^R' history-incremental-search-backward
|
||||||
|
|
||||||
|
# Open Vim in file selection on ctrl+p
|
||||||
|
bindkey -s '^P' 'vim p^M'
|
||||||
|
|
||||||
|
# Open Vim in string research on ctrl+f
|
||||||
|
bindkey -s '^f' 'vim f^M'
|
||||||
|
|
||||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user