{"id":15493496,"url":"https://gitlab.com/thebashpotato/vsm","last_synced_at":"2025-04-22T20:11:15.062Z","repository":{"id":61881790,"uuid":"40446544","full_name":"thebashpotato/vsm","owner":"thebashpotato","description":"Interactive command line vim session file manager","archived":false,"fork":false,"pushed_at":null,"size":null,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":null,"default_branch":"main","last_synced_at":"2024-10-19T11:12:33.237Z","etag":null,"topics":["cli","mksession","neovim","rust","vim"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":null,"metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-23T00:03:12.657Z","updated_at":"2023-02-21T03:15:58.761Z","dependencies_parsed_at":"2022-10-23T00:45:20.234Z","dependency_job_id":null,"html_url":"https://gitlab.com/thebashpotato/vsm","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/thebashpotato%2Fvsm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/thebashpotato%2Fvsm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/thebashpotato%2Fvsm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/thebashpotato%2Fvsm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners/thebashpotato","download_url":"https://gitlab.com/thebashpotato/vsm/-/archive/main/vsm-main.zip","host":{"name":"gitlab.com","url":"https://gitlab.com","kind":"gitlab","repositories_count":4518800,"owners_count":6952,"icon_url":"https://github.com/gitlab.png","version":null,"created_at":"2022-05-30T11:31:42.605Z","updated_at":"2024-07-18T11:24:13.055Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners"}},"keywords":["cli","mksession","neovim","rust","vim"],"created_at":"2024-10-02T08:07:24.666Z","updated_at":"2025-04-22T20:11:15.029Z","avatar_url":null,"language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eVim Session Manager\u003c/h1\u003e\n  \u003cimg src=\"assets/vsm-usage.gif\"\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"Crates.io\" src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\"\u003e\n  \u003cimg alt=\"Crates.io\" src=\"https://img.shields.io/crates/v/vsm?style=flat-square\"\u003e\n  \u003cimg alt=\"docs.rs\" src=\"https://img.shields.io/docsrs/vsm?style=flat-square\"\u003e\n  \u003cimg alt=\"Crates.io\" src=\"https://img.shields.io/crates/d/vsm?style=flat-square\"\u003e\n  \u003cbr\u003e\n  \u003cp\u003eA \u003cb\u003eBLAZINGLY FAST\u003c/b\u003e, simple, interactive command line session manager\u003c/p\u003e\n\u003c/div\u003e\n\n## Table of Contents\n\n- [Background](#background)\n- [Install](#install)\n- [Usage](#usage)\n- [Development](#development)\n- [Maintainers](#maintainers)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Background\n\nIf you use vim or neovim on a daily basis and work in large codebases, it is probably not uncommon for you to have 10+ tabs open at a time,\nwith various splits. Once you close this vim session the layout is lost to the ethers. the `mksession` command in vim(neovim) can save you,\nthus saving the session to a directory, promising to return you to your work exactly how you left it.\nHowever, the problem is most of us accrue many of these session files scattered about, personally I have `41` vim session files,\neasily loading them, rememembering the context of each one, and removing stale sessions becomes a hassle. enter vsm (Vim Session Manager),\nit allows you to list, open, and remove sessions files, either interactively or by name. It also manages different variations of vim, and allows\nyou to switch between them. For example you may be a `neovide` user rather than `neovim`, vsm currently supports `vim, neovim, neovide and gvim`.\n\n### Similar projects\n\nCurrently I have only found [one other project](https://github.com/xolox/vim-session) which allows more indepth session file management.\nHowever it didn't suit my desires, as it is written in vim script, suffers from useless feature rot, and relies heavily on the xolox misc plugin,\ntogether loading in over `1200` or so lines of vim script just to manage some session files, it also seems to be unmaintained as the\nlast change recorded was July 6, 2014. Because of this I wrote `vsm`, it seemed like a better solution to make an external cli program and off load\nwork from vim and shorten my plugin list as much as possible.\n\n## Install\n\n### Install with cargo\n\n`cargo install vsm`\n\n### Building from source\n\n\u003e Installs the optimized binary to `$HOME/.local/bin`\n\n```bash\ngit clone https://gitlab.com/thebashpotato/vsm\ncargo install just\njust install\n```\n\n## Usage\n\n### Set up\n\n\u003e An environement variable `VIM_SESSIONS` is expected on the system,\n\u003e if it is not defined `vsm` will default to `~/.config/vim_sessions` when it looks\n\u003e for your session files. Below are 2 examples for settings the variable in different shells.\n\u003e You can set the path where ever you want.\n\n- bash/zsh `export VIM_SESSIONS=\"$HOME/.config/vim_sessions\"`\n\n- fish `set -Ux VIM_SESSIONS \"$HOME/.config/vim_sessions\"`\n\n### Create session files easier (in vim)\n\n\u003e `vsm` can load, list and remove session files, but it can't create them.\n\u003e That is the job of `vim`.\n\n\u003e Add the below snippet to your `.vimrc` or `init.vim` to make creating\n\u003e new session files much easier. Now in `normal mode` you can press `mk`\n\u003e to quickly save your session file.\n\n```vim\nif isdirectory(expand($VIM_SESSIONS))\n  \" Create a new sesion file (must give the file a unique name\n  nnoremap mk :mksession $VIM_SESSIONS/\n  \" Overwrite an existing sessioon file with your current layout\n  nnoremap mo :mksession! $VIM_SESSIONS/\nelse\n  nnoremap mk :echo \"VIM_SESSIONS directory does not exist\"\u003cCR\u003e\n  nnoremap mo :echo \"VIM_SESSIONS directory does not exist\"\u003cCR\u003e\nendif\n```\n\n## Development\n\nOnly requires `just` to bootstrap all tools and configuration.\n\n```bash\ncargo install just\njust init # setup repo, install hooks and all required tools\n```\n\nTo run:\n\n```bash\njust run\n```\n\nTo test:\n\n```bash\njust test\n```\n\nBefore committing your work:\n\n```bash\njust pre-commit\n```\n\nTo see all available commands:\n\n```bash\njust list\n```\n\n## Maintainers\n\n[@thebashpotato](https://gitlab.com/thebashpotato)\n\n## Contributing\n\nPRs accepted.\n\nSmall note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n## License\n\nThis project is licensed under:\n\n- [APGL © 2022 Matt Williams](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fthebashpotato%2Fvsm","html_url":"https://awesome.ecosyste.ms/projects/gitlab.com%2Fthebashpotato%2Fvsm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fthebashpotato%2Fvsm/lists"}