From: Sergey Matveev Date: Wed, 27 May 2020 20:24:26 +0000 (+0300) Subject: Do not hardcode /tmp X-Git-Url: http://www.git.stargrave.org/?p=codecomm.git;a=commitdiff_plain;h=86003be1abf041ee66f8c6a6350711a0e2f9d08d Do not hardcode /tmp --- diff --git a/plugin/codecomm.vim b/plugin/codecomm.vim index a2fde10..2f10885 100644 --- a/plugin/codecomm.vim +++ b/plugin/codecomm.vim @@ -6,7 +6,9 @@ if exists("g:loaded_codecomm") | finish | endif let g:loaded_codecomm = 1 if !exists("g:codecomm_file") - let g:codecomm_file = "/tmp/codecomm.txt" + let tmpdir = getenv("TMPDIR") + if tmpdir == v:null | let tmpdir = "/tmp" | endif + let g:codecomm_file = tmpdir . "/" . "codecomm.txt" endif if !exists("g:codecomm_count") | let g:codecomm_count = 0 | endif