@@ -143,6 +143,8 @@ function! s:Prepare()
143143 \' pull' : ' u ',
144144 \' push' : ' p ',
145145 \' pull_and_push' : ' P ',
146+ \' shelf' : ' s ',
147+ \' unshelf' : ' b ',
146148 \}
147149 let s: default .file_open_types = {
148150 \' ' : ' edit ',
@@ -526,7 +528,7 @@ endfunction
526528
527529function ! s: InitProjectConfig (project)
528530 let name = a: project .name
529- let config = s: GetProjectConfigPath (s: config_home , a: project )
531+ let config = project# GetProjectConfigPath (s: config_home , a: project )
530532
531533 if ! isdirectory (config) && exists (' *mkdir' )
532534 " Create project-specific config files
@@ -638,7 +640,7 @@ function! s:DebugWarn(msg)
638640 endif
639641endfunction
640642
641- function ! s: GetProjectConfigPath (config_home, project)
643+ function ! project# GetProjectConfigPath (config_home, project)
642644 let id = a: project .path
643645 let id = project#ReplaceHomeWithTide (id)
644646 let id = substitute (id, ' [/:]' , ' _' , ' g' )
@@ -1892,16 +1894,16 @@ function! s:RenameProject(project, new_name)
18921894 call rename (a: project .fullpath, new_fullpath)
18931895 call s: RenamePathInProjectAddConfig (a: project .fullpath, project#ReplaceHomeWithTide (new_fullpath))
18941896
1895- let config_path = s: GetProjectConfigPath (s: config_home , a: project )
1897+ let config_path = project# GetProjectConfigPath (s: config_home , a: project )
18961898 let a: project .name = a: new_name
1897- let new_config_path = s: GetProjectConfigPath (s: config_home , a: project )
1899+ let new_config_path = project# GetProjectConfigPath (s: config_home , a: project )
18981900 call rename (config_path, new_config_path)
18991901endfunction
19001902
19011903function ! s: SetEnvVariables ()
19021904 let $vim_project = s: project .fullpath
19031905 let $vim_project_config =
1904- \s : GetProjectConfigPath (s: config_home , s: project )
1906+ \p roject# GetProjectConfigPath (s: config_home , s: project )
19051907endfunction
19061908
19071909function ! s: UnsetEnvVariables ()
@@ -1928,7 +1930,7 @@ endfunction
19281930
19291931function ! project#OpenProjectConfig ()
19301932 if project#ProjectExist ()
1931- let config = s: GetProjectConfigPath (s: config_home , s: project )
1933+ let config = project# GetProjectConfigPath (s: config_home , s: project )
19321934 execute ' tabedit ' .config.' /' .s: init_file
19331935 else
19341936 call project#Warn (' Open a project first' )
@@ -2164,7 +2166,7 @@ endfunction
21642166
21652167function ! s: SourceFile (file )
21662168 let name = s: project .name.' -' .s: project .path
2167- let config = s: GetProjectConfigPath (s: config_home , s: project )
2169+ let config = project# GetProjectConfigPath (s: config_home , s: project )
21682170 let file = config.' /' .a: file
21692171 if filereadable (file )
21702172 call s: Debug (' Source file: ' .file )
@@ -2198,12 +2200,12 @@ function! s:FindBranch()
21982200endfunction
21992201
22002202function ! s: GetSessionFolder ()
2201- let config = s: GetProjectConfigPath (s: config_home , s: project )
2203+ let config = project# GetProjectConfigPath (s: config_home , s: project )
22022204 return config.' /sessions'
22032205endfunction
22042206
22052207function ! s: GetSessionFile ()
2206- let config = s: GetProjectConfigPath (s: config_home , s: project )
2208+ let config = project# GetProjectConfigPath (s: config_home , s: project )
22072209 return config.' /sessions/' .s: branch .' .vim'
22082210endfunction
22092211
@@ -2243,7 +2245,7 @@ function! s:SaveViminfo()
22432245endfunction
22442246
22452247function ! s: GetViminfoFile ()
2246- let config = s: GetProjectConfigPath (s: config_home , s: project )
2248+ let config = project# GetProjectConfigPath (s: config_home , s: project )
22472249 if has (' nvim' )
22482250 return config.' /viminfo/main.shada'
22492251 else
@@ -2252,7 +2254,7 @@ function! s:GetViminfoFile()
22522254endfunction
22532255
22542256function ! s: GetViminfoFolder ()
2255- let config = s: GetProjectConfigPath (s: config_home , s: project )
2257+ let config = project# GetProjectConfigPath (s: config_home , s: project )
22562258 return config.' /viminfo'
22572259endfunction
22582260
@@ -2323,10 +2325,10 @@ function! s:SaveSession()
23232325 if project#ProjectExist ()
23242326 call s: BeforeSaveSession ()
23252327
2326- let folder = s: GetSessionFolder ()
2327- if ! isdirectory (folder) && exists (' *mkdir' )
2328- call mkdir (folder, ' p' )
2329- endif
2328+ let folder = s: GetSessionFolder ()
2329+ if ! isdirectory (folder) && exists (' *mkdir' )
2330+ call mkdir (folder, ' p' )
2331+ endif
23302332
23312333 let file = s: GetSessionFile ()
23322334 call s: Debug (' Save session to: ' .file )
0 commit comments