Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions to alter operators unclear #34

Closed
slamDuncan52 opened this issue Jun 16, 2015 · 5 comments
Closed

Actions to alter operators unclear #34

slamDuncan52 opened this issue Jun 16, 2015 · 5 comments

Comments

@slamDuncan52
Copy link

Perhaps its my unfamiliarity with vimscript, but I'm attempting to add colons (":") to the list of operators, which by default only contains commas (","). The other options, ctermfgs, parentheses etc. are all arrayed, and easy to extend. However, any attempts I make at adding colons to a list of operators have failed. The :help :syn-pattern has not been of great assistance to me. Thanks for any advice you have.

@slamDuncan52
Copy link
Author

UPDATE: I fixed this one, just had to escape the alternator in the match sequence (a la "operators: ',|:',") Might want to mention this in documentation somewhere though, or link to http://vimregex.com/ over the syn-pattern documentation though, didn't help me much. Thanks for a great plugin regardless!

@SiddharthPant
Copy link

I am still not able to understand. I want to add +, *, / etc. to the list but any change just throws out a million errors. Can someone just plain write the operators line for me. Further explanation in newbie terms will be good.(FYI: I don't know regex or vimscript)

@SiddharthPant
Copy link

Finally found a solution in issues raised previously( Issue #3 ). I used this as my operators line.
'operators': '_,\|=\|+\|\*\|-\|\.\|;\||\|&\|?\|:\|<\|>\|%\|/[^/]_',
@slamDuncan52 in your update example you skipped the underscores. Basically whatever we write has to be within '_ and _' and like you said should be properly escaped with a \|
@luochen1990 Please instead of pointing to syn-pattern in help directly provide an example line in the documentation. But thanks, I made it sure to vote your plugin as Life Changing in vim.org/scripts

@luochen1990
Copy link
Owner

@SiddharthPant I'd like to provide a better document, but the reg-exp & syn-pattern syntax of vimscript is not easy to explain in a words, so I think the vim help doc chould explain these much better than I chould. And thx for your voting :)

@luochen1990
Copy link
Owner

The README is updated. I hope this can help more people to use this plugin without resistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants