{"id":13479563,"url":"https://github.com/gpanders/vim-oldfiles","last_synced_at":"2025-05-07T03:45:58.856Z","repository":{"id":102162668,"uuid":"173336146","full_name":"gpanders/vim-oldfiles","owner":"gpanders","description":"Improve Vim's native recent file history","archived":false,"fork":false,"pushed_at":"2021-10-07T17:11:41.000Z","size":37,"stargazers_count":31,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T03:45:40.939Z","etag":null,"topics":["vim"],"latest_commit_sha":null,"homepage":"","language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gpanders.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-03-01T16:42:42.000Z","updated_at":"2025-03-14T01:37:52.000Z","dependencies_parsed_at":"2023-07-11T17:15:44.281Z","dependency_job_id":null,"html_url":"https://github.com/gpanders/vim-oldfiles","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpanders%2Fvim-oldfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpanders%2Fvim-oldfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpanders%2Fvim-oldfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpanders%2Fvim-oldfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gpanders","download_url":"https://codeload.github.com/gpanders/vim-oldfiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810274,"owners_count":21807759,"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":["vim"],"created_at":"2024-07-31T16:02:19.254Z","updated_at":"2025-05-07T03:45:58.844Z","avatar_url":"https://github.com/gpanders.png","language":"Vim script","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"readme":"vim-oldfiles\n============\n\nImprove Vim's native recent file history.\n\nMotivation\n----------\n\nVim natively keeps a list of your file history in the `v:oldfiles` variable\nwhich you can see with the `:oldfiles` command or, even better, with `:browse\noldfiles`. Unfortunately, `:oldfiles` has two significant drawbacks:\n\n1. The output of the command takes up the entire screen and uses Vim's\n   inelegant \"more prompt\".\n2. The list of recent files is not updated as you use Vim, and is only\n   re-written when you close Vim. One can get around this with the use of the\n   `:wviminfo` and `:rviminfo` commands, but this is cumbersome and not very\n   intuitive.\n\nThis plugin enhances Vim's native capability by addressing these two problems.\nThe command `:Oldfiles` uses `:oldfiles` under the hood, but presents a list of\nyour recently visited files in the quickfix list. Once in the quickfix list,\nyou can use all of the standard tools to navigate and search through your list\nof recent files (e.g. `:clist`, `:cc`, `:Cfilter`, and so on). **vim-oldfiles**\nwill also automatically filter non-existent and unreadable files from the list,\nsomething vanilla `:oldfiles` does not do.\n\nFurther, while you can natively filter the output of `:oldfiles` using the\n`:filter` command, this is a bit clunky. Instead, `:Oldfiles` (capital `O`)\nlets you pass a search pattern as an optional second argument to allow easy\nfiltering.\n\nBefore:\n\n```vim\n:filter /pattern/ oldfiles\n```\n\nWith **vim-oldfiles**:\n\n```vim\n:Oldfiles /pattern/\n```\n\nIf you don't have any other conflicting user commands, this can be shortened\neven further to simply `:Old` or even `:Ol`.\n\nMost importantly, **vim-oldfiles** keeps the `v:oldfiles` variable up to date\nas you use Vim, so when you open a new buffer you will see it at the top of the\n`:Oldfiles` list.\n\nUsage\n-----\n\nUse `:Oldfiles` to view your recent files in the quickfix list. You can also\nuse `:Oldfiles {pattern}` to only show files matching that pattern, or\n`:Oldfiles! {pattern}` to only show files that do not match that pattern.\n\nThis plugin provides a `\u003cPlug\u003e(Oldfiles)` mapping which you can use to map the\n`:Oldfiles` command like so\n\n```vim\nnmap \u003clhs\u003e \u003cPlug\u003e(Oldfiles)\n```\n\nBy default, this is mapped to `g\u003cC-^\u003e`.\n\nSee `:h Oldfiles` for more information.\n\nInstallation\n------------\n\n### Manual\n\nIf your version of Vim supports packages (`has('packages')` returns `1`),\nsimply clone this repository to `~/.vim/pack/gpanders/start/vim-oldfiles`.\n\nOtherwise, copy the `plugin` and `doc` directories into your Vim runtime folder\n(`$HOME/.vim` on macOS/Unix, `$HOME/vimfiles` on Windows) and run `:helptags\nALL` to generate help tags. Use `:help Oldfiles` to view the help docs.\n\n### Pathogen\n\n```console\ncd ~/.vim/bundle\ngit clone https://github.com/gpanders/vim-oldfiles.git\n```\n\n### vim-plug\n\n```vim\nPlug 'gpanders/vim-oldfiles'\n```\n\nFAQ\n---\n\n**Q:** How can I make the oldfiles list automatically close after I select an\nentry?\n\n**A:** Add the following snippet to `~/.vim/after/ftplugin/qf.vim`:\n\n```vim\nif get(w:, 'quickfix_title') =~# 'Oldfiles'\n    nnoremap \u003cbuffer\u003e \u003cCR\u003e \u003cCR\u003e:cclose\u003cCR\u003e\nendif\n```\n\nor if you prefer to keep everything in your `~/.vim/vimrc` file, use:\n\n```vim\naugroup oldfiles\n    autocmd!\n    autocmd FileType qf if get(w:, 'quickfix_title') =~# 'Oldfiles' | nnoremap \u003cbuffer\u003e \u003cCR\u003e \u003cCR\u003e:cclose\u003cCR\u003e | endif\naugroup END\n```\n\nSee [here][explanation] for more information.\n\n[explanation]: https://github.com/gpanders/vim-oldfiles/issues/2#issuecomment-776442884\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpanders%2Fvim-oldfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpanders%2Fvim-oldfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpanders%2Fvim-oldfiles/lists"}