1 Star 0 Fork 0

三字经 / vscode-power-mode

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

VSCODE POWER MODE!!!

Power Mode is one of the most requested extensions for VS Code. Unfortunately, they said it couldn't be done...

not-implementable

However, after seeing this list and realizing that VS Code was the only modern editor without it, I knew I had to try. I couldn't let VS Code live in the shadow of its big brother or Atom.

I present you, VSCODE POWER MODE!!! (now with atom-like explosions!)

demo

To enable, add "powermode.enabled": true to your settings.

Features:

  • NEW: Atom-like explosions!
  • NEW: Multiple explosion sets to choose from
  • Status bar indicator for combo count and timer
  • Explosions and screen shake effect when power mode is reached
  • Extremely Customizable

Choose Your Explosions:

You can now choose explosions with a single setting: powermode.presets. Check out the options below (note: it looks better IRL than in these gifs):

NEW! Rift (Simple)

simple rift

New! Rift (Exploding)

exploding rift

Note: If your code becomes hard to read, you may need to set editor.lineHighlightBackground in your user or workspace settings. For example, if your theme is Default Dark+, try:

"editor.lineHighlightBackground": "#1E1E1EAA"

Particles

particles

Fireworks

fireworks

Flames

flames

Magic

magic

Clippy

clippy

Configuration:

Hopefully power mode will work great for you out of the box, but if it doesn't I've tried to make power mode as configurable as possible. Tweak the settings for performance or for fun. From doge to clippy, the only limit is your imagination. Some of the options are explained below:

  • powermode.customExplosions: Choose your own explosions with base64 encoded gifs or full URIs (i.e. "data:image/gif;base64,1337GIF", "C:/my/cat/gif", "https://coolgif.io")
  • powermode.backgroundMode: mask will use the gif as a mask, letting the shape of the gif through with the color of the text. image will use the gif itself as the background. mask
  • powermode.gifMode: restart will restart a gif each time it is displayed, continue will play the gif from the place it stopped. continue is particularly useful when you only have 1 visible gif, restart is useful when you have multiple, but may reduce performance.
  • powermode.maxExplosions: Reducing this will reduce the number of explosions rendered at once.
  • powermode.explosionFrequency: Increasing this will increase the number of keystrokes between explosions. It means that there will be gaps between explosions as you type but may help performance.
  • powermode.customExplosions: Provide your own gifs to use (And share them here)
  • powermode.customCss: Changes the CSS applied to the "after" pseudoelement. You can experiment with ways to make it look or perform better.
  • powermode.explosionOrder: sequential will cycle through explosions in order, random will pick one randomly, and providing a number will select the explosion at that (zero-based) index in the list of explosions.

Known Issues

They were right when they said it can't be done. At least not properly. VS Code does not expose the DOM as part of the API. Instead this extension relies on using TextEditorDecorations to set css properties for ranges in the editor. This has a few limitations:

  • The cursor doesn't move with the text as it shakes
  • When deleting characters, the explosion will briefly move to the beginning of the line. This is because I am using an "after" pseudoclass to apply the decorations, and when you delete the letter that it is anchored to it repositions to the next anchor which is the entire line.
  • I have to use gifs instead of CSS animations for the particles/explosions
  • "Vertical Shake" only works if editor.renderWhitespace is turned on. I don't know why, but if you want vertical shake without seeing the whitespace being rendered, you can use these settings:
"editor.renderWhitespace": "all",
"workbench.colorCustomizations": {
    "editorWhitespace.foreground": "#FFFFFF00"
},

Help Wanted:

If you can provide some lightweight, attractive gifs that improve how power mode looks and performs, I would be happy to include them! Share them here.

Acknowledgements:

  • Thanks to @RPuffer for providing the incredible gifs added in version 2.1
  • Thanks to @darkvertex for providing the awesome gifs added in version 2.0
  • Thanks to @horvay for giving me ideas to get around the limitations I had in v0.0.1

Changelog:

  • v2.2.0
    • Added powermode.enableStatusBarComboCounter and powermode.enableStatusBarComboTimer to toggle status bar items
    • Added new presets
    • Bug fixes
  • v2.1.0
    • Fixed #20 (Thanks @kirkone)
  • v2.0.0
    • Added powermode.presets to choose between different built-in explosion sets
    • Added powermode.backgroundMode to allow 'atom like' explosions (explosions that match the color of the text being typed)
    • Breaking: Removed powermode.legacyMode
    • Breaking: Renamed powermode.explosionMode to powermode.explosionOrder
    • Breaking: Removed powermode.settingSuggestions
  • v1.2.1
    • Remove intellisense for CSS configuration due to this issue
  • v1.2.0
    • Suggest configurations in settings.json
  • v1.1.0
    • Configure explosion duration
    • Configure explosion "mode": random, sequential, or a specific explosion
    • Reduce default "max explosions" from 5 to 1
  • v1.0.0
    • True power mode! Explosions now extend outside the boundaries of a letter
    • Eliminated two of the default explosions that didn't look good when expanded
    • Added new explostion configuration options (explosion number, size, and frequency)
    • Added a Legacy Mode configuration option
    • Shake now resets after 1 second without typing (Thanks @horvay)
  • v0.0.1
    • Initial release
    • Explosions work, but limited to size of characters
MIT License Copyright (c) 2017 Cody Hoover Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/mll/vscode-power-mode.git
git@gitee.com:mll/vscode-power-mode.git
mll
vscode-power-mode
vscode-power-mode
master

搜索帮助