【问题标题】:How to truncate long file path in vim-powerline statusline?如何在 vim-powerline statusline 中截断长文件路径?
【发布时间】:2012-10-21 09:11:47
【问题描述】:

我想将我的文件路径截断为 ex:a/a/j/c/popularCategories.js

【问题讨论】:

    标签: vim vim-plugin statusline vim-powerline


    【解决方案1】:

    有两种选择。

    试试这个选项:

        let g:Powerline_stl_path_style = 'short'
    

    来自电力线文档:

    short      Display a short path. The home directory is substituted with
               "~", the first directory is displayed with its full name, and
               subsequent directories are shortened to their first letter.
               I.e. "/home/user/foo/bar/baz.vim" becomes "~/f/b/baz.vim" and
               "long/relative/path/foo/bar/baz.vim becomes
               "long/r/p/f/b/baz.vim".
    

    或者,如果您希望路径像 Vim 的默认状态行一样被截断,那么您可以创建一个主题为 moves the truncation point。试试我的sanity theme,看看它是否更适合你。

    【讨论】:

      【解决方案2】:

      目前没有办法做到这一点。我不知何故错过了这个选项。更改电力线截断路径的方式存在问题:issue 215,而不是像我以前认为的那样添加截断。

      【讨论】:

        猜你喜欢
        • 2014-01-20
        • 2017-04-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-09-20
        • 1970-01-01
        • 2020-04-29
        • 1970-01-01
        相关资源
        最近更新 更多