{"id":13898299,"url":"https://github.com/LucHermitte/lh-dev","last_synced_at":"2025-07-17T15:32:59.091Z","repository":{"id":28635858,"uuid":"32154772","full_name":"LucHermitte/lh-dev","owner":"LucHermitte","description":"API for coding oriented plugins","archived":false,"fork":false,"pushed_at":"2024-08-23T20:48:27.000Z","size":504,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-24T19:48:10.885Z","etag":null,"topics":["vim","viml-functions","viml-library"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LucHermitte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","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":"2015-03-13T12:32:41.000Z","updated_at":"2024-08-23T20:46:03.000Z","dependencies_parsed_at":"2024-08-23T19:39:14.032Z","dependency_job_id":null,"html_url":"https://github.com/LucHermitte/lh-dev","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucHermitte%2Flh-dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucHermitte%2Flh-dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucHermitte%2Flh-dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucHermitte%2Flh-dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LucHermitte","download_url":"https://codeload.github.com/LucHermitte/lh-dev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226274761,"owners_count":17598860,"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","viml-functions","viml-library"],"created_at":"2024-08-06T18:04:13.123Z","updated_at":"2024-11-25T04:31:09.444Z","avatar_url":"https://github.com/LucHermitte.png","language":"Vim Script","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"readme":"# lh-dev [![Last release][Releases-badge]][Releases-url] [![Build Status][gh-action-badge]][gh-action-result] [![Project Stats][openhub-badge]][openhub-url]\n\n[Releases-badge]:   https://img.shields.io/github/tag/LucHermitte/lh-dev.svg\n[Releases-url]:     https://github.com/LucHermitte/lh-dev/tags\n[gh-action-badge]:  ./../../actions/workflows/tests.yml/badge.svg?branch=master \"Test\"\n[gh-action-result]: ./../../actions/workflows/tests.yml?query=branch%3Amaster\n[openhub-badge]:    https://www.openhub.net/p/21020/widgets/project_thin_badge.gif\n[openhub-url]:      https://www.openhub.net/p/21020\n\n## Introduction\n\nlh-dev is a VimL for plugins oriented toward coding. It provides language independent functions that can be used by these plugins. The functions themselves can be specialized on a filetype basis.\n\nI'll first present options that end-user of plugins based on lh-dev may tune, then the API itself for coding plugin authors.\n\nNote: Starting with v2.0.0, naming policies and coding style policies have been\nextracted to [lh-style project](http://github.com/LucHermitte/lh-style).\n\n\n## Options\n\n## API\n\nThis part is just a draft for the moment.\n\n### Themes\n\n#### class\n#### type\n#### function\n\nFunction boundaries can be obtained with `lh#dev#find_function_boundaries()`\nThe analysis currently relies on ctags and on |matchit|. The code can be\nspecialized though (see [Inherited filetypes](#inherited-filetypes)).\n\nTwo mappings are also provided to select function boundaries, or to apply\noperators on function boundaries.\n\n  - `v_if` in strict visual mode (not in select mode)\n  - `o_if` on operators.\n\nFor instance:\n\n  - `vif` selects the current function\n  - `yif`  |yank|s the current function\n  - `dif`  |delete|s the current function\n\nThis can also be used to define a way to jump to the start/end of the current\nfunction in languages such as C++:\n```vim\n\" excerpt from [lh-cpp](https://github.com/LucHermitte/lh-cpp).\nnnoremap \u003csilent\u003e \u003cbuffer\u003e [[ :call lh#dev#_goto_function_begin()\u003ccr\u003e\nonoremap \u003csilent\u003e \u003cbuffer\u003e [[ :\u003cc-u\u003ecall lh#dev#_goto_function_begin()\u003ccr\u003e\nnnoremap \u003csilent\u003e \u003cbuffer\u003e ][ :call lh#dev#_goto_function_end()\u003ccr\u003e\nonoremap \u003csilent\u003e \u003cbuffer\u003e ][ :\u003cc-u\u003ecall lh#dev#_goto_function_end()\u003ccr\u003e\n```\n\n#### instruction\n#### tags\n#### Import statements can be automatically added in files with\n    `lh#dev#import#add()`.  See the following templates that exploit it:\n\n```\nVimL:\" C++ std::vector\u003c\u003e snippet\nVimL: let s:value_start = '¡'\nVimL: let s:value_end   = s:value_start\nVimL: let s:marker_open  = '\u003c+'\nVimL: let s:marker_close = '+\u003e'\nVimL: call s:AddPostExpandCallback('lh#dev#import#add(\"\u003cvector\u003e\")')\nstd::vector\u003c¡s:Surround(1, '\u003c+type+\u003e')¡\u003e \u003c++\u003e\n```\n\n```\nVimL:\" Python os.path.exists() snippet\nVimL:\" hint: os.path.exists()\nVimL: let s:value_start = '¡'\nVimL: let s:value_end   = s:value_start\nVimL: let s:marker_open  = '\u003c+'\nVimL: let s:marker_close = '+\u003e'\nVimL: call s:AddPostExpandCallback('lh#dev#import#add(\"os\", {\"symbol\": \"path\"})')\nos.path.exists(¡s:Surround(1, '\u003c+type+\u003e')¡)\u003c++\u003e\n```\n\n### Filetype polymorphism\n\nMost features provided by lh-dev can be specialized according to the filetype, usually of the current file.\n\n#### Options\n\nOptions can be obtained with:\n * `lh#ft#option#get(name, filetype [, default [, scopes]])`\n\n    This returns which ever exists first among: `b:{filetype}_{name}`, or\n    `g:{filetype}_{name}`, or `b:{name}`, or `g:{name}`. `{default}` is\n    returned if none exists. Default value for `{default}` is\n    [`g:lh#option#unset`](http://github.com/LucHermitte/lh-vim-lib).\n\n * `lh#ft#option#get_postfixed(name, filetype [, default [, scopes]])`\n\n    This returns which ever exists first among: `b:{name}_{filetype}`, or\n    `g:{name}_{filetype}`, or `b:{name}`, or `g:{name}`. `{default}` is\n    returned if none exists. Default value for `{default}` is\n    [`g:lh#option#unset`](http://github.com/LucHermitte/lh-vim-lib).\n\n    This flavour is more suited to variables like\n    `g:airline#extensions#btw#section` and\n    `g:airline#extensions#btw#section_qf`.\n\n##### Notes\n  * Filetype inheritance is supported.\n  * The order of the scopes for the variables checked can be specified through the optional argument `{scope}`.\n\n##### How to set these variables ?\n  * `g:{name}` is a global default option for all filetypes best set from a `.vimrc` or a plugin\n  * `g:{filetype}_{name}` is a global default option for a specific filetype (and its sub-filetypes) best set from a `.vimrc` or a plugin\n  * `b:{name}` is a local option for all filetypes, best set for a [vimrc\\_local](https://github.com/LucHermitte/local_vimrc), or possibly a ftplugin.\n  * `b:{filetype}_{name}` is a local option for a specific filetype (and its sub-filetypes), best set for a [vimrc\\_local](https://github.com/LucHermitte/local_vimrc), or possibly a ftplugin.\n\n\n#### Functions\n\nEntry point: `lh#dev#{theme}#function()`\n\nDefault function: `lh#dev#{theme}#_function()`\n\nSpecialized function: `lh#dev#{filetype}#{theme}#_function()`\n\n`lh#dev#option#call(name, filetype [, parameters])`\n\n`lh#dev#option#pre_load_overrides(name, filetype [, parameters])`\n`lh#dev#option#fast_call(name, filetype [, parameters])`\n\n#### Filetype inheritance\n`lh#ft#option#inherited_filetypes(filetypes)`\n\n### Contributing\n#### Language Analysis\n\n## Installation\n  * Requirements: Vim 7.+, [lh-vim-lib](http://github.com/LucHermitte/lh-vim-lib) (v4.6.0), [lh-tags](http://github.com/LucHermitte/lh-tags) (v3.0.0)\n  * Install with [vim-addon-manager](https://github.com/MarcWeber/vim-addon-manager) any plugin that requires lh-dev should be enough.\n  * With [vim-addon-manager](https://github.com/MarcWeber/vim-addon-manager), install lh-dev (this is the preferred method because of the [dependencies](http://github.com/LucHermitte/lh-dev/blob/master/addon-info.txt)).\n```vim\nActivateAddons lh-dev\n```\n  * [vim-flavor](http://github.com/kana/vim-flavor) (which also supports dependencies)\n```\nflavor 'LucHermitte/lh-dev'\n```\n  * Vundle/NeoBundle:\n```vim\nBundle 'LucHermitte/lh-vim-lib'\nBundle 'LucHermitte/lh-tags'\nBundle 'LucHermitte/lh-dev'\n```\n  * Clone from the git repositories\n```\ngit clone git@github.com:LucHermitte/lh-vim-lib.git\ngit clone git@github.com:LucHermitte/lh-tags.git\ngit clone git@github.com:LucHermitte/lh-dev.git\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLucHermitte%2Flh-dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLucHermitte%2Flh-dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLucHermitte%2Flh-dev/lists"}