You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 29, 2023. It is now read-only.
I set my own g:workspace_session_directory in _vimrc , when vim-workspace creates a new session, it fail to create the session storage folder whose name contains opened project path. I looked into code of vim-workspace and figured out this problem is caused by not replacing character : and \ properly in Windows-style path. I modified the function GetSessionDirectoryPath() in plugin/workspace.vim and it's worked.
Modified GetSessionDirectoryPath():
function! s:GetSessionDirectoryPath()
if !isdirectory(g:workspace_session_directory)
call mkdir(g:workspace_session_directory)
endif
let l:cwd = getcwd()
if has('win32')
let l:fileName = substitute(l:cwd, '\', '%', 'g')
let l:fileName = substitute(l:fileName, ':', '%', 'g')
else
let l:fileName = substitute(l:cwd, '/', '%', 'g')
endif
let l:fullPath = g:workspace_session_directory . l:fileName
return l:fullPath
endfunction
The text was updated successfully, but these errors were encountered:
iiifr
changed the title
Fail to create session storage directory on MS Windows
Fail to create session storage directory on MS Windows (bugfix provided)
Aug 31, 2019
hutterm
added a commit
to hutterm/vim-workspace
that referenced
this issue
Jun 14, 2020
I set my own g:workspace_session_directory in _vimrc , when vim-workspace creates a new session, it fail to create the session storage folder whose name contains opened project path. I looked into code of vim-workspace and figured out this problem is caused by not replacing character
:
and\
properly in Windows-style path. I modified the functionGetSessionDirectoryPath()
inplugin/workspace.vim
and it's worked.Modified
GetSessionDirectoryPath()
:The text was updated successfully, but these errors were encountered: