Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
- Windows titles (chapter1) now uses the kbd-html tags rather than code
  environment
- Added section on "Show problems" to the "Jump to error" section, as
  highlighted in Sch3lp#6
  • Loading branch information
stijn-dejongh committed Aug 19, 2023
1 parent 7a29134 commit cfc0321
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 26 deletions.
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ If you are using a Mac, there is a version available for you in [./macOs](./macO

The titles in the outline below are links to the different chapters.

Each chapter contains a thorough explanation and exercises.
[Windows hotkey tutorial](./windows/outline.md)
Eventhough the progression in these chapters might seem to be naturally increasing in difficulty, you don't need to think of them as thresholds.
Each chapter contains a thorough explanation and exercises.
Alhough the progression in these chapters might seem to be naturally increasing in difficulty, you don't need to think of them as thresholds.
The only reason there are chapters is to help your brain make paths even better by trying to categorize certain types of shortcuts so you'll think of them sooner in real life.

## Good Luck, Have Fun!
Expand All @@ -54,7 +53,9 @@ The example code is published under the [MIT License](LICENSE.md).

The mac and windows logo icons used are under the [Creative Common License (Attr. 3 Unported)](http://creativecommons.org/licenses/by/3.0/), and are completely attributed to the artist [Bogdan Rosu](https://www.iconfinder.com/bogdanrosu).

# Contributors
## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
Expand All @@ -79,15 +80,5 @@ The mac and windows logo icons used are under the [Creative Common License (Attr

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
7 changes: 5 additions & 2 deletions macOS/chapter2.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ Now use ![Mac](./icons/glyph-apple-20.png)<kbd>&#8963;</kbd> + <kbd>Shift</kbd>

Move to the top of the file with ![Mac](./icons/glyph-apple-20.png)<kbd>Fn</kbd> + <kbd>&#8984;</kbd> + <kbd>&#8592;</kbd> and from there press
<kbd>F2</kbd>. This should navigate
your
cursor to the class named `Chapter2` because IntelliJ marks it as being _unused_.
your cursor to the class named `Chapter2` because IntelliJ marks it as being _unused_.

> **TIP:**
> If you want to see which error your IDE has detected, check out the "Problems" pane.
> You can open this message view by using the combination ![Mac](./icons/glyph-apple-20.png)<kbd>&#8984;</kbd> + <kbd>6</kbd>
If you keep pressing ![Mac](./icons/glyph-apple-20.png)<kbd>F2</kbd> it should keep cycling your cursor over the _unused_ warnings. In between the methods `jump()` and `camel()`,
paste the following:
Expand Down
10 changes: 5 additions & 5 deletions windows/chapter1.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ We recommend that you follow along with each exercise in this section to reinfor
Whether you are a seasoned developer or just starting with IntelliJ IDEA, this tutorial series will help you become more proficient and productive.
So let's get to it!

## ![Windows](icons/glyph-windows-32.png)ctrl+c, ctrl+v
## ![Windows](icons/glyph-windows-32.png)<kbd>ctrl</kbd>+<kbd>c</kbd>, <kbd>ctrl</kbd>+<kbd>v</kbd>
To copy text, select the text you want to copy using your mouse or keyboard, then press ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd> + <kbd>C</kbd>. To paste the copied text,
move your cursor to the desired location and press ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd> + <kbd>V</kbd>.

Expand All @@ -35,7 +35,7 @@ First press ![Windows](icons/glyph-windows-20.png)<kbd>alt</kbd> + <kbd>h</kbd>
**bonus:** Try opening the Productivity Guide using ![Windows](icons/glyph-windows-20.png)<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>A</kbd>, then type in "Productivity Guide" in the
search bar.

## Indenting, formatting with ![Windows](icons/glyph-windows-20.png)`tab`, `shift+tab`
## Indenting, formatting with ![Windows](icons/glyph-windows-20.png)<kbd>tab</kbd>, <kbd>shift</kbd>+<kbd>tab</kbd>
Open `Fugly.java`, use selection and indent the test builder patterns properly.
For this exercise, you can use <kbd>shift</kbd> and your arrow keys to select lines.
Use <kbd>Tab</kbd> to indent them manually, or use ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>l</kbd> to automatically format the selected lines.
Expand All @@ -44,12 +44,12 @@ Hint: When manually indenting, first use ![Windows](icons/glyph-windows-20.png)<
side, then <kbd>Tab</kbd> the entire selection into its first indentation, decrease your selection and <kbd>Tab</kbd> that into its second
indentation. Rinse and repeat.

## Auto-indent with ![Windows](icons/glyph-windows-20.png)`ctrl+alt+l`
## Auto-indent with ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd>+<kbd>alt</kbd>+<kbd>l</kbd>
You can use this combination on specific lines, as well on entire files.
Open FuglyToo.java, select a couple of lines starting with the `.withFace(face()` line and press ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>l</kbd>.
Now empty your selection (select nothing), and press ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>l</kbd> again.

## Undo, Redo ![Windows](icons/glyph-windows-20.png)`ctrl+z` and ![Windows](icons/glyph-windows-20.png)`ctrl+shift+z`
## Undo, Redo ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd>+<kbd>z</kbd> and ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>z</kbd>

In most editors, `Redo` is mapped to ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd> + <kbd>y</kbd>. Not so in IntelliJ.
This can lead to hilarious (or super annoying) situations where you'll lose your _undo buffer_.
Expand Down Expand Up @@ -77,7 +77,7 @@ As most people will have the reflex to press ![Windows](icons/glyph-windows-20.p
Use ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd> + <kbd>y</kbd>, then try ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>z</kbd> to attempt and redo the revert you wish to reapply.

Try ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd> + <kbd>z</kbd> and see what that does. Try ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>z</kbd> again now.

`
Keep this strange behavior in mind when you work in IntelliJ, or in another editor that doesn't have ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd> + <kbd>y</kbd> for _Redo_ :)

---
Expand Down
14 changes: 9 additions & 5 deletions windows/chapter2.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Chapter 2 - Navigation
[_Back to outline_](outline.md)

## Word-skipping ![Windows](icons/glyph-windows-32.png)`ctrl+arrows`
## Word-skipping ![Windows](icons/glyph-windows-32.png)<kbd>ctrl</kbd>+<kbd>arrows</kbd>

Open `Chapter2.java`, and place your cursor in front of the word _"The"_ of the popular phrase, and tap ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd> + <kbd>&#8594</kbd> 8 times.
You should now have your cursor at the beginning of the word _"camel"_.

## Begin/End of Line ![Windows](icons/glyph-windows-32.png)`home`, `end`
## Begin/End of Line ![Windows](icons/glyph-windows-32.png)<kbd>home</kbd>, <kbd>end</kbd>
Still in `Chapter2.java`, place your cursor at the start of the popular phrase, and press <kbd>end</kbd>.
Press <kbd>home</kbd> once, look at your cursors position, then press <kbd>home</kbd> again and see what happens. Press <kbd>home</kbd> one more
time.
Expand All @@ -16,7 +16,7 @@ home</kbd>.

Enjoy annoying anyone that might be watching over your shoulder.

## Begin/End of File ![Windows](icons/glyph-windows-32.png)`ctrl+home`, `ctrl+end`
## Begin/End of File ![Windows](icons/glyph-windows-32.png)<kbd>ctrl</kbd>+<kbd>home</kbd>, <kbd>ctrl</kbd>+<kbd>end</kbd>
Try out ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd> + <kbd>home</kbd> and ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd> + <kbd>end</kbd> in `Chapter2.java`.
Alternatively, you can accomplish the same using ![Windows](icons/glyph-windows-20.png)<kbd>PgUp</kbd> and <kbd>PgDn</kbd>.

Expand All @@ -40,16 +40,20 @@ They all appear when you type CamelHumps and IntelliJ remembers your last action
> Other tools, like SublimeText, have different key combinations to skip the entire word (<kbd>ctrl</kbd> + <kbd>&#8594;</kbd>), or skip based on
> CamelCasing (<kbd>alt</kbd> + <kbd>&#8594;</kbd>).
## Jumping methods ![Windows](icons/glyph-windows-32.png)`alt+up,down`
## Jumping methods ![Windows](icons/glyph-windows-32.png)<kbd>alt</kbd>+<kbd>up</kbd>/<kbd>down</kbd>

In `Chapter2.java`, place your cursor at the `theQuickBrownFoxJumpedOverTheLazyCamel` method.
Press ![Windows](icons/glyph-windows-20.png)<kbd>alt</kbd> + <kbd>&#8595;</kbd> a few times and see what happens.
Now use ![Windows](icons/glyph-windows-20.png)<kbd>alt</kbd> + <kbd>&#8593;</kbd> to go back the way you came.

## Jump to "error" ![Windows](icons/glyph-windows-32.png)`F2`
## Jump to "error" ![Windows](icons/glyph-windows-32.png)<kbd>F2</kbd>
Move to the top of the file with ![Windows](icons/glyph-windows-20.png)<kbd>ctrl</kbd> + <kbd>Home</kbd> and from there press ![Windows](icons/glyph-windows-20.png)<kbd>F2</kbd>.
This should navigate your cursor to the class named `Chapter2` because IntelliJ marks it as being _unused_.

> **TIP:**
> If you want to see which error your IDE has detected, check out the "Problems" pane.
> You can open this message view by using the combination ![Windows](icons/glyph-windows-20.png)<kbd>Alt</kbd> + <kbd>6</kbd>
If you keep pressing ![Windows](icons/glyph-windows-20.png)<kbd>F2</kbd> it should keep cycling your cursor over the _unused_ warnings. In between the methods `jump()` and `camel()`,
paste the following:

Expand Down

0 comments on commit cfc0321

Please sign in to comment.