How to reference/source a custom .vimrc file

后端 未结 9 1269
生来不讨喜
生来不讨喜 2020-12-08 04:24

Is there a way to reference (or \"source\") another user\'s .vimrc file?

When I kuu (a variant of su that uses kerberos security tokens) to

相关标签:
9条回答
  • 2020-12-08 05:18

    Try -u parameter and specify a path to an alternative configuration file.

    For example: vim -u /home/jesse/myvimrc

    See http://linuxcommand.org/lc3_man_pages/vim1.html

    0 讨论(0)
  • 2020-12-08 05:19

    Use an alternate .vimrc file without plugins as mentioned, and add an alias in .bash_profile or something.

    alias svim='vim -u ~/.vimrc_simple'
    

    Really I prefer the following:

    alias vvim='vim -u ~/.vimrc_vundle'
    

    In order to keep vim as a lightweight command, as plugin loading seems to slow down program instantiation.

    0 讨论(0)
  • 2020-12-08 05:19

    Personally, I just symlink Root's .vimrc's to mine. From BASH (as root):

    ln -s /home/<me>/.vimrc /root/.vimrc

    But you do need to be careful about what's in it.

    0 讨论(0)
提交回复
热议问题