{"id":19407509,"url":"https://github.com/aaronspring/cdo_lazy_vim","last_synced_at":"2025-10-16T05:18:13.158Z","repository":{"id":102712149,"uuid":"67644653","full_name":"aaronspring/cdo_lazy_vim","owner":"aaronspring","description":"lazy climate researcher?","archived":false,"fork":false,"pushed_at":"2018-06-03T12:19:34.000Z","size":148,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-25T01:41:58.080Z","etag":null,"topics":[],"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/aaronspring.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}},"created_at":"2016-09-07T21:22:44.000Z","updated_at":"2021-08-29T16:36:30.000Z","dependencies_parsed_at":"2023-03-13T15:15:36.878Z","dependency_job_id":null,"html_url":"https://github.com/aaronspring/cdo_lazy_vim","commit_stats":{"total_commits":33,"total_committers":3,"mean_commits":11.0,"dds":0.06060606060606055,"last_synced_commit":"b25537bf7c6496097b8b5f1f84f08fabf81dc1fa"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/aaronspring/cdo_lazy_vim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronspring%2Fcdo_lazy_vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronspring%2Fcdo_lazy_vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronspring%2Fcdo_lazy_vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronspring%2Fcdo_lazy_vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaronspring","download_url":"https://codeload.github.com/aaronspring/cdo_lazy_vim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronspring%2Fcdo_lazy_vim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279158976,"owners_count":26116365,"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","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-10T11:47:25.939Z","updated_at":"2025-10-16T05:18:13.112Z","avatar_url":"https://github.com/aaronspring.png","language":"Vim script","readme":"CDO_lazy_vim README\n===================\n\nIf you are using vi/vim/gvim for scripting with cdo, you can sometimes hardly remember cdo commands or you are just too lazy to type out \"sellonlatbox\" all the time, this might be something for you.\n\n![animation]( cdo_completion.gif )\n\nConfiguration instructions\n--------------------------\n\n* Add the lines of \"add_cdo_complete_to_your_vimrc\" to your \"~/.vimrc\" to include the complete function \u003cbr\u003e\n```\ncat add_cdo_complete_to_your_vimrc \u003e\u003e ~/.vimrc\n```\n\nOptional: \u003cbr\u003e\n1. Variable completion: Set a file path and 'ENABLE' vars_completion in your \".vimrc\" \u003cbr\u003e\n![animation]( vars_completion.gif ) \u003cbr\u003e\n2. If you want to use \u0026lt;Tab\u003e for auto-completion like in your shell, add those lines to your .vimrc \u003cbr\u003e FIXME: Doesnt replace \u003cC-U\u003e\u003cC-U\u003e yet, but only \u003cC-N\u003e\n```\n\" Use TAB to complete when typing words, else inserts TABs as usual.\n\" Uses dictionary and source files to find matching words to complete.\n\" \"See help completion for source,\n\" Note: usual completion is on \u003cC-n\u003e but more trouble to press all the time.\n\" Never type the same word twice and maybe learn a new spellings!\n\" Use the Linux dictionary when spelling is in doubt.\n\" Window users can copy the file to their machine.\nfunction! Tab_Or_Complete()\n  if col('.')\u003e1 \u0026\u0026 strpart( getline('.'), col('.')-2, 3 ) =~ '^\\w'\n    return \"\\\u003cC-N\u003e\"\n  else\n      return \"\\\u003cTab\u003e\"\n  endif\nendfunction\n:inoremap \u003cTab\u003e \u003cC-R\u003e=Tab_Or_Complete()\u003cCR\u003e\n```\nSource: http://vim.wikia.com/wiki/Smart_mapping_for_tab_completion \u003cbr\u003e\nThe usual \u0026lt;Tab\u003e command will still be executed when no completion is feasable, eg. in the beginning of (empty) lines \u003cbr\u003e\n3. If you fancy other auto-completion setting, play with the line\n```\nset complete=longest,menuone\n```\nThe current setting completes up to the last common string and then shows a menu. Other options are listed in the vim help or http://vimdoc.sourceforge.net/htmldoc/options.html#'completeopt' \u003cbr\u003e\n\n\u003cbr\u003e\n\nFor syntax highlighting: \u003cbr\u003e\n1. Copy the file \".vim/after/syntax/sh.vim\" and make sure your \".vimrc\" contains\n```\nsyntax on\n``` \nThis works for '*.bash', '*.ksh' and '*.sh'-files. If you want to use other shell file extensions, please rename according to the available file in \"/usr/share/vim/vim74/syntax/\".\n\n\nOperating instructions\n----------------------\nStart typing your desired cdo command and hit \u0026lt;Ctrl-X\u003e\u0026lt;Ctrl-U\u003e\n```\ncdo sell\u003cCtrl-X\u003e\u003cCtrl-U\u003e\n```\nGet the following autocompletion options \n```\nsellevel                sellevel description\nsellevidx               sellevidx description\nsellonlatbox            sellonlatbox description\nselltype                selltype description\n...\n```\nHit \u0026lt;Ctrl-N\u003e go get the first shown match\n```\ncdo sellevel\n```\nHit another \u0026lt;Ctrl-N\u003e to choose the next match or move down with arrow keys and hit \u003cEnter\u003e for your choice \n\n\n\nCopyright and licensing information\n-----------------------------------\n* MIT license\n\nKnown bugs\n----------\n* ?\n\nContact information\n-------------------\nAaron Spring \u003cbr\u003e Bundesstraße 53 \u003cbr\u003e ZMAW Room 122 \u003cbr\u003e aaron.spring@mpimet.mpg.de \u003cbr\u003e \u003cbr\u003e \nLooking forward to receiving your questions, comments or wishes\n\n\nChangelog\n---------\n* v0.1: basic auto-complete function based on cdoCompletion.bash as of 2016/09/06\n* v0.2: some MPI-ESM variables included for HAMOCC: 2d, 3d and sediment; MPIOM: 2d, 3d and ECHAM6: BOT, LOG, ...; checkout  this repositories \".vim/dictionary\"\n* v1.0: completly new approach: uses all 'cdo --operators' listings installed on your machine, requires cdo-1.7.1 or later, also completes variables gathered by 'cdo vardes files', requires '*.sh' files, variable_completion and cdo_completion can be enabled or disabled in .vimrc \n* v1.1 syntax included: is applied after the current '?sh' syntax, so cdoKeywords are included\n* v1.2 filename *sh requirement taken out\n* v1.3 [3.6.2018] changed cdo --operator to cdo --operators; --operator only lists a few, --operators all; now compatible with cdo-1.9.2\n\nWorking on\n----------\n* anything else needed?\n\nCredits and acknowledgements\n----------------------------\n* Uwe Schulzweida, creator of cdo\n* Prince K Xavier, the dude who set up auto-completion for NCL and made me think about this \n* Ralf Müller\n \n\nSister project\n--------------\n* similar stuff for NCL: https://github.com/aaronspring/ncl_lazy_vim\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronspring%2Fcdo_lazy_vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronspring%2Fcdo_lazy_vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronspring%2Fcdo_lazy_vim/lists"}