All Projects → DavidBabel → clever-vscode

DavidBabel / clever-vscode

Licence: MIT license
Clever help to put vscode to the next level

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to clever-vscode

Shrinktome
📘Shrink facebook by 5% every 10th second. You're welcome!
Stars: ✭ 15 (-11.76%)
Mutual labels:  productivity, extension
Fiscript
Execute custom scripts from the MacOS context menu (CTRL+click) in Finder.
Stars: ✭ 372 (+2088.24%)
Mutual labels:  productivity, extension
Gata
Bookmarks made better
Stars: ✭ 17 (+0%)
Mutual labels:  productivity, extension
Booklight
Your Chrome Alfred - An Extension to provide spotlight-like interface for your bookmarks
Stars: ✭ 98 (+476.47%)
Mutual labels:  productivity, extension
Dddplus
🔥 A lightweight flexible development framework for complex business architecture with full ecosystem!轻量级业务中台开发框架,中台架构的顶层设计和完整解决方案!
Stars: ✭ 107 (+529.41%)
Mutual labels:  productivity, extension
Line-Clipper
💻Efficient navigation between browser and IDE while working on GitHub.
Stars: ✭ 64 (+276.47%)
Mutual labels:  productivity, extension
Marinara
Pomodoro® time management assistant for Chrome
Stars: ✭ 1,806 (+10523.53%)
Mutual labels:  productivity, extension
block-site
Chrome extension that blocks access to distracting websites to improve your productivity.
Stars: ✭ 81 (+376.47%)
Mutual labels:  productivity, extension
pinpoint
Keystroke launcher and productivity tool. macOS Spotlight and Alfred for Windows. Alternative to Wox.
Stars: ✭ 105 (+517.65%)
Mutual labels:  productivity
hammerspoon
Boosts productivity and adds useful features to OSX.
Stars: ✭ 18 (+5.88%)
Mutual labels:  productivity
zce-cli
A CLI tool for my personal productivity, Scaffolding tools move to zce/caz 👉
Stars: ✭ 36 (+111.76%)
Mutual labels:  productivity
remote-manager
This tool is intended for mass management and monitoring of remote servers. Getting information about the status of remote servers, analyze it, provide maintenance as easily as possible, extend for your needs.
Stars: ✭ 27 (+58.82%)
Mutual labels:  productivity
Unity.TransformSetterInterceptor
Easily find out what exactly is changing specific transform position / rotation / scale
Stars: ✭ 76 (+347.06%)
Mutual labels:  productivity
Netlify
A VS Code extension that displays your Netlify build statuses and more!
Stars: ✭ 23 (+35.29%)
Mutual labels:  extension
Flask-GraphQL-Auth
(UNMAINTAINED. FEEL FREE TO FORK) 🐍A Pythonic way to provide JWT authentication for Flask-GraphQL
Stars: ✭ 64 (+276.47%)
Mutual labels:  extension
XTranslate
Easy translate text on web pages (chrome extension)
Stars: ✭ 64 (+276.47%)
Mutual labels:  productivity
World-Scribe
An Android app for fictional world-building
Stars: ✭ 31 (+82.35%)
Mutual labels:  productivity
DropPoint
Make drag-and-drop easier using DropPoint. Drag content without having to open side-by-side windows
Stars: ✭ 303 (+1682.35%)
Mutual labels:  productivity
CNeptune
CNeptune improve productivity & efficiency by urbanize .net module with meta-code to lay foundation for frameworks
Stars: ✭ 30 (+76.47%)
Mutual labels:  productivity
work-hard
Get things done, that's it.
Stars: ✭ 16 (-5.88%)
Mutual labels:  productivity

Clever Visual Studio Code

Clever vscode was initially a personnal project to provide some missing features to the editor. It inspired from Sublime Text, Google Chrome and iTerm worflows.

After sharing it with almost all my friends they motivate me to push it for cummunity.

Suggestions, PR or ideas for embed macros are very welcome.

Think about rating and review.


Features

Here are all the awesome current features of Clever (you can browse behaviour gifs below):

Every feature comes with keybinding suggestions. On install, this extension does not set any keybinding to prevent issues with different countries keyboard compatibility and allow you to only use the keybindings you need.

So you have to set it manually in your keybindings.json. We are developpers, we made the json version ;)

Fast block select

Demo

Note that this is a single same shortcut allowing this result :

Binding suggestion:

{
  "key": "ctrl+r",
  "mac": "cmd+r",
  "command": "clever.blockSelect.cleverSelect",
  "when": "editorTextFocus"
}

If needed, the following commands are also provided :

clever.blockSelect.quotes; // " " , ' ' , ` `
clever.blockSelect.parenthesis; // ( )
clever.blockSelect.squareBrackets; // [ ]
clever.blockSelect.curlyBrackets; // { }
clever.blockSelect.angleBrackets; // <AngleBracket>  </AngleBracket>
clever.blockSelect.inTag; // <> inTag </>

I recommand you to bind them to something like cmd+k ' or cmd+k ( etc ... It's very handy and may not create binding conflicts.

Toggle maximise current editor

Demo

Note: this is especially helpfull on a side comparaison during commit diff

Binding suggestion:

{
  "key": "shift+ctrl+enter",
  "mac": "shift+cmd+enter",
  "command": "clever.maximize.toggleWithSidebar",
  "when": "editorTextFocus"
}

If needed, the following command is also provided :

clever.maximize.toggleWithoutSidebar;

Advanced macros

The Macro feature allows you to execute a list of vscode commands or any extensions commands, including "clever vscode" ones.

It also provides two helpers commands (see examples below for API):

  • a wait helper to be able to manage async commands (especially extension ones which may miss to await callbacks).
  • a type helper to insert text, like a "programmatic snippet".

Each macro is a "config / keybinding" combo. The wanted macro got a name, and an array of commands :

Add fragment macro example

Demo

Configs

{
  "clever.macros": {
    "exampleAddFragment": [ // macro name to remember in bindings
      "type:<>\n\n</>",     // type command with text param
      "cursorUp"            // 2nd command
    ],
    "betterAddFragment": [
      "type:<>\n$1\n</>"    // type also support snippet syntax
    ]
    // "otherMacro": [/* commands list */]
    // ...
  }
}

Binding suggestion:

{
  "key": "whatever you want",
  "command": "clever.macros.betterAddFragment",
  "when": "editorTextFocus"
}

Note: to find every commands available, browse it in the shortcut palette cmd+k cmd+s

Sublime Text file navigation macro example

Another example, this macro allow to fastOpen a file without loosing focus from the file explorer (sublime text style).

Demo

This workflow is amazing, it allows you to not use your mouse to open quickly multiple files. Check the advanced config guide to create a enhanced navigation system into vscode.

Configs

{
  "clever.macros": {
    "fastOpenFile": [
      "list.select",                   // open current hover file
      "wait:20",                       // wait for 20ms before next (default 50ms)
      "workbench.action.focusSideBar"  // send focus back to the file explorer
    ],
    "openAndKeepFile": [
      "list.select",                   // open current hover file
      "workbench.action.files.save",   // this will keep the file open
      "wait:20",                       // wait for 20ms before next (default 50ms)
      "workbench.action.focusSideBar"  // send focus back to the file explorer
    ],
    "openFile": [
      "list.select",                   // open current hover file
      "workbench.action.files.save",   // this will keep the file open
    ]
  }
}

Binding suggestion:

Note: to be able to map "enter" here you have to unbind it first. (see the advanced config guide to do so)

{
  "key": "right",
  "command": "clever.macros.fastOpenFile",
  "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
},
{
  // note : "enter" must be unbind first
  "key": "enter",
  "command": "clever.macros.openAndKeepFile",
  "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
},
{
  "key": "left",
  "command": "clever.macros.openFile",
  "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
}

Rebind any key to another

The following will insert a b when you type a j. It works with any key, especially special characters.

Configs

{
  "clever.macros": {
    "b": ["type:b"]
  }
}

Binding example:

{
  "key": "j",
  "command": "clever.macros.b",
  "when": "editorTextFocus"
}

Quick quotes switch

Demo

Binding suggestion:

{
  "key": "alt+3",
  "mac": "cmd+`",
  "command": "clever.string.nextQuotes",
  "when": "editorTextFocus"
}

Toggle endline

Demo

Binding suggestion:

({
  "key": "ctrl+oem_period",
  "mac": "cmd+;",
  "command": "clever.toggleEnd.semicolon",
  "when": "editorTextFocus"
},
{
  "key": "ctrl+oem_2",
  "mac": "cmd+:",
  "command": "clever.toggleEnd.colon",
  "when": "editorTextFocus"
},
{
  "key": "ctrl+oem_comma",
  "mac": "cmd+[Comma]",
  "command": "clever.toggleEnd.comma",
  "when": "editorTextFocus"
})

Insert incremental numbers or letters

Demo

Binding suggestion:

({
  "key": "shift+ctrl+0",
  "mac": "shift+cmd+0",
  "command": "clever.multipast.0toN",
  "when": "editorTextFocus"
},
{
  "key": "shift+ctrl+1",
  "mac": "shift+cmd+1",
  "command": "clever.multipast.1toN",
  "when": "editorTextFocus"
},
{
  "key": "shift+ctrl+a",
  "mac": "shift+cmd+a",
  "command": "clever.multipast.atoN",
  "when": "editorTextFocus"
},
{
  "key": "shift+alt+ctrl+a",
  "mac": "shift+alt+cmd+a",
  "command": "clever.multipast.AtoN",
  "when": "editorTextFocus"
})

Fast cursor navigation

Demo

Configs

// Clever: number of lines of small jumps
"clever.fastJump.small.linesToJump": 5,
// Clever: number of lines of large jumps
"clever.fastJump.large.linesToJump": 10

Binding suggestion:

({
  "key": "ctrl+up",
  "mac": "cmd+up",
  "command": "clever.fastJump.small.up",
  "when": "editorTextFocus"
},
{
  "key": "ctrl+down",
  "mac": "cmd+down",
  "command": "clever.fastJump.small.down",
  "when": "editorTextFocus"
},
{
  "key": "shift+ctrl+up",
  "mac": "shift+cmd+up",
  "command": "clever.fastJump.small.selectUp",
  "when": "editorTextFocus"
},
{
  "key": "shift+ctrl+down",
  "mac": "shift+cmd+down",
  "command": "clever.fastJump.small.selectDown",
  "when": "editorTextFocus"
},
{
  "key": "alt+ctrl+pageup",
  "mac": "alt+cmd+pageup",
  "command": "clever.fastJump.big.up",
  "when": "editorTextFocus"
},
{
  "key": "alt+ctrl+pagedown",
  "mac": "alt+cmd+pagedown",
  "command": "clever.fastJump.big.down",
  "when": "editorTextFocus"
},
{
  "key": "shift+alt+ctrl+pageup",
  "mac": "shift+alt+cmd+pageup",
  "command": "clever.fastJump.big.selectUp",
  "when": "editorTextFocus"
},
{
  "key": "shift+alt+ctrl+pagedown",
  "mac": "shift+alt+cmd+pagedown",
  "command": "clever.fastJump.big.selectDown",
  "when": "editorTextFocus"
})

Shortcuts

Clever also provide some usefull shortcuts out of the box.

Insert curly braces

Demo

Binding suggestion:

{
  "key": "alt-4",
  "mac": "cmd+{",
  "command": "clever.fastInsert.curly",
  "when": "editorTextFocus"
}

Insert array

Demo

Binding suggestion:

{
  "key": "alt+5",
  "mac": "cmd+{",
  "command": "clever.fastInsert.array",
  "when": "editorTextFocus"
},

Insert arrow function

Demo (not related to intellisense, this is a keyboard shortcut)

Binding suggestion:

{
  "key": "ctrl+3",
  "mac": "cmd+=",
  "command": "clever.fastInsert.arrowFunction",
  "when": "editorTextFocus"
}

Insert template string var

Demo

Binding suggestion:

{
  "key": "ctrl+oem_1",
  "mac": "cmd+$",
  "command": "clever.string.insertTemplateVar",
  "when": "editorTextFocus"
}

Create the best editor

Here is a complete guide to custom your editor the right way.

This does not need any extension, only modify the editor settings.json and keybindings.json the right way.

// WIP

Take a look at https://vscodecandothat.com/. You will learn a lot a things, for sure.

Contribs

If you want to help, find a bug or just correct an english mistake please create an issue.

Inspirations & credits

Why embed other libraries

For me, the features provided by the embed library are from far, the big miss in vscode base commands. I had to modify some of it to add new awesome features.

Also, as i said in introduction, i made this library for myself initially, and include them to be sure they will never disapear or stop to be maintained with a possible incompatible vscode version.

License

MIT. Copyright (c) David Babel.

Donations: If you like this package, want it to be maintained and use it to makes millions, you can buy me a coffee or a beer 🍺.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].