promptline.vim
promptline.vim copied to clipboard
I'm not sure how to contribute, but I made a small slice that displays a lock if $PWD has no write access (in comments)
Maybe you can add this as a slice? Otherwise, just leaving it here for others:
the -w flag here just tests for write access, for those not familiar
'$(if [ ! -w $PWD ] ; then printf "%s" "" ; fi)'
(sorry, also not sure how to paste the unicode lock character into github... I just copied the character from powerline into my .vimrc)
you can use this line in the warn prompt, like:
\'warn' : [ '$(if [ ! -w $PWD ] ; then printf "%s" "(lock)" ; fi)', promptline#slices#last_exit_code() ],
Cool thnx :+1: