【发布时间】:2012-10-21 09:11:47
【问题描述】:
我想将我的文件路径截断为 ex:a/a/j/c/popularCategories.js。
【问题讨论】:
标签: vim vim-plugin statusline vim-powerline
我想将我的文件路径截断为 ex:a/a/j/c/popularCategories.js。
【问题讨论】:
标签: vim vim-plugin statusline vim-powerline
有两种选择。
试试这个选项:
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,看看它是否更适合你。
【讨论】:
目前没有办法做到这一点。我不知何故错过了这个选项。更改电力线截断路径的方式存在问题:issue 215,而不是像我以前认为的那样添加截断。
【讨论】: