[vim/vim] Escape sequences in python block (Issue #14914)

36 views
Skip to first unread message

plitter

unread,
Jun 4, 2024, 9:25:41 AM6/4/24
to vim/vim, Subscribed

Steps to reproduce

  1. Use vimrc with
py3 << eof
foo = '\s'
eof
  1. See error:
Error detected while processing .../vimrc:
line    3:
<string>:1: SyntaxWarning: invalid escape sequence '\s'
Press ENTER or type command to continue

Expected behaviour

Python block should either be ignored or vim would need to be able to parse python or parsed with python, maybe?

Version of Vim

VIM - Vi IMproved 9.1 Included patches: 1-429

Environment

OS: Arch Linux
Terminal: foot version: 1.17.2
TERM: foot
Shell: GNU bash, version 5.2.26(1)-release (x86_64-pc-linux-gnu)

Logs and stack traces

Error detected while processing .../vimrc:
line    3:
<string>:1: SyntaxWarning: invalid escape sequence '\s'
Press ENTER or type command to continue


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14914@github.com>

zeertzjq

unread,
Jun 4, 2024, 9:30:41 AM6/4/24
to vim/vim, Subscribed

The same happens with Python interpreter:

>>> foo = '\s'
<stdin>:1: SyntaxWarning: invalid escape sequence '\s'

So I don't think this is a bug.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14914/2147542654@github.com>

Christian Brabandt

unread,
Jun 4, 2024, 10:34:55 AM6/4/24
to vim/vim, Subscribed

closing then.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14914/2147697207@github.com>

Christian Brabandt

unread,
Jun 4, 2024, 10:34:56 AM6/4/24
to vim/vim, Subscribed

Closed #14914 as not planned.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/14914/issue_event/13037558525@github.com>

plitter

unread,
Jun 4, 2024, 11:28:25 AM6/4/24
to vim/vim, Subscribed

@zeertzjq your right. I don't know why I started getting the error then. But I fixed it using the raw strings in python. Thanks for the help!


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14914/2147821957@github.com>

Reply all
Reply to author
Forward
0 new messages