From 86003be1abf041ee66f8c6a6350711a0e2f9d08d Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 27 May 2020 23:24:26 +0300 Subject: [PATCH] Do not hardcode /tmp --- plugin/codecomm.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.44.0