File the issue here.
You'd like to fix a bug or implement a feature? Great! Before getting started, understand Vimium's design principles and the goals of the maintainers.
When people first start using Vimium, it provides an incredibly powerful workflow improvement and it makes them feel awesome. Surprisingly, Vimium is applicable to a huge, broad population of people, not just users of Vim.
In addition to power, a secondary goal of Vimium is approachability: minimizing the barriers which prevent a new user from feeling awesome. Many of Vimium's users haven't used Vim before -- about 1 in 5 Chrome Store reviews say this -- and most people have strong web browsing habits forged from years of browsing. Given that, it's a great experience when Vimium feels like a natural addition to Chrome which augments, but doesn't break, the user's current browsing habits.
Principles:
- Easy to understand. Even if you're not very familiar with Vim. The Vimium video shows you all you need to know to start using Vimium and feel awesome.
- Reliable. The core feature set works on most sites on the web.
- Immediately useful. Vimium doesn't require any configuration or doc-reading before it's useful. Just
watch the video or hit
?
. You can transition into using Vimium piecemeal; you don't need to jump in whole-hog from the start. - Feels native. Vimium doesn't drastically change the way Chrome looks or behaves.
- Simple. The core feature set isn't overwhelming. This principle is particularly vulnerable as we add to Vimium, so it requires our active effort to maintain this simplicity.
- Code simplicity. Developers find the Vimium codebase relatively simple and easy to jump into. This provides us an active dev community.
Goals of the maintainers
The maintainers of Vimium are @smblott-github and @philc. We have limited bandwidth, which influences which PRs we can review and merge.
Our goals are generally to keep Vimium small, maintainable, and really nail the broad appeal use cases. This is in contrast to adding and maintaining an increasing number of complex or niche features. We recommend those live in forked repos rather than the mainline Vimium repo.
PRs we'll likely merge:
- Reflect all of the Vimium design principles.
- Are useful for lots of Vimium users.
- Have simple implementations (straightforward code, few lines of code).
PRs we likely won't:
- Violate one or more of our design principles.
- Are niche.
- Have complex implementations -- more code than they're worth.
Tips for preparing a PR:
- If you want to check with us first before implementing something big, open an issue proposing the idea. You'll get feedback from the maintainers as to whether it's something we'll likely merge.
- Try to keep PRs around 50 LOC or less. Bigger PRs create inertia for review.
Vimium is written in Coffeescript, which compiles to Javascript. To install Vimium from source:
- Install Coffeescript v1 (
npm install --global coffeescript@~1
). - Run
cake build
from within your vimium directory. Any coffeescript files you change will now be automatically compiled to Javascript.
On Chrome/Chromium:
- Navigate to
chrome://extensions
- Toggle into Developer Mode
- Click on "Load Unpacked Extension..."
- Select the Vimium directory.
On Firefox:
For 'local storage' to work while using the temporary addon, you need to add an 'application' section to the manifest with an arbitrary ID that is unique for you, for example:
"applications": {
"gecko": {
"id": "vimium@example.net"
}
},
After that:
- Open Firefox
- Enter "about:debugging" in the URL bar
- Click "Load Temporary Add-on"
- Open the Vimium directory and select any file inside.
- Run
cake autobuild
to watch for changes to coffee files, and have the .js files automatically regenerated
Our tests use shoulda.js and PhantomJS. To run the tests:
git submodule update --init --recursive
-- this pulls in shoulda.js.- Install PhantomJS.
npm install path@0.11
to install the Node.js Path module, used by the test runner.npm install util
to install the util module, used by the tests.cake build
to compile*.coffee
to*.js
cake test
to run the tests.
You can find out which portions of code need them by looking at our coverage reports. To generate these reports:
- Download JSCoverage or
brew install jscoverage
npm install temp
cake coverage
will generate a coverage report in the form of a JSON file (jscoverage.json
), which can then be viewed using jscoverage-report. See jscoverage-report's README for more details.
-
We follow the recommendations from this style guide.
-
We follow two major differences from this style guide:
- Wrap lines at 110 characters instead of 80.
- Use double-quoted strings by default.
-
When writing comments, uppercase the first letter of your sentence, and put a period at the end.
-
If you have a short conditional, feel free to put it on one line:
# No if i < 10 return # Yes return if i < 10