Git Product home page Git Product logo

console-flash's Introduction

console-flash's People

Contributors

napthedev avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

fetchapi

console-flash's Issues

Enhancement Pretext

An option to include pretext. As I have cycled through the many console.log extensions all seem eventually support extension options for things like {label}, {filename}, {fullpath}, {line}, surrounding {function} or {class}. I think it would be better to build them into he pretext rather than hardcoding as individual options.

Example: pretext set to

📢 [{filename}:{line}] {function}() -> {label}:

becomes

📢 [index.js:12]: handleSubmit() -> index: 12);

This illustrates what I am suggesting, look in console.

CodeSandbox

Enhancement: Backtick Support

In addition to single and double quotes, support options of using backticks.

Would require a breaking change of setttings

from

console-flash.double-quotes with boolean true/false

to something like

console-flash.quotes with options ', " , `

Multiple Cursor Support - Sort Of

Other console.log extensions support multiple cursors like...

let var1 = 10;
// ...lots of code
let var2 = 20;

black is 2 multiple cursor selections of variables should give

let var1 = 10;
console.log("var1", var1);
// ... lots of code
let var2 = 20;
console.log("var2", var2);

current console flash behavior is

let var1 = 10;

// lots of code
let var2 = 20;
console.log("var2", var2);

Although addition of this is an idea. I would propose a slightly different implementation. If you think about it it you don't often want to know the value of var1 high in the code, but rather at a certain point in your code you want to know var1 and var2. Think about this...

let var1 = 10;
// ...lots of code
let var2 = 20;

black is 2 multiple cursor selections of variables and the proposed should give

let var1 = 10;
// ... lots of code
let var2 = 20;
console.log("var1, var2", 10, 20);

The console log would be inserted at the line after the last selection, and now the console log allows you to see each of those values easily at a specific point in your code. This seem much more useful to me.

Think about triggering multiple cursors (⌥ down), and clicking every variable you want, then trigger ⌘ ⇧ L and you get the goods!

This illustrates what I am suggesting, look in console.

CodeSandbox

Intelligent End cursor position - Enhancement

Identify if there is surrounding text such as

let a = 50;

cursor is at black selection, and in this case there is left text (let ) as well as right text ( = 50;) so do not reposition cursor at end...keep on coding

on the other hand if we have

my var

and cursor is the black selection, there is no non-whitespace text to the left or right and this line is going to be replaced with the console log anyways, so position the cursor at the end of insertion like

console.log("my var", myvar);

with the black selection

also apply this for empty lines

becomes

console.log( );

with the black selection

This illustrates what I am suggesting, look in console.

CodeSandbox

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.