Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dawsbot/swim
🏊♀️ Switch between multiple vimrc files
https://github.com/dawsbot/swim
bash bash-script shell shell-script vim vimrc vimrc-files
Last synced: about 1 month ago
JSON representation
🏊♀️ Switch between multiple vimrc files
- Host: GitHub
- URL: https://github.com/dawsbot/swim
- Owner: dawsbot
- License: mit
- Created: 2015-09-19T19:08:22.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-12-02T11:02:09.000Z (about 3 years ago)
- Last Synced: 2024-05-02T05:38:04.754Z (8 months ago)
- Topics: bash, bash-script, shell, shell-script, vim, vimrc, vimrc-files
- Language: Shell
- Homepage:
- Size: 4.43 MB
- Stars: 84
- Watchers: 5
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
switch vimrc files instantly
![](https://img.shields.io/badge/version-0.4.0-brightgreen.svg)
![](https://img.shields.io/badge/license-MIT-blue.svg)## Demo
![demo fig](media/demo.gif)
## Why
Trying out and switching vimrc's shouldn't be hard. It shouldn't require several ```mv```'s combined with a ```wget```. Most importantly, it shouldn't stop you from always having the perfect vim configuration so you can be efficient.
swim add
vimrc's directly from the internet
or locally and alias your vimrc's with names that are easy to remember. Swim entirely replaces the need for per-directory vimrc's, headers, and external vimrc configs.
## Install
Backup your files **before** swimming```shell
curl -s https://raw.githubusercontent.com/dawsonbotsford/swim/master/install | bash
```
## Examples
```shell
swim add ~/dotfiles/myVimrc favorite #Add new swim alias
swim ls #Show available swim aliases
swim add https://raw.githubusercontent.com/dawsonbotsford/swim/master/exampleVimrcs/vimrcWikia.vim example
swim with favorite #Set alias favorite as primary .vimrc
swim with main #Set alias main as primary .vimrc```
## Update
```shell
swim update #Update to the newest version of swim
```
## Available Commands
```shell
swim add #Add a swim alias
swim with #Change active vimrc file
swim ls #List aliased vimrc files
swim active #Show currently aliased vimrc
swim vim #Edit the vimrc stored at aliasswim mv #Rename alias (like Linux mv)
swim rm #Delete an alias entirely
swim update #Download newest version
swim version #Print version
swim help #Print this message
```
## FAQ
* Where does swim store my vimrc files?
* swim stores your vimrc files in ```~/.swim```. You can edit the vimrc files with ```swim vim ``` or edit them manually from their file location.
* Can I set a custom executable location?
* Yes, the default install location of the `swim` executable is `/usr/local/bin`, but if you would like a custom location, simply set the environmental variable named `usrDir`.
* Example: `export usrDir="/usr/sbin"`
(That only needs to be set for when you perform the swim install. So no need to set this in your bashrc or zshrc)
* Does swim support emacs?
* No, but pull requests are always welcome :)
* Can I call swim within vim?
* It may be possible to hack together a several command ```:! ``` solution at the moment, but there is not a supported method.
#### Requirements
* node.js and npm (to auto-install [chalk-cli](https://github.com/chalk/chalk-cli))
## Changelog
* **0.4.0**: Custom executable install location
* **0.3.2-prelaunch**: Prelaunch Beta Testing