{"action":"created","issue":{"url":"https://api.github.com/repos/scrooloose/nerdtree/issues/868","repository_url":"https://api.github.com/repos/scrooloose/nerdtree","labels_url":"https://api.github.com/repos/scrooloose/nerdtree/issues/868/labels{/name}","comments_url":"https://api.github.com/repos/scrooloose/nerdtree/issues/868/comments","events_url":"https://api.github.com/repos/scrooloose/nerdtree/issues/868/events","html_url":"https://github.com/scrooloose/nerdtree/pull/868","id":347641735,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MjA1ODc1","number":868,"title":"Support unusual characters in file and directory names","user":{"login":"PhilRunninger","id":5598066,"node_id":"MDQ6VXNlcjU1OTgwNjY=","avatar_url":"https://avatars2.githubusercontent.com/u/5598066?v=4","gravatar_id":"","url":"https://api.github.com/users/PhilRunninger","html_url":"https://github.com/PhilRunninger","followers_url":"https://api.github.com/users/PhilRunninger/followers","following_url":"https://api.github.com/users/PhilRunninger/following{/other_user}","gists_url":"https://api.github.com/users/PhilRunninger/gists{/gist_id}","starred_url":"https://api.github.com/users/PhilRunninger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhilRunninger/subscriptions","organizations_url":"https://api.github.com/users/PhilRunninger/orgs","repos_url":"https://api.github.com/users/PhilRunninger/repos","events_url":"https://api.github.com/users/PhilRunninger/events{/privacy}","received_events_url":"https://api.github.com/users/PhilRunninger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2018-08-04T19:12:07Z","updated_at":"2018-10-18T21:12:14Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/scrooloose/nerdtree/pulls/868","html_url":"https://github.com/scrooloose/nerdtree/pull/868","diff_url":"https://github.com/scrooloose/nerdtree/pull/868.diff","patch_url":"https://github.com/scrooloose/nerdtree/pull/868.patch"},"body":"Fixes: #680 #492 #469 #424 #391 #217 \r\n\r\nThis PR has the potential to fix a bunch of issues. The problem with these issues is related to parsing the file or directory name from the current line of text. In short, I fixed it by surrounding the filename with non-breaking spaces (ASCII code 160), and using that pair of delimiters to find the filename in the text when needed. I also added syntax highlighting to conceal this character, making it appear as if nothing has been added. The advantages to using this character are:\r\n\r\n1. It is **very** unlikely to be used in a filename.\r\n1. If `conceal` is not compiled into your Vim, the only side effect is that the tree and trailing flags are pushed over by one extra \"space\".\r\n\r\nThere may be cases where this doesn't work so well, though, and some improvements will need to be made to this PR. The one I can think of right away is editing in an environment that doesn't support Unicode characters, or whatever the non-breaking space is. `ssh` comes to mind as a possible trouble spot.\r\n\r\n`conceal` was added in 7.3, but with the `if has(\"conceal\")` in the syntax file, we should be ok. It will just have the added spacing indicated above.\r\n\r\nI would like to enlist the authors of the related issues to test this fully. Areas I'd like them and others to try are:\r\n- [ ] scenarios listed in the issues\r\n- [ ] gvim\r\n- [ ] console vim\r\n- [ ] using the mouse to interact with NERDTree\r\n- [ ] possible side effects caused to other plugins like\r\n    - [ ] nerdtree-git-plugin\r\n    - [ ] devicons\r\n- [ ] ssh\r\n- [ ] older versions of vim 7.0 - 7.2\r\n- [ ] Windows\r\n- [ ] Linux\r\n- [ ] Mac\r\n\r\nOf course, I don't expect everyone to test all these areas, but given enough people we can likely cover them all. "},"comment":{"url":"https://api.github.com/repos/scrooloose/nerdtree/issues/comments/431165206","html_url":"https://github.com/scrooloose/nerdtree/pull/868#issuecomment-431165206","issue_url":"https://api.github.com/repos/scrooloose/nerdtree/issues/868","id":431165206,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTE2NTIwNg==","user":{"login":"lifecrisis","id":15251574,"node_id":"MDQ6VXNlcjE1MjUxNTc0","avatar_url":"https://avatars2.githubusercontent.com/u/15251574?v=4","gravatar_id":"","url":"https://api.github.com/users/lifecrisis","html_url":"https://github.com/lifecrisis","followers_url":"https://api.github.com/users/lifecrisis/followers","following_url":"https://api.github.com/users/lifecrisis/following{/other_user}","gists_url":"https://api.github.com/users/lifecrisis/gists{/gist_id}","starred_url":"https://api.github.com/users/lifecrisis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifecrisis/subscriptions","organizations_url":"https://api.github.com/users/lifecrisis/orgs","repos_url":"https://api.github.com/users/lifecrisis/repos","events_url":"https://api.github.com/users/lifecrisis/events{/privacy}","received_events_url":"https://api.github.com/users/lifecrisis/received_events","type":"User","site_admin":false},"created_at":"2018-10-18T21:12:14Z","updated_at":"2018-10-18T21:12:14Z","author_association":"COLLABORATOR","body":"> I just thought of a way to make this work. The code that combines the parent and child directory nodes can strip the leading nbsp off each child directory. I haven't looked at the code to see if it will work, but I think that's the way to go.\r\n\r\nThat's exactly what I meant!  I feel like I'm being a bit difficult on this issue, but I'm adamant that this is something we need to get right.  It's such a fundamental change, and it would be very useful.\r\n\r\n(Nice GIF by the way.)\r\n\r\nPerhaps we could go with node ID numbers, associative arrays, etc., in the next version of the NERDTree and just use this for now (you're only affecting a few dozen lines of code here). "}}
{"actor":{"display_login":"lifecrisis"}}