vim - Error characters in vimrc function -


i'm trying run function in vimrc insert dependencies in php class.
script must enter parameter type hinting in construct of class , assign result of parameter attribute of local class.
i'm using linux , found in posts these types of characters in function not used linux. mac.

the function:

function! adddependency()     let dependency = input('var name: ')     let namespace = input('class path: ')      let segments = split(namespace, '\')     let typehint = segments[-1]      exec 'normal gg/construct^m:h^mf)i, ' . typehint . ' $' . dependency . '^[/}^>o$this->^[a' . dependency . ' = $' . dependency . ';^[?{^mkoprotected $' . dependency . ';^m^[?{^mouse ' . namespace . ';^m^['      " remove opening comma if there 1 dependency     exec 'normal :%s/(, /(/g'  endfunction 

and when try run function get:

error detected while processing function adddependency: line   10: e115: missing quote: 'normal :%s/(, /(/g e15: invalid expression: 'normal :%s/(, /(/g press enter or type command continue 

what special chars?
how can fixed , there reference learn chars?

thanks advance..

let segments = split(namespace, '\') 

looks me if missing character after backslash.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -