02-12-2014 09:28 AM
I'm using PlanAhead and I would like to open source files with an external editor like vim/gvim. I selected the external editor in PlanAhead Options->General->Text Editor, however when I double click a source file from inside PlanAhead my external editor opens and complains with an error that mentions an invalid path for the file. For example:
Can't find directory ""/home/myuser/projectpath/sourcedirectory/" in cdpath
The source file path given by planAhead is clearly not correct (double "" at the start) and confuses my text editor.
This happens with all selectable external text editors so it's not a vim/gvim issue.
This is not a configuration issue (e.g wrong path etc) because it doesn't happen in Vivado which uses the same gui platform/options etc. When selecting an external text editor in Vivado options, all source files open without problems.
Thanks in advance for any help or hints you might have on how to fix this bug in PlanAhead.
12-27-2014 12:21 AM
I was wondering if you found any resolution to this problem? I'm having the same issue with Emacs. PlanAhead tells Emacs to load the following file which it obviously can't find: ~/code/parallella/synch_im/"/home/srh112/code/para
05-28-2015 11:52 PM
I had the same problem. I am using PlanAhead 14.7 on Arch Linux 64-bit. I found that PlanAhead adds literal quotes to the beginning and end of file names before passing them to the editor. I came up with the following solution:
I created a script called rem_quotes.sh with the following contents:
#!/bin/sh COMMAND=$1 FILE=$(echo $2 | sed 's/^"\(.*\)"$/\1/') shift shift $COMMAND "$FILE" "$@"
I put this in my $PATH and made it executable. It takes as arguments a command (editor) name, a PlanAhead-formatted file name, and any number of additional arguments. It removes the escaped quotes from beginning and end of the file name. Then it executes the command with the fixed file name as first argument and the remaining command line as second argument.
I put the following line in the Custom Editor field in PlanAhead:
rem_quotes.sh gvim [file name] +[line number]
This worked for me, and should also be possible with other editors.