You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+62-40Lines changed: 62 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ When creating a new bug report do:
16
16
17
17
### Improve Existing Issues
18
18
19
+
- Try to replicate bugs and describe the method if you're able to.
19
20
- Search for [duplicate issues](https://github.com/VSCodeVim/Vim/issues?q=is%3Aissue+is%3Aopen+cursor). See which thread(s) are more mature, and recommend the duplicate be closed, or just provide links to related issues.
20
21
- Find [old issues](https://github.com/VSCodeVim/Vim/issues?page=25&q=is%3Aissue+is%3Aopen) and test them in the latest version of VSCodeVim. If the issue has been resolved, comment & recommend OP to close (or provide more information if not resolved).
21
22
- Give thumbs up / thumbs down to existing issues, to indicate your support (or not)
@@ -29,40 +30,60 @@ When submitting a PR, please fill out the template that is presented by GitHub w
29
30
30
31
## First Time Setup
31
32
32
-
1. Install prerequisites:
33
-
- latest [Visual Studio Code](https://code.visualstudio.com/)
34
-
-[Node.js](https://nodejs.org/) v12.0.0 or higher
35
-
-[Yarn](https://classic.yarnpkg.com/) v1.x
36
-
-_Optional_: [Docker Community Edition](https://store.docker.com/search?type=edition&offering=community) 🐋
37
-
1. In a terminal:
33
+
1. Install prerequisites:
38
34
39
-
```bash
40
-
# fork and clone the repository
41
-
git clone git@github.com:<YOUR-FORK>/Vim.git
42
-
cd Vim
35
+
-[Visual Studio Code](https://code.visualstudio.com/), latest stable or insiders
36
+
-[Node.js](https://nodejs.org/) v14.0.0 or higher
37
+
-[Yarn](https://classic.yarnpkg.com/) v1.x
38
+
-_Optional_: [Docker Community Edition](https://store.docker.com/search?type=edition&offering=community) 🐋
43
39
44
-
# Install the dependencies
45
-
yarn install
40
+
2. Fork and clone repository:
46
41
47
-
# Open in VSCode
48
-
code .
42
+
```bash
43
+
git clone git@github.com:<YOUR-FORK>/Vim.git
44
+
cd Vim
45
+
```
49
46
50
-
# Choose the "Build, Run Extension" in the dropdown of VSCode's
51
-
# debug tab to build and run the extension.
52
-
# Or run tests by selecting the appropriate drop down option
47
+
3. Build extension:
53
48
54
-
# Alternatively, build and run tests through gulp and npm scripts
55
-
npx gulp build # build
56
-
npx gulp prepare-test # build tests
57
-
yarn test# test (must close all instances of VSCode)
49
+
```bash
50
+
# Install the dependencies
51
+
yarn install
58
52
59
-
# Only available if Docker is installed and running
60
-
npx gulp test# run tests inside Docker container
61
-
npx gulp test --grep testSuite # run only tests/suites filtered by js regex inside container
53
+
# Open in VS Code
54
+
code .
62
55
63
-
# Alternatively, build .vsix extension and load it into VSCode for manual testing
64
-
yarn run vsce package --web # build vim-xxx.vsix
65
-
```
56
+
# Build with one of these...
57
+
npx gulp build-dev # Fast build for development
58
+
npx gulp build # Slow build for release
59
+
yarn watch # Fast build whenever a file changes
60
+
```
61
+
62
+
4. Run extension using VS Code's "Run and Debug" menu
63
+
64
+
5. Run tests:
65
+
66
+
```bash
67
+
# If Docker is installed and running:
68
+
npx gulp test# Run tests inside Docker container
69
+
npx gulp test --grep <REGEX># Run only tests/suites matching <REGEX> inside Docker container
70
+
71
+
# Otherwise, build and run the tests locally:
72
+
npx gulp build # Build
73
+
npx gulp prepare-test # Build tests
74
+
yarn test# Test (must close all instances of VS Code)
75
+
```
76
+
77
+
6. Package and install extension:
78
+
79
+
```bash
80
+
# Package extension into `vim-<MAJOR>.<MINOR>.<PATCH>.vsix`
81
+
# (This can be opened and inspected like a .zip file)
82
+
yarn package
83
+
84
+
# Install packaged extension to your local VS Code installation
@@ -90,43 +111,44 @@ Consists of two data structures:
90
111
91
112
#### How it works
92
113
93
-
1. `handleKeyEventHelper` is called with the most recent keypress.
94
-
2. `Actions.getRelevantAction` determines if all the keys pressed so far uniquely specify any action in actions.ts. If not, we continue waiting for keypresses.
95
-
3. `runAction` runs the action that was matched. Movements, Commands and Operators all have separate functions that dictate how to run them - `executeMovement`, `handleCommand`, and `executeOperator` respectively.
96
-
4. Now that we've updated VimState, we run `updateView` with the new VimState to "redraw"VSCode to the new state.
114
+
1.`handleKeyEventHelper` is called with the most recent keypress.
115
+
2.`Actions.getRelevantAction` determines if all the keys pressed so far uniquely specify any action in actions.ts. If not, we continue waiting for keypresses.
116
+
3.`runAction` runs the action that was matched. Movements, Commands and Operators all have separate functions that dictate how to run them - `executeMovement`, `handleCommand`, and `executeOperator` respectively.
117
+
4. Now that we've updated `VimState`, we run `updateView` with the new VimState to "redraw" VS Code to the new state.
This is my hack to simulate a click event based API in an IDE that doesn't have them (yet?). I check the selection that just came in to see if it's the same as what I thought I previously set the selection to the last time the state machine updated. If it's not, the user _probably_ clicked. (But she also could have tab completed!)
101
122
102
123
## Release
103
124
125
+
Before you push a release, be sure to make sure the changelog is updated!
1. Bump the package version based off the semver supplied. Supported values: patch, minor, major.
114
-
2. Create a changelog using [github-changelog-generator](https://github.com/github-changelog-generator/github-changelog-generator).
115
-
3. Create a Git commit with the above changes.
116
-
4. Create a Git tag using the new package version.
136
+
1. Bump the package version based off the semver supplied. Supported values: patch, minor, major.
137
+
2. Create a Git commit with the above changes.
138
+
3. Create a Git tag using the new package version.
117
139
118
140
In addition to building and testing the extension, when a tag is applied to the commit, the CI server will also create a GitHub release and publish the new version to the Visual Studio marketplace.
119
141
120
142
## Troubleshooting
121
143
122
-
### Visual Studio Code Slowdown
144
+
### VS Code Slowdown
123
145
124
146
If you notice a slowdown and have ever run `yarn test` in the past instead of running tests through VSCode, you might find a `.vscode-test/` folder, which VSCode is continually consuming CPU cycles to index. Long story short, you can speed up VSCode by:
125
147
126
148
```bash
127
-
$ rm -rf .vscode-test/
149
+
rm -rf .vscode-test/
128
150
```
129
151
130
-
## Styleguide
152
+
## Style Guide
131
153
132
154
Please try your best to adhere to our [style guidelines](https://github.com/VSCodeVim/Vim/blob/master/STYLE.md).
0 commit comments