JohnBeckett (talk | contribs) (standard format) |
|||
Line 1: | Line 1: | ||
+ | {{ScriptComments|213|cvim: C/C++ IDE to write and run programs, insert statements, idioms, comments etc}} |
||
− | Hi, I encountered the error message |
||
− | == |
+ | ==Bug: template not readable== |
+ | I encountered the error message "Global template file '.s:C_GlobalTemplateFile.' not readable." when starting Vim with the cvim plugin. |
||
+ | The problem is that the cvim.vim script checks whether the filename it was started with and the home directory match. My home directory happens to be a link which is not fully expanded by <tt>expand()</tt>. |
||
− | when starting vim with the cvim plugin. |
||
⚫ | |||
− | The problem is that the cvim.vim script checks whether the filename it was |
||
+ | <pre> |
||
− | started with and the home directory match. My home directory happens to be |
||
⚫ | |||
− | a link which is not fully expanded by expand(). |
||
+ | </pre> |
||
⚫ | |||
− | |||
⚫ | |||
with |
with |
||
+ | <pre> |
||
− | + | resolve(expand("<sfile>")) |
|
− | |||
+ | </pre> |
||
⚫ | |||
⚫ | |||
+ | <pre> |
||
line 88: |
line 88: |
||
− | |||
if match( expand("<sfile>"), expand("$HOME") ) == 0 |
if match( expand("<sfile>"), expand("$HOME") ) == 0 |
||
− | |||
would become |
would become |
||
⚫ | |||
+ | </pre> |
||
+ | ==Comments== |
||
⚫ |
Revision as of 01:18, 25 June 2011
Use this page to discuss script 213 213
- Add constructive comments, bug reports, or discuss improvements (see the guideline).
- Do not document the script here (the author should do that on vim.org).
- This page may be out of date: check the script's vim.org page above, and its release notes.
Bug: template not readable
I encountered the error message "Global template file '.s:C_GlobalTemplateFile.' not readable." when starting Vim with the cvim plugin.
The problem is that the cvim.vim script checks whether the filename it was started with and the home directory match. My home directory happens to be a link which is not fully expanded by expand().
I suggest to replace the occurrences of
expand("<sfile>")
with
resolve(expand("<sfile>"))
and likewise for expand("$HOME")
line 88: if match( expand("<sfile>"), expand("$HOME") ) == 0 would become if match( resolve(expand("<sfile>")), resolve(expand("$HOME"))) == 0