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
" Iterate over potential directories and search for the file
46
60
fordirinl:resolveDirs
47
-
letl:possiblePath=l:packageDir . "/" . dir . "/" . a:fname
48
-
49
-
echol:possiblePath
61
+
letl:possiblePath=l:packageDir . "/" . dir . "/" . l:cfile
50
62
51
63
for filename ing:vim_npr_file_names
52
64
iffilereadable(possiblePath . filename)
53
-
return possiblePath . filename
65
+
returns:edit_file(possiblePath . filename, a:cmd)
54
66
endif
55
67
endfor
56
68
endfor
57
69
58
-
echo"VimNPR failed to find file specified."
59
-
returna:fname
70
+
" Nothing found, print resolution error
71
+
returns:print_error("(Error) VimNPR: Failed to sensibly resolve file in path. If you believe this to be an error, please log an error at github.com/tomarrell/vim-npr.")
72
+
endfunction
73
+
74
+
function!s:edit_file(path, cmd)
75
+
exe"edit" . a:cmd . "" . a:path
76
+
endfunction
77
+
78
+
function!s:print_error(error)
79
+
echohlErrorMsg
80
+
echomsga:error
81
+
echohlNONE
82
+
letv:errmsg=a:msg
60
83
endfunction
61
84
62
85
" Unmap any user mapped gf functionalities. This is to restore gf
0 commit comments