Git Product home page Git Product logo

vim-increment-array's Introduction

vim-increment-array

A snippet of .vimrc that allows you to dumb increment an array (Currently only tested in JavaScript, a VERY early WIP)

What is it?

Currently overly restrictive and dumb array auto-incrementer; great for kludged legacy code and overly restrictive design limits.

Why should I use it?

If elements need to be grouped but you must use a 1D Array, this allows you to append a new value halfway in the array, while updating all variables beyond that point. For example, arr = [0,1,2,3,4]; foo = arr[2] = 2; arr.unshift(-1) => [-1,0,1,2,3,4]; NOW foo = arr[2] = >>1<<

What does it work on?

Expected to work on: JavaScript, Python, Java, C++ ANY Language that formats arrays as:

[Any Previous Text] Definition = [data, goes, here ]

What are the restrictions for now?

Circa 2019-06-05, the current restrictions are:

  • INCREDIBLY VOLITILE, WRITES a file named "temp" as I current don't know how to write to a buffer or something along those lines
  • Bound to F5, requires grep and awk
  • CURRENTLY, CANNOT decrement values when an array element is removed, this will come after the Offset.
  • Assumes the Array starts on Line 1 (An offset needs to be added)
  • Assumes the Variable Name of the Array is the WORD BEFORE the equals sign; vim is smart and knows that equals is another word, so spacing is lenient.

vim-increment-array's People

Contributors

jamills98 avatar

vim-increment-array's Issues

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.