{"action":"created","issue":{"url":"https://api.github.com/repos/cursive-ide/cursive/issues/1430","repository_url":"https://api.github.com/repos/cursive-ide/cursive","labels_url":"https://api.github.com/repos/cursive-ide/cursive/issues/1430/labels{/name}","comments_url":"https://api.github.com/repos/cursive-ide/cursive/issues/1430/comments","events_url":"https://api.github.com/repos/cursive-ide/cursive/issues/1430/events","html_url":"https://github.com/cursive-ide/cursive/issues/1430","id":158625929,"number":1430,"title":"Suggestion - add namespace :require from anywhere in a file","user":{"login":"mtruyens","id":1895793,"avatar_url":"https://avatars.githubusercontent.com/u/1895793?v=3","gravatar_id":"","url":"https://api.github.com/users/mtruyens","html_url":"https://github.com/mtruyens","followers_url":"https://api.github.com/users/mtruyens/followers","following_url":"https://api.github.com/users/mtruyens/following{/other_user}","gists_url":"https://api.github.com/users/mtruyens/gists{/gist_id}","starred_url":"https://api.github.com/users/mtruyens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtruyens/subscriptions","organizations_url":"https://api.github.com/users/mtruyens/orgs","repos_url":"https://api.github.com/users/mtruyens/repos","events_url":"https://api.github.com/users/mtruyens/events{/privacy}","received_events_url":"https://api.github.com/users/mtruyens/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-06T08:34:34Z","updated_at":"2016-06-06T10:34:00Z","closed_at":null,"body":"Probably fifty times per day, I find myself leaving my edit location, scrolling to the top of the file, adding a specific namespace to the :require list, and then finally going back to the initial edit location.\r\n\r\nIt would be great if a dialog box was added which you could call with a shortcut, which would have three boxes (name of the namespace to require, :as field, and :refer field), and which would then add what is required to the top of the file. Ideally the first box would help with searching/selecting the right namespace, e.g. using autosuggest.\r\n\r\nSimilar for the :import section at the top of the file. "},"comment":{"url":"https://api.github.com/repos/cursive-ide/cursive/issues/comments/223923449","html_url":"https://github.com/cursive-ide/cursive/issues/1430#issuecomment-223923449","issue_url":"https://api.github.com/repos/cursive-ide/cursive/issues/1430","id":223923449,"user":{"login":"mtruyens","id":1895793,"avatar_url":"https://avatars.githubusercontent.com/u/1895793?v=3","gravatar_id":"","url":"https://api.github.com/users/mtruyens","html_url":"https://github.com/mtruyens","followers_url":"https://api.github.com/users/mtruyens/followers","following_url":"https://api.github.com/users/mtruyens/following{/other_user}","gists_url":"https://api.github.com/users/mtruyens/gists{/gist_id}","starred_url":"https://api.github.com/users/mtruyens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtruyens/subscriptions","organizations_url":"https://api.github.com/users/mtruyens/orgs","repos_url":"https://api.github.com/users/mtruyens/repos","events_url":"https://api.github.com/users/mtruyens/events{/privacy}","received_events_url":"https://api.github.com/users/mtruyens/received_events","type":"User","site_admin":false},"created_at":"2016-06-06T10:34:00Z","updated_at":"2016-06-06T10:34:00Z","body":"Thanks for the fast reply!\r\n\r\nThe :import is indeed much less important (it was a hasty afterthought of mine), so you are right that it's not a real necessity. \r\n\r\nAs for the :require, I indeed \"discovered\" the automatic-addition-through-aliases-feature, even without documentation. However, the problem with that feature is that I tend to use :refer very frequently. The reasons are twofold: (1) creative lazyness (coming up with a good, short and unique abbreviation for every single namespace you :require is hard in a large codebase...); (2) clean looks and conciseness: if you use a :require'd function or var twenty times in a given namespace, then I find it much cleaner -- and shorter! -- to not have a namespace prefix every single time. \r\n\r\nSo it could be me, but I suspect there are many other users out there who :refer without assigning an alias, and do not consider the :refer esoteric..."}}
{"actor":{"display_login":"mtruyens"}}