[vim ] 如何在external command中使用alias

看板Editor作者 (奔跑的蝸牛)時間14年前 (2010/10/25 13:19), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/1
在vim中使用:![external command]可執行shell command 但.bashrc裡的alias都不起作用 請問有人知道該怎麼弄嗎?? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.30.32

10/27 01:20, , 1F
先 source .bashrc
10/27 01:20, 1F
從vim shell中:!source .bashrc嗎? 剛試了一下 alias還是沒有作用

11/03 22:44, , 2F
請問你所謂的 alias 起作用是要作用在?
11/03 22:44, 2F
舉個例子: alias rm='rm -i' 則我希望在Vim中輸入:!rm some_file時 會有警告訊息出來(問我是不是真的要刪掉檔案) 而非直接把檔案刪掉 ※ 編輯: Holocaust123 來自: 140.112.30.32 (11/06 07:52)
文章代碼(AID): #1CnHDu37 (Editor)