diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 5893d8f..1daedb3 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -185,7 +185,6 @@ require("bufferline").setup({ color_icons = true, show_close_icon = false, show_buffer_close_icons = false, - show_buffer_default_icon = false, show_duplicate_prefix = false, hover = { enabled = false @@ -222,3 +221,4 @@ require("telescope-config") require("telescope-mappings") require("keybindings") +require("custom-args") diff --git a/.config/nvim/lua/custom-args.lua b/.config/nvim/lua/custom-args.lua new file mode 100644 index 0000000..220b846 --- /dev/null +++ b/.config/nvim/lua/custom-args.lua @@ -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, +}) diff --git a/.zshrc b/.zshrc index a7c5dee..1a8c9c5 100644 --- a/.zshrc +++ b/.zshrc @@ -95,6 +95,12 @@ bindkey "^?" backward-delete-char # Enable backward incremental search 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. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh