{"id":15622604,"url":"https://github.com/frioux/vim-lost","last_synced_at":"2025-06-11T14:34:02.604Z","repository":{"id":66399307,"uuid":"91149086","full_name":"frioux/vim-lost","owner":"frioux","description":null,"archived":false,"fork":false,"pushed_at":"2020-06-13T18:03:46.000Z","size":9,"stargazers_count":24,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-18T18:33:24.588Z","etag":null,"topics":["plugin","vim"],"latest_commit_sha":null,"homepage":"https://blog.afoolishmanifesto.com/posts/lost-vim-for-when-youre-lost-in-file/","language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frioux.png","metadata":{"files":{"readme":"README.markdown","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-13T04:25:24.000Z","updated_at":"2024-05-24T14:42:16.000Z","dependencies_parsed_at":"2023-02-21T17:45:19.465Z","dependency_job_id":null,"html_url":"https://github.com/frioux/vim-lost","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frioux%2Fvim-lost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frioux%2Fvim-lost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frioux%2Fvim-lost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frioux%2Fvim-lost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frioux","download_url":"https://codeload.github.com/frioux/vim-lost/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251353021,"owners_count":21575935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["plugin","vim"],"created_at":"2024-10-03T09:54:45.516Z","updated_at":"2025-04-28T17:22:42.084Z","avatar_url":"https://github.com/frioux.png","language":"Vim script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lost.vim\n\nVim plugin to provide a command to help you orient yourself when editing a large\nchunk of code.  While we should try to avoid having huge functions or huge\nclasses or huge blobs of code, they will likely exist forever and I aim to make\nworking with them less painful.\n\n## Example\n\nImagine you have the following code block, and the cursor is where the `|` is:\n\n```\nsub foo {\n   # 1000 lines of nonsense\n   |dwigt();\n   # 1000 more lines of nonsense\n}\n```\n\nIf you run the `:Lost` command you will see `sub foo {` at the bottom of your\nvim window.  Nice!\n\n[![Here's an asciinema demo](https://asciinema.org/a/2b64vpw1pmx3fl94ly1q4kyi8.png)](https://asciinema.org/a/2b64vpw1pmx3fl94ly1q4kyi8)\n\n## Inspiration\n\n(The following is quoted from [the blog\npost](https://blog.afoolishmanifesto.com/posts/file-context-lost-in-a-file/)\nwhere I had the idea for this tool.)\n\nOne of the subtle brilliances that `git` provides is context other than simple\nline numbers in diffs.  I know that it wasn't the first tool to implement such a\nfeature (`diff -p` does the same thing) but it was the first one that I've seen\nuse it by default.  For example, the diff\n[here](https://github.com/frioux/DBIx-Class-Helpers/commit/2bef898e9c2c70c79d269c7222e619ac08be027c#diff-541385fdf1ae526e444d502ed0483b3cL33)\nincludes the following snippet:\n\n```\n@@ -33,9 +44,9 @@ sub _defaults {\n    my ($self, $params) = @_;\n\n    $params-\u003e{namespace}           ||= [ get_namespace_parts($self) ]-\u003e[0];\n-   $params-\u003e{left_method}         ||= String::CamelCase::decamelize($params-\u003e{left_class});\n-   $params-\u003e{right_method}        ||= String::CamelCase::decamelize($params-\u003e{right_class});\n-   $params-\u003e{self_method}         ||= String::CamelCase::decamelize($self);\n+   $params-\u003e{left_method}         ||= $decamelize-\u003e($params-\u003e{left_class});\n+   $params-\u003e{right_method}        ||= $decamelize-\u003e($params-\u003e{right_class});\n+   $params-\u003e{self_method}         ||= $decamelize-\u003e($self);\n    $params-\u003e{left_method_plural}  ||= $self-\u003e_pluralize($params-\u003e{left_method});\n    $params-\u003e{right_method_plural} ||= $self-\u003e_pluralize($params-\u003e{right_method});\n    $params-\u003e{self_method_plural}  ||= $self-\u003e_pluralize($params-\u003e{self_method});\n\n```\n\nThe top of the snippet is the function that the change was made in.  The\ncontext is not always perfect, but it's right so often it is astounding.  This\nis exactly what I wanted, but generalized.\n\n## Installation\n\nIf you don't have a preferred installation method, I recommend installing\n[pathogen.vim](https://github.com/tpope/vim-pathogen), and then simply copy and\npaste:\n\n    cd ~/.vim/bundle\n    git clone git://github.com/frioux/vim-lost\n\nOnce help tags have been generated, you can view the manual with\n`:help lost`.\n\n## Self-Promotion\n\nLike lost.vim? Follow the repository on\n[GitHub](https://github.com/frioux/vim-lost).  And if you're feeling especially\ncharitable, follow [frioux](https://blog.afoolishmanifesto.com) on\n[Twitter](http://twitter.com/frioux) and [GitHub](https://github.com/frioux).\n\n## License\n\nCopyright (c) Arthur Axel fREW Schmidt.  Distributed under the same terms as Vim\nitself.  See `:help license`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrioux%2Fvim-lost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrioux%2Fvim-lost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrioux%2Fvim-lost/lists"}