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

| in JS or PHP #38

Closed
wouterj opened this issue Oct 25, 2011 · 1 comment
Closed

| in JS or PHP #38

wouterj opened this issue Oct 25, 2011 · 1 comment

Comments

@wouterj
Copy link

wouterj commented Oct 25, 2011

I added some nice HTML snippets to the file, but I've a problem. The | in a snippet is used to be replaced with the cursor, but if you use || (or) in JS(or something else) it will be seen as the | for the cursor.

Not only in JS, but if you use conditional comments and you are doing something like this:

The | is also used to replace for the cursor.

I've tried to escape the character |, but that don't work.

@mattn
Copy link
Owner

mattn commented Nov 24, 2011

fixed in latest.
added new option use_pipe_for_cursor (default value is 1).
If you want to use | in snippets, please set like following.

let g:user_zen_settings = {
\  'javascript' : {
\    'snippets' : {
\      'validate' : "if (!validate1() || !validate2()) alert(1)",
\    },
\    'use_pipe_for_cursor' : 0,
\  },
\}

@mattn mattn closed this as completed Nov 24, 2011
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

2 participants