{"id":16310666,"url":"https://github.com/nkh/vimkat","last_synced_at":"2025-03-20T21:31:48.849Z","repository":{"id":45739691,"uuid":"514316054","full_name":"nkh/vimkat","owner":"nkh","description":"Renders a file via Vim, vimcat replacement ","archived":false,"fork":false,"pushed_at":"2024-02-02T21:22:27.000Z","size":262,"stargazers_count":26,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-11T21:43:06.586Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/nkh.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2022-07-15T15:21:38.000Z","updated_at":"2024-09-07T15:37:04.000Z","dependencies_parsed_at":"2024-02-02T22:29:25.315Z","dependency_job_id":"597a97d5-bcf9-406a-8ead-7019953b0fe5","html_url":"https://github.com/nkh/vimkat","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/nkh%2Fvimkat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkh%2Fvimkat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkh%2Fvimkat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkh%2Fvimkat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nkh","download_url":"https://codeload.github.com/nkh/vimkat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221809060,"owners_count":16883846,"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":[],"created_at":"2024-10-10T21:42:43.035Z","updated_at":"2024-10-28T08:44:28.167Z","avatar_url":"https://github.com/nkh.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## NAME\n\tvimkat - render a file via Vim\n\ttvcat  - render a file via Vim in Tmux\n\n## SYNOPSIS\n\tvimkat input_file [max_lines] [vimrc]\n\t... | vimkat [max_lines] [vimrc] [vim_command]   \n\n\ttvcat input_file [max_lines]\n\t... | vimkat [max_lines] | pager\n   \n## DESCRIPTION\n\tRenders a file via Vim ... quite fast\n\n\tinput_file\tthe file you want rendered\n\tmax_lines\tthe maximum number of lines to render, -1 for all lines\n\tvimrc\t\ta vimrc file to use instead for your default vimrc, -1 for vimkat's vimrc\n\tvim_command\textra argument to vim, eg: \"-c 'ft=sh'\"\n\nLarge bash script rendering:\n![Screenshot](https://raw.github.com/nkh/vimkat/main/screenshots/time_ftl_full.png)\n\nFZF preview:\n![Screenshot](https://raw.github.com/nkh/vimkat/main/screenshots/fzf_preview.png)\n\nThe venerable 'vimcat' is often too slow for rendering previews for fzf, specially on large files, and I _REALLY_ want to \npreview my files the _same way_ I'd see them in my $EDITOR (vim of course).\n\nAfter a short discussion with Rafael Kitover, of vimpager's fame, I decided to dig in, this\nis the first beta release of 'vimkat', more releases to fix some bug will come continuously.\n\nI've also writen 'tvcat' which is a bit faster but work only in tmux.\n\n## SPEED\n\nExpect at least 3 times faster rendering speed for vimkat, with an average of ten times and for some\nfiles 50! times. Speed can be 2 to 5 times faster with tvcat than vimkat.\n\nin the example directory you'll find bash_ftl which is a large, very syntax heavy, file which takes 15 seconds\nto render (on my machine) with vimcat and 0.6 second with vimkat and 0.3 second with tvcat.\n\nI'm of course interested in hearing about the performances with other types of files and other machines\n\n### Partial Rendering\n\nif you want took at only the top part of a file you can pass a length argument to speed it up things a bit.\n\n### No plugins\n\nLoading plugins takes time, you can shave of a tenth of a second or so by using a simplified vimrc file. As a \nthird argument 'vimkat' takes a vimrc file or you can pass -1 and it wil use ~/.vimkatrc. If you don't give a\nvimrc argument your default vimrc is used.\n \n## PIPING\n\nYou can pipe in vimkat and tvcat, you may need to help vim with the file type detection:\n\n\t$\u003e generate_text | vimkat [max_lines] [vimrc] [vim_command]   \n\t$\u003e generate_text | tvcat [max_lines]    \n\n## PAGER\n\nOutput from tvcat can be passed to a pager, vimkat may generate code the pager doesn't handle.\n\n## FZF\n\nMy main goal was to have previews in fzf, you can find an example script in the 'fzf' directory.\n\nIf you have 'lscolors' installed (https://github.com/sharkdp/lscolors), uncomment the script's\nfirst line to get the files colored too. ls, fd, ... have options to always colorize their output\n\n## HELPING/BUGS\n\nPatches/Bug reports are welcome, and it's easy in such a small project, for:\n\n- examples with your syntax, plus rendering time\n- timing data if you find rendering too slow\n- wrong rendering\n- a logo\n- better fzf script\n- porting (this works on my machine®)\n\n## AUTHOR/LICENSE\n\t© Nadim Ibn Hamouda El Khemir, 2022. Artistic License 2.0 or Vim's license\n\tmailto: nadim.khemir@gmail.com\n\n## SEE ALSO\n\tvimpager \u0026\u0026 vimcat (https://github.com/rkitover/vimpager)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkh%2Fvimkat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnkh%2Fvimkat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkh%2Fvimkat/lists"}