Note that there are some explanatory texts on larger screens.

plurals
  1. POCan Nerdtree handle symbolic link when sync path?
    primarykey
    data
    text
    <p>I am using <code>ctags</code> to generate tags and put <code>set tags+=~/.vim/tags/cpp</code>(just followed <a href="http://vim.wikia.com/wiki/C++_code_completion" rel="nofollow noreferrer">this wiki page</a>) in <code>.vimrc</code>.In my <code>vimrc</code> file there is also the setting like below so I can auto sync the nerdtree viewer for the current file(see <a href="https://superuser.com/questions/195022/vim-how-to-synchronize-nerdtree-with-current-opened-tab-file-path/474298#474298">this</a>):</p> <pre><code>" returns true iff is NERDTree open/active function! rc:isNTOpen() return exists("t:NERDTreeBufName") &amp;&amp; (bufwinnr(t:NERDTreeBufName) != -1) endfunction " returns true iff focused window is NERDTree window function! rc:isNTFocused() return -1 != match(expand('%'), 'NERD_Tree') endfunction " calls NERDTreeFind iff NERDTree is active, current window contains a modifiable file, and we're not in vimdiff function! rc:syncTree() if &amp;modifiable &amp;&amp; rc:isNTOpen() &amp;&amp; !rc:isNTFocused() &amp;&amp; strlen(expand('%')) &gt; 0 &amp;&amp; !&amp;diff NERDTreeFind wincmd p endif endfunction autocmd BufEnter * call rc:syncTree() </code></pre> <p>The problem lies in that <code>~/.vim</code> is actually a symbolic link to another folder(So I can manage all my dotfiles using git or other VCSs easily). When I use <kbd>Ctrl</kbd>+<kbd>]</kbd> to look for a definition(whose tag information is in <em>~/.vim/tags/cpp</em>), there would be always the error:</p> <pre><code>detected while processing function rc:syncTree..&lt;SNR&gt;15_findAndRevealPath..102: line 2: E605: Exception not caught: NERDTree.InvalidArgumentsError: /home/hongxuchen/.vim/tags/cpp_src/stl_iterator.h should be under /home/hongxuchen/data_backup/dotfiles/_vim/tags/cpp_src </code></pre> <p>Does it mean that I have to use <strong><code>set tags+=/real/path/to/cpp</code></strong> instead in <code>vimrc</code>?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload