Giter Site home page Giter Site logo

spikespaz / vscode-smoothtype Goto Github PK

View Code? Open in Web Editor NEW
60.0 7.0 4.0 1.36 MB

VS Code extension to add cursor transitions while typing, similar to MS Office and the Windows 10 Mail app.

Home Page: https://marketplace.visualstudio.com/items?itemName=spikespaz.vscode-smoothtype

License: MIT License

JavaScript 100.00%
typing animation vscode vscode-extension vscode-theme visual-studio-code theme cursor cursor-theme visual

vscode-smoothtype's Introduction

SmoothType for Visual Studio Code

DEPRECATION NOTICE

For all intents and purposes, this project is deprecated and archived. There will be no further development, and support is not guaranteed.

Please use the new editor.cursorSmoothCaretAnimation option in your user settings; the primary and only feature of this extension has been cored. The only thing that VSC cannot do is change the animation duration, this extension can.


This extension adds a smooth typing animation, similar to MS Office and the Windows 10 Mail app.

Downloads Rating

Get it from the Visual Studio Marketplace.

Note: Please scroll down and read the section labeled Important.


If you find this software useful and would like to show your appreciation, please consider making a small donation!

Preview

Preview #1 GIF

Commands

  • SmoothType: Enable Animation
  • SmoothType: Disable Animation
  • SmoothType: Reload Animation

Uninstalling

When you uninstall the extension, you must run the SmoothType: Disable Animation command from the command palette (Ctrl+Shift+P) to revert changes in VS Code first.

Additionally, if you're using the extension for fixing VS Code's title bar as mentioned in the Important section, you must also run Fix Checksums: Restore after SmoothType: Disable Animation and before uninstalling either extension.

Configuration

{
  // Duration in milliseconds for the cursor to travel from one character position (or line) to the next.
  "smoothtype.duration": 80,
  // Ask before restarting after a command is successfully run.
  "smoothtype.autoReload": false
}

After changing smoothtype.duration, you must run SmoothType: Enable Animation.

Important

Because Visual Studio Code does not have an API for modifying the editor CSS, this extension modifies the core index file that is loaded by the Electron browser. After enabling Smooth Typing, the editor may complain that it is corrupt, and ask you to reinstall. This is perfectly normal, and perfectly safe. Just click the cog on the top of the notification and elect to not be shown this message again.

The editor may also append [Unsupported] to the end of the window title. This is also fine.

If you would like to remove [Unsupported] from the title bar, I would recommend Jürg Lehni's Fix VSCode Checksums extension.

In the future I may implement the same functionality as that extension into SmoothType itself.

If you're on Linux where it is problematic to run VS Code as superuser, I have forked the extension to fix this issue. My pull request remains unmerged, but the functionality is improved.

It isn't on the Marketplace, but to use this extension just run the following commands.

$ cd ~
$ git clone https://github.com/spikespaz-forks/vscode-fix-checksums
$ cd vscode-fix-checksums/
$ npm install
$ npm install -g vsce
$ vsce package
$ code --install-extension vscode-fix-checksums-1.1.0.vsix

The last command may have a different filename, but there will be only one VSIX package in the directory.

After running those commands, run Reload Window and Fix Checksums: Apply in VS Code.

After every update, the extension must either be reloaded or enabled again.

You also have to restart Visual Studio Code after every reload or change.

vscode-smoothtype's People

Contributors

be5invis avatar orta avatar reli-msft avatar spikespaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-smoothtype's Issues

Integrated terminal support?

Can this be enabled for integrated terminal also?

I'm guessing it could be a bit odd in certain situations and might need separate config from editor windows.

Invalid path?

Hello, when I execute the command Reload Smooth Typing I get the following error:

Failed to reload Smooth Typing.

I investigated your source code and found out that the file "/vs/workbench/electron-browser/bootstrap/index.html" didn't exist in the first place!

const indexPath = path.join(appDirectory, "/vs/workbench/electron-browser/bootstrap/index.html");

I searched for another entry point to write the css custom code from

const injectionTemplate =
"\n\t\t" + beginComment +
"\n\t\t<style>.cursor { transition: all {duration}ms }</style>" +
"\n\t\t" + endComment;

I found this (for VSCode Version 1.28.1):

On my Mac (Mojave 10.14):
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.css

On my Windows 10 VM:
C:\Users\XX\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\workbench.main.css

On my Linux / Fedora 26 (4.11.8 x86_64) VM:
/usr/share/code/resources/app/out/vs/workbench/workbench.main.css

When placing .cursor{transition: all 80ms} at the end of the file, it worked.

Hope it help !

Failed to enable Smooth Typing

I'm guessing this is somewhat related to the need for elevated privileges? I'm running Arch Linux with the latest Code-Insiders build and can't run the enable command.

Admin privileges required?

When enabling the extension I get the message:

Run VS Code with admin privileges so the changes can be applied.

Is this required? When using vscode in workplace environments it's not always possible to use admin privileges.

"Running the contributed command:'extension.enableAnimation' failed."

When trying to enable smooth typing, the message "Running the contributed command:'extension.enableAnimation' failed." pops up.
The extension has worked before fine, though after updating it doesn't seem to anymore.

Using VS Code Iniders:

Version: 1.28.0-insider (system setup)
Commit: 8330a695712c43f861ce5c47533d82637d3cb374
Date: 2018-09-13T11:25:00.283Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.