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

vim 유니코드 #6

Open
iwyoo opened this issue Jun 25, 2015 · 2 comments
Open

vim 유니코드 #6

iwyoo opened this issue Jun 25, 2015 · 2 comments

Comments

@iwyoo
Copy link

iwyoo commented Jun 25, 2015

vim에서 syntax highlight 할 때 유니코드의 경우에는 다른 처리가 필요할 것 같습니다.

예를 들어 '위치1' 과 같은 경우에 1만 따로 떨어져서 숫자로 highlight가 됩니다.
변수명을 position1 으로 한 경우 그런 문제가 생기지 않는 것으로 보아
유니코드와 같이 쓸 때의 문제인 것 같습니다.

@mnpk
Copy link
Contributor

mnpk commented Jun 25, 2015

syn match ysNumber "\<\%([1-9]\d*\|0\)\>" 으로 숫자를 highlight하는데, \<는 word의 시작을 가르키며 vim에서 word에 들어가는 문자는 [0-9A-Za-z_]인 것 같네요. 한글은 word에 포함이 안되어서 위치1의 1이 \<에 걸리게 되어서 숫자로 highlight 되는 것 같아요.
모든 유니코드에 대해 처리 할 수 있는지는 모르겠지만 한글(가-힣)이 앞/뒤에 있는 숫자에 대해서 예외로 숫자 highlight에서 빠질 수 있게 할 수는 있지 않을까 싶네요.

@mnpk
Copy link
Contributor

mnpk commented Jun 25, 2015

fork해서 한 번 수정해봤는데 좋은 해결책인지는 잘 모르겠네요 (...)

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