Giter Site home page Giter Site logo

evil-briefcase's Introduction

Evil Briefcase!

This package provides a vim motion to quickly switch between cases. Hate camelCase? SWAP IT!!!

Usage (spacemacs)

In your .spacemacs file (SPC f e d):

dotspacemacs-additional-packages
'(
  (evil-briefcase :location (recipe :fetcher github :repo "strickinato/evil-briefcase"))
)

Then in the user config later in the file:

(defun dotspacemacs/user-config ()
  (evil-briefcase-mode 1)
)

Can be used either as a motion:

zcE -- Make everything until the whitespace camelcased

zki( -- Make everthing inside the parentheses kebab kase

Or it can be used in visual mode:

vi(zk -- Select everything in the parentheses visually, then make it kebab kase

Keybindings

keybinding function case
zC evil-briefcase-camel-upper CamelCase
zc evil-briefcase-camel-lower camelCase
zS evil-briefcase-snake-upper SCREAMING_SNAKE_CASE
zs evil-briefcase-snake-lower snake_case
zK evil-briefcase-kebab-upper FAT-KEBAB-KASE
zk evil-briefcase-kebab-lower kebab-kase

Known Annoyances

This overwrites evil's current zs, which is evil-close-fold. I never use folding, but if you use code folding and don't rely on toggling, then you'll have to remap it back.

These functions are based of the amazing s.el. This made the package easy to write, but it also means that ceratin non text characters get stripped away. eg.

[:openTheBriefcase], with cursor on the B:

  zci[ #=> [open_the_briefcase] (we lose the colon)

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.