Vim not recognizing aliases when in interactive mode?

前端 未结 4 1368
Happy的楠姐
Happy的楠姐 2020-12-09 09:33

Same question as this, however the solution there didn\'t work.

I set these variables in my ~/.vimrc:

set shellcmdflag=-ic
set shell=/bin/bash\\ -i
<         


        
4条回答
  •  南方客
    南方客 (楼主)
    2020-12-09 09:49

    I have this in my ~/.vimrc:

    set shell=bash\ -i
    

    All the custom functions:

    mkcd () {
      mkdir -p "$*"
      cd "$*"
    }
    

    and aliases:

    alias lsvn='svn list -vR'
    

    work when used from Vim.

    But I don't use ~/.bash_aliases, I've added them directly to my ~/.bashrc.

    Do you source ~/.bash_aliases from ~/.bashrc?

提交回复
热议问题