promptline.vim icon indicating copy to clipboard operation
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)

Open bryanbecker opened this issue 10 years ago • 1 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() ],

bryanbecker avatar Jul 27 '15 11:07 bryanbecker

Cool thnx :+1:

matthisk avatar Oct 29 '15 20:10 matthisk