{"id":13572029,"url":"https://github.com/flippidippi/sVim","last_synced_at":"2025-04-04T09:31:34.007Z","repository":{"id":19747582,"uuid":"23004419","full_name":"flippidippi/sVim","owner":"flippidippi","description":"Safari extension with shortcuts similar to Vim","archived":false,"fork":false,"pushed_at":"2021-08-11T21:22:20.000Z","size":4455,"stargazers_count":735,"open_issues_count":56,"forks_count":55,"subscribers_count":27,"default_branch":"master","last_synced_at":"2024-04-13T20:16:44.695Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flippidippi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-15T22:01:13.000Z","updated_at":"2024-03-22T03:56:40.000Z","dependencies_parsed_at":"2022-07-22T12:02:22.652Z","dependency_job_id":null,"html_url":"https://github.com/flippidippi/sVim","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flippidippi%2FsVim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flippidippi%2FsVim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flippidippi%2FsVim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flippidippi%2FsVim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flippidippi","download_url":"https://codeload.github.com/flippidippi/sVim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247153253,"owners_count":20892621,"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-08-01T14:01:11.577Z","updated_at":"2025-04-04T09:31:28.997Z","avatar_url":"https://github.com/flippidippi.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"![sVim](banner.png)\n\nsVim is a Safari extension with shortcuts similar to Vim.\nThe functionality of sVim will mostly follow the Chrome extension [cVim](https://github.com/1995eaton/chromium-vim).\n\n# Get it\n- Download the [latest release](https://github.com/flipxfx/sVim/releases/latest)\n- Releases and release notes are all uploaded to Github on the [releases page](https://github.com/flipxfx/sVim/releases)\n- The extension will update via Safari Extension Updates\n\n# Help\n\n## Shortcuts\n\n| Keyboard Command       | Description                                    | Mapping Name            |\n| ---                    | ---                                            | ---                     |\n| **Movement**           |                                                |                         |\n| \"j\"                    | scroll down                                    | scrollDown              |\n| \"k\"                    | scroll up                                      | scrollUp                |\n| \"h\"                    | scroll left                                    | scrollLeft              |\n| \"l\"                    | scroll right                                   | scrollRight             |\n| \"d\"                    | scroll half-page down                          | scrollPageDown          |\n| \"e\", \"u\"               | scroll half-page up                            | scrollPageUp            |\n| \"shift+d\"              | scroll full-page down                          | scrollFullPageDown      |\n| \"shift+e\"              | scroll full-page up                            | scrollFullPageUp        |\n| \"shift+g\"              | scroll to bottom of the page                   | scrollToBottom          |\n| \"g g\"                  | scroll to top of the page                      | scrollToTop             |\n| \"0\"                    | scroll to the left of the page                 | scrollToLeft            |\n| \"$\"                    | scroll to the right of the page                | scrollToRight           |\n| \"g i\"                  | go to the first input box                      | goToInput               |\n| \"g n\"                  | find a \"next page\" link and navigate to it     | gotoNextPage            |\n| \"g p\"                  | find a \"previous page\" link and navigate to it | gotoPrevPage            |\n| **Miscellaneous**      |                                                |                         |\n| \"r\"                    | reload the current tab                         | reloadTab               |\n| \"z i\"                  | zoom page in                                   | zoomPageIn              |\n| \"z o\"                  | zoom page out                                  | zoomPageOut             |\n| \"z 0\"                  | zoom page to original size                     | zoomOrig                |\n| \"g r\"                  | toggle Safari reader if possible               | toggleReader            |\n| \"g v\"                  | show sVimrc page                               | showsVimrc              |\n| \"g ?\"                  | open help page in new tab                      | help                    |\n| **Tab Navigation**     |                                                |                         |\n| \"g t\", \"shift+k\"       | navigate to the next tab                       | nextTab                 |\n| \"g shift+t\", \"shift+j\" | navigate to the previous tab                   | previousTab             |\n| \"g 0\"                  | go to the first tab                            | firstTab                |\n| \"g $\"                  | go to the last tab                             | lastTab                 |\n| \"g l\"                  | go to the last active tab that's still open    | lastActiveTab           |\n| \"x\"                    | close the current tab                          | quit                    |\n| \"g x shift+t\"          | close the tab to the left of the current tab   | closeTabLeft            |\n| \"g x t\"                | close the tab to the right of the current tab  | closeTabRight           |\n| \"g x 0\"                | close all tabs to the left of the current tab  | closeTabsToLeft         |\n| \"g x $\"                | close all tabs to the right of the current tab | closeTabsToRight        |\n| \"shift+x\"              | open the last closed tab                       | lastClosedTab           |\n| \"ctrl+shift+x\"         | open the last closed tab in background         | lastClosedTabBackground |\n| \"t\"                    | open new tab                                   | newTab                  |\n| \"shift+h\"              | go back in history                             | goBack                  |\n| \"shift+l\"              | go forward in history                          | goForward               |\n| \"shift+,\"              | move current tab left                          | moveTabLeft             |\n| \"shift+.\"              | move current tab right                         | moveTabRight            |\n| \"g u\"                  | navigate to parent directory                   | parentDirectory         |\n| \"g shift+u\"            | navigate to top directory                      | topDirectory            |\n| \"g d\"                  | navigate to parent domain                      | parentDomain            |\n| \"g h\"                  | navigate to home page                          | homePage                |\n| **Window Navigation**  |                                                |                         |\n| \"w\"                    | open new window                                | newWindow               |\n| \"g w\"                  | navigate to the next window                    | nextWindow              |\n| \"g shift+w\"            | navigate to the previous window                | previousWindow          |\n| **Modes**              |                                                |                         |\n| \"escape\", \"ctrl+\\[\"    | enter normal mode                              | normalMode              |\n| \"i\"                    | enter insert mode                              | insertMode              |\n| **Link Hints**         |                                                |                         |\n| \"f\"                    | open link in current tab                       | createHint              |\n| \"shift+f\"              | open link in new background tab                | createTabbedHint        |\n| \"ctrl+shift+f\"         | open link in new foreground tab                | createForegroundHint    |\n| **Clipboard**          |                                                |                         |\n| \"y y\"                  | copy current URL to clipboard                  | yankDocumentUrl         |\n\n## sVimrc\n- The sVimrc page is where you can customize sVim settings and css.\n- You can access the page by pressing `g v` or via the extension settings in Safari.\n- The sVimrc and sVimcss files can be synced via [gist](https://gist.github.com).\n  - The gist id is found at the end of the url when viewing the gist.\n  - Note it does not matter the name of your gist or the file, sVim will just grab the first file from the gist id supplied. I use sVim.rc and sVim.css.\n- For simplicity, strings in sVimrc should be wrapped in `\"`.\n- Save the sVimrc page with `command+s`.\n- Goto or switch between sVimrc and sVimcss with `ctrl+w`.\n\n### sVimrc Commands\n- **set**\n  - Used for boolean settings.\n  - Prepend `no` to setting name to unset.\n  - Set smooth scroll with `set smoothscroll` and unset with `set nosmoothscroll`.\n- **let**\n  - Used to set non-boolean settings.\n  - These settings can be of type integer, string or array.\n  - Set new tab url like `let newtaburl = \"http://google.com\"`.\n  - Set scroll step like `let scrollstep = 100`.\n  - Set black lists like `let blacklists = [\"*://example.com/stuff/*\", \"*://mail.google.com/*\"]`.\n- **map**\n  - Used to set/overwrite shortcuts.\n  - sVim uses [Mousetrap](http://craig.is/killing/mice) for shortcuts and keyboard commands should follow it's format.\n  - You can use leader with `\u003cLeader\u003e` in the keyboard command.\n  - Set the down arrow key to scroll down with `map \"down\" scrollDown`.\n  - Set the leader key + the J key to scroll down with `map \"\u003cLeader\u003e j\" scrollFullPageDown`.\n- **unmap**\n  - Used to remove a shortcut.\n  - Remove `j` shortcut with `unmap \"j\"`.\n- **unmapAll**\n  - Used to remove all current shortcuts with `unmapAll`.\n- **\"**\n  - Used to add comments to sVimrc.\n  - Comment by adding `\"` to the beginning of the line (inline not supported).\n  - Add comment like `\" This is a comment`.\n\n### sVimrc Settings\n| Setting Name          | Description                                                                                 | Type    | Default           |\n| ---                   | ---                                                                                         | ---     | ---               |\n| preventdefaultesc     | prevent escape from exiting full screen, if unset then only prevent when not in normal mode | boolean | true              |\n| smoothscroll          | use smooth scrolling                                                                        | boolean | true              |\n| fullpagescrollpercent | percent of the page to scroll by when using scrollFullPageUp and scrollFullPageDown         | integer | 85                |\n| lastactivetablimit    | number of last active tabs to remember                                                      | integer | 25                |\n| lastclosedtablimit    | number of closed tabs to remember                                                           | integer | 25                |\n| scrollduration        | duration of smooth scrolling                                                                | integer | 30                |\n| scrollstep            | amount of pixels scrolled when using scrollUp and scrollDown                                | integer | 60                |\n| zoomstep              | percent to zoom when using zoomPageIn and zoomPageOut                                       | integer | 10                |\n| hintcharacters        | characters to be used in link hint mode                                                     | string  | \"asdfgqwertzxcvb\" |\n| homeurl               | url to use as home page                                                                     | string  | \"topsites://\"     |\n| mapleader             | \u003cLeader\u003e key                                                                                | string  | \"\\\"               |\n| newtaburl             | url to use as the default new tab url                                                       | string  | \"topsites://\"     |\n| blacklists            | disable sVim on the sites matching one of the patterns                                      | array   | []                |\n| nextpagetextpatterns  | a list of regex patterns used to find the \"next page\" link on the page                      | array   | [\"Next\"]          |\n| prevpagetextpatterns  | a list of regex patterns used to find the \"prev page\" link on the page                      | array   | [\"Previous\"]      |\n\n### sVimrc Example\n```viml\n\" Settings\nset nosmoothscroll\nlet fullpagescrollpercent = 100\nlet lastactivetablimit = 50;\nlet lastclosedtablimit = 50;\nlet scrollduration = 25\nlet scrollstep = 65\nlet zoomstep = 15\nlet hintcharacters = \"1234567890\";\nlet homeurl = \"http://google.com\";\nlet mapleader = \",\"\nlet newtaburl = \"http://google.com\"\nlet blacklists = [\"*://example.com/stuff/*\", \"*://mail.google.com/*\"]\nlet nextpagetextpatterns = [\"Next\"]\nlet prevpagetextpatterns = [\"Prev(ious)?\"]\n\n\" Shortcuts\nmap \"q\" nextTab\nmap \"shift+q\" previousTab\nmap \"\u003cLeader\u003e h\" closeTabLeft\nmap \"\u003cLeader\u003e l\" closeTabRight\nmap \"down\" scrollDown\nmap \"up\" scrollUp\nmap \"left\" scrollLeft\nmap \"right\" scrollRight\nmap \"space\" scrollFullPageDown\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflippidippi%2FsVim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflippidippi%2FsVim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflippidippi%2FsVim/lists"}