{"id":19078967,"url":"https://github.com/tomtom/ttoc_vim","last_synced_at":"2025-04-30T05:23:46.504Z","repository":{"id":65603910,"uuid":"841051","full_name":"tomtom/ttoc_vim","owner":"tomtom","description":"A regexp-based table of contents of the current buffer for vim","archived":false,"fork":false,"pushed_at":"2015-11-06T13:20:55.000Z","size":157,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T20:49:51.653Z","etag":null,"topics":["outline","vim","vim-plugin","vim-script"],"latest_commit_sha":null,"homepage":"http://www.vim.org/scripts/script.php?script_id=2014","language":"VimL","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/tomtom.png","metadata":{"files":{"readme":"README","changelog":"CHANGES.TXT","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-08-16T13:25:44.000Z","updated_at":"2019-04-23T09:00:04.000Z","dependencies_parsed_at":"2023-01-31T11:20:11.030Z","dependency_job_id":null,"html_url":"https://github.com/tomtom/ttoc_vim","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Fttoc_vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Fttoc_vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Fttoc_vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Fttoc_vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomtom","download_url":"https://codeload.github.com/tomtom/ttoc_vim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251646331,"owners_count":21620911,"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":["outline","vim","vim-plugin","vim-script"],"created_at":"2024-11-09T02:12:55.799Z","updated_at":"2025-04-30T05:23:46.486Z","avatar_url":"https://github.com/tomtom.png","language":"VimL","funding_links":[],"categories":[],"sub_categories":[],"readme":"This plugin tries to duplicate the functionality of Marc Weber's \noutline.vim (vimscript #1947) on the basis of its description and of \nvim's own |:g|. Other than outline.vim, it relies on tlib (vimscript \n#1863).\n\nThe TToC command can be used to get a quick table of contents of the \nbuffer based on a given regular expression. The regexp can be defined on \nthe command line, in window (w:ttoc_rx), buffer-local (b:ttoc_rx) \nvariables or in global filetype-specific (g:ttoc_rx_{\u0026filetype}) \nvariables. The order actually is: [wbg]:ttoc_rx_{\u0026filetype} \u003e \n[wbg]:ttoc_rx.\n\nThe TToC command can also evaluate an expression to get the line \nnumbers. The expression is evalutated if TToC is invoked without a regex \nargument and the expression is defined for that filetype \n([wbg]:ttoc_expr_{\u0026filetype}). The expression needs to return either a \nsorted and unique list of line numbers either as a vim list or as a \nnewline-separated string.\n\nIn the list view, you can select a line and either preview it (\u003cc-p\u003e), \njump there (\u003c), close the list and jump there (\u003ccr\u003e).\n\nExample: \u003e\n\n  \" Use the default settings for the current file-type\n  :TToC\n  \" Show all words beginning at column 1\n  :TToC ^\\w\n  \" Show 'if' statements (but not the concluding 'then' statement)\n  :TToC ^\\s*if\\\u003e.\\{-}\\ze\\s\\+then\n  \" Show 'if' statements and 3 extra lines\n  :3TToC! \\\u003cif\\\u003e\n\nThe TToC with a bang works somewhat like |:g| only that you can \nbrowse/filter the list and select an item after reviewing the results. \nTry it out and compare (with the help file as current buffer): \u003e\n\n  :TToC! TToC\n\nwith \u003e\n\n  :g/TToC\n\n\n\n-----------------------------------------------------------------------\n\nStatus:  Works for me (there may be some minor quirks)\nDependencies:\n  tlib :: http://github.com/tomtom/tlib_vim\n      \u003e git clone git://github.com/tomtom/tlib_vim.git\nInstall: See http://github.com/tomtom/vimtlib/blob/master/INSTALL.TXT\nSee http://github.com/tomtom for related plugins.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomtom%2Fttoc_vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomtom%2Fttoc_vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomtom%2Fttoc_vim/lists"}