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

Dos line endings causes Refactor plugin to fail #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Dos line endings causes Refactor plugin to fail #1

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 15, 2013

Hello!

Dos line endings causes the following nasty error on Vim startup:

% gvim .
% Error detected while processing /Users/user/.dotfiles/vim/bundle/refactor/plugin/refactor.vim:
line   45:
E492: Not an editor command: ^M
line   53:
E492: Not an editor command: ^M
line   55:
E15: Invalid expression: ["auto", "const", "double", "float", "int", "short", "struct", "unsigned", "break", "continue", "else", "for", "long", "signed", "switch", "void", "case", "default", "enum", "goto", "register", "sizeof", "typedef", "volatile", "char", "do", "extern", "if", "return", "static", "union", "while", "asm", "dynamic_cast", "namespace", "reinterpret_cast", "try", "bool", "explicit", "new", "static_cast", "typeid", "catch", "false", "operator", "template", "typename", "class", "friend", "private", "this", "using", "const_cast", "inline", "public", "throw", "virtual", "delete", "mutable", "protected", "true", "wchar_t", "size_t"]^M
line   56:
E492: Not an editor command: ^M
line   58:
E15: Invalid expression: '\<\h\w*\>'^M
line   59:
E15: Invalid expression: '\s*[*&]*\s*'^M
line   60:
E121: Undefined variable: s:IdentifierPattern
E15: Invalid expression: s:IdentifierPattern . s:TypePostfixPattern^M
line   62:
E121: Undefined variable: s:TypeElementPattern
E15: Invalid expression: '\%(' . s:TypeElementPattern . '\%(' . s:TemplateParameterPattern . s:TypePostfixPattern . '\)*' . s:TypePostfixPattern . '\)\+'^M
line   64:
E15: Invalid expression: '\%(\s\+\n*\s*\|\n\+\|\s*\n*\s\+\)'^M
line   65:
E121: Undefined variable: s:TypeIdentifierPattern
E15: Invalid expression: s:TypeIdentifierPattern . s:MissableSeperatorPattern . s:IdentifierPattern . '\%\(\[\d*\]\)*'^M
line   66:
E121: Undefined variable: s:TypeIdentifierPattern
E15: Invalid expression: '^\s*\%(' . s:TypeIdentifierPattern . s:SeperatorPattern. '\|' . s:IdentifierPattern . '::\)\+' ^M
line   67:
E121: Undefined variable: s:VariableDeclarationPattern
E15: Invalid expression: '(' .  s:MissableSeperatorPattern . '\%(' . s:VariableDeclarationPattern . '\%(\s*,' . s:MissableSeperatorPattern . s:VariableDeclarationPattern . '\)*\)*\s*)'^M
line   68:
E121: Undefined variable: s:FunctionPerfixPattern
E15: Invalid expression: s:FunctionPerfixPattern . s:MissableSeperatorPattern . s:IdentifierPattern . s:MissableSeperatorPattern . s:ParameterListPattern . '[^(){;]*'^M
line   69:
E121: Undefined variable: s:FunctionPattern
E15: Invalid expression: s:FunctionPattern . s:MissableSeperatorPattern . '\%(;\)\@='^M
line   70:
E121: Undefined variable: s:FunctionPattern
E15: Invalid expression: s:FunctionPattern . s:MissableSeperatorPattern . '\%({\)\@='^M
line   71:
E492: Not an editor command: ^M
line   72:
E488: Trailing characters
line  114:
E492: Not an editor command: ^M
line  115:
E488: Trailing characters
line  182:
E492: Not an editor command: ^M
line  183:
E488: Trailing characters
line  220:
E492: Not an editor command: ^M
line  221:
E488: Trailing characters
line  240:
E492: Not an editor command: ^M
line  241:
E488: Trailing characters
line  285:
E492: Not an editor command: ^M
line  286:
E488: Trailing characters
line  359:
E492: Not an editor command: ^M
line  360:
E488: Trailing characters
line  372:
E492: Not an editor command: ^M
line  374:
E488: Trailing characters
line  411:
E492: Not an editor command: ^M
line  412:
E488: Trailing characters
line  424:
E492: Not an editor command: ^M
line  425:
E488: Trailing characters
line  432:
E492: Not an editor command: ^M
line  433:
E488: Trailing characters

My commit, basically, changes Dos line endings to Unix ones. This helps to solve this problem.

Cheers,
Alex

@Vaelatern
Copy link

Please implement this. My fork only exists to have this change.

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

Successfully merging this pull request may close these issues.

1 participant