Hi,
Pablo Giménez wrote: > Hi, I continue with my newbies question about vim scripting :) > I have a function like: > function! EditMyFile (path) > let filePath = a:path . "myFile" > sp filePath > endfunction > > Well the sp statement always tries to open a file called filePath > instead of evaluating the variable and use it values. > I have also tried with l:filePath and got the same result. > Any ideas??? yes, use execute "sp " . filePath instead. The sp statement is the :split command you normally would enter on the command line, and this command -- like many other commands -- expects its argument to be a file name, not an expression. Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin) --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
