{"id":13479652,"url":"https://github.com/skywind3000/vim-keysound","last_synced_at":"2025-03-27T10:30:33.835Z","repository":{"id":82864449,"uuid":"131694912","full_name":"skywind3000/vim-keysound","owner":"skywind3000","description":":wine_glass: Play typewriter sound in Vim when you are typing a letter","archived":false,"fork":false,"pushed_at":"2023-03-10T18:51:48.000Z","size":1033,"stargazers_count":113,"open_issues_count":6,"forks_count":16,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-30T13:38:03.026Z","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/skywind3000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-05-01T09:11:51.000Z","updated_at":"2024-10-22T12:44:20.000Z","dependencies_parsed_at":"2024-10-30T13:43:07.792Z","dependency_job_id":null,"html_url":"https://github.com/skywind3000/vim-keysound","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/skywind3000%2Fvim-keysound","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skywind3000%2Fvim-keysound/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skywind3000%2Fvim-keysound/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skywind3000%2Fvim-keysound/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skywind3000","download_url":"https://codeload.github.com/skywind3000/vim-keysound/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245826667,"owners_count":20678840,"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-07-31T16:02:20.830Z","updated_at":"2025-03-27T10:30:33.182Z","avatar_url":"https://github.com/skywind3000.png","language":"Vim Script","readme":"# What is it ?\n\nIt's cool to play typewriter sound in Vim when you are typing a letter. :sunglasses:\n\n![](doc/logo.jpg)\n\n:zap: You can use it along with the [typewriter color scheme](https://github.com/logico-dev/typewriter), and feel like you are really working on a typewriter. \n\nEnjoy the rhythm of your code, gain the power from the sound, become productive in vim. :wine_glass:\n\nSee [this video](https://streamable.com/yah0h) by Keefle (there is no audio delay in reality).\n\n\n\n# Installation\n\n## vim-plug\n\n```VimL\nPlug 'skywind3000/vim-keysound'\n```\n\n## vundle\n\n```VimL\nPlugin 'skywind3000/vim-keysound'\n```\n\n# Configuration\n\nEnable keysound from start:\n\n```VimL\nlet g:keysound_enable = 1\n```\n\nCommand `:KeysoundEnable` and `:KeysoundDisable` can be used to manually start/stop the plugin if `g:keysound_enable` is not assigned.\n\nChoose a sound theme:\n\n```VimL\nlet g:keysound_theme = 'default'\n```\n\nThen the plugin will work and you can enjoy sound effect when you are typing in insert mode.\n\nAvaliable themes are: \n\n- `default`\n- `typewriter` \n- `mario`\n- `sword`\n- `bubble`\n\nAdditional sound themes can be found in `sounds` directory in your `runtimepath`, that is your `~/.vim/sounds` or `/path-to-dotfiles/sounds`.\n\nChange python version:\n\n```VimL\nlet g:keysound_py_version = 3\n```\n\nBoth 2 and 3 are available. It is assigned to zero by default, and will choose python automatically, change it to 2 or 3 if you need specify the python version.\n\nChange volume:\n\n```VimL\nlet g:keysound_volume = 500\n```\n\nThe volume is initialized to 500 by default, and should be in range of [0, 1000].\n\n\n# Function\n\nkeysound provide a function to allow you play any wav file in vim.\n\n```VimL\nkeysound#playsound(wavfile, volume)\n```\n\n`wavfile` is the path of your `.wav` file, `volume` is an integer with range of 0-1000.\n\n## Requirements\n\n- Python or Python3 integration in vim\n- [PySDL2](https://github.com/marcusva/py-sdl2) with SDL2 binaries.\n\nPySDL2 is used to provide low-latency audio playback.\n\n### Ubuntu\n\nJust install `python-sdl2` or `python3-sdl2` with `apt-get`, depend on your python version in vim:\n\n```bash\napt-get install python-sdl2\n```\n\nor \n\n```bash\napt-get install python3-sdl2\n```\n\n### openSUSE\n\nInstall `python-sdl2` or `python3-sdl2` and `libSDL2_mixer-2_0-0` with `zypper`, depend on your python version in vim:\n\n```bash\nzypper install python-sdl2 libSDL2_mixer-2_0-0\n```\n\nor \n\n```bash\nzypper install python3-sdl2 libSDL2_mixer-2_0-0\n```\n\n### Windows\n\nInstall pysdl2 in python or python3:\n\n```batch\npip install pysdl2\n```\n\nor \n\n```batch\npip3 install pysdl2\n```\n\nDownload `SDL2.dll` from [here](https://www.libsdl.org/download-2.0.php), `SDL2_mixer.dll` from [here](https://www.libsdl.org/projects/SDL_mixer/). Put the two files into your python's installation directory. \n\nYou can verify your SDL2 installation by `python -c \"import sdl2\"`. If there is no exceptions, your installation is fine.\n\n### Mac OS X\n\nInstall pysdl2 in python or python3:\n\n```batch\npip install pysdl2\n```\n\nor \n\n```batch\npip3 install pysdl2\n```\n\nInstall sdl2 with brew:\n\n```batch\nbrew install sdl2\n```\n\nIn alternative, it is possible to install the `pysdl2-dll`, a package that bundles the binary for `sdl2` for Windows and macOS.\n\n```bash\npip3 install pysdl2-dll\n```\n\n# About\n\nTODO\n","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskywind3000%2Fvim-keysound","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskywind3000%2Fvim-keysound","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskywind3000%2Fvim-keysound/lists"}