• Stars
    star
    136
  • Rank 267,670 (Top 6 %)
  • Language
    Vim Script
  • License
    Other
  • Created about 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Easily change word casing with motions, text objects or visual mode.

caser.vim

Easily change word casing with motions, text objects or visual mode.

This plugin is largely inspired by Tim Pope's vim-abolish, and aims to improve its casing functionality to better blend with Vim's editing philosophy.

Table of contents

  1. Installation
  2. Usage

Installation

vim-caser may be installed by any of your favourite plugin managers. Be it Pathogen, Vundle or Plug, use whichever you prefer.

For example, when using with Plug:

Plug 'arthurxavierx/vim-caser'

Usage

vim-caser makes it easy to convert between multiple word casings, from camelCase to snake_case to Title Case, it blends nicely with Vim's editing features such as motions, text objects and visual mode.

All mappings below must be followed by a motion or a text object, or be applied within visual mode.

Case Default Mapping Plug Mapping (normal/visual)
MixedCase or PascalCase gsm or gsp <Plug>CaserMixedCase/<Plug>CaserVMixedCase
camelCase gsc <Plug>CaserCamelCase/<Plug>CaserVCamelCase
snake_case gs_ <Plug>CaserSnakeCase/<Plug>CaserVSnakeCase
UPPER_CASE gsu or gsU <Plug>CaserUpperCase/<Plug>CaserVUpperCase
Title Case gst <Plug>CaserTitleCase/<Plug>CaserVTitleCase
Sentence case gss <Plug>CaserSentenceCase/<Plug>CaserVSentenceCase
space case gs<space> <Plug>CaserSpaceCase/<Plug>CaserVSpaceCase
dash-case or kebab-case gs- or gsk <Plug>CaserKebabCase/<Plug>CaserVKebabCase
Title-Dash-Case or Title-Kebab-Case gsK <Plug>CaserTitleKebabCase/<Plug>CaserVTitleKebabCase
dot.case gs. <Plug>CaserDotCase/<Plug>CaserVDotCase

The gs prefix can be changed through the option g:caser_prefix. Alternatively, the default mappings can be disabled by setting g:caser_no_mappings.

Limitations

Currently vim-caser only supports the casing options displayed in the table above. If you would like to have another casing option in vim-caser, please feel free to create an issue in this repository, or to submit a pull request with the feature properly documented.

Global options

Name Default Description
g:caser_prefix gs The prefix of all mappings created by vim-caser. E.g.: gsc, gs-, gsu, etc.
g:caser_no_mappings not set Set to 1 to disable default mappings. Custom mappings can be set using the <Plug> mappings.

More Repositories

1

purescript-comonad-ui-todos

Simple task management application for my bachelor thesis based on Phil Freeman's Comonads as spaces
PureScript
53
star
2

purescript-comonad-rss

RSS feed reader written for the second part of my bachelor thesis: A Real-World Application with a Comonadic User Interface.
PureScript
52
star
3

vim-unicoder

unicoder.vim: easy unicode characters in insert mode with abbreviations
Vim Script
37
star
4

purescript-carpenter

Simple architectures for type-safe state management in React inspired by Elm, Thermite and Halogen
PureScript
34
star
5

contour-lines

Generative art experiment with terrain contour lines.
JavaScript
17
star
6

purescript-react-native

Low-level React Native bindings for PureScript
PureScript
15
star
7

atom-which-key

Atom package that displays available keybindings in a panel
JavaScript
11
star
8

purescript-comonad-ui

PureScript
10
star
9

monadic-party-edsl

Examples and slides for the Type-safe Embedded Domain-Specific Languages workshop at Monadic Party 2019 (will be updated as workshop happens)
PureScript
8
star
10

workshop-intro-fp-elm

Workshop: introduction to functional programming (with Elm)
Elm
8
star
11

purescript-pux-todomvc

TodoMVC implementation using PureScript and the Pux package
PureScript
6
star
12

purescript-comonad-ui-react

[WIP] purescript-react renderer for comonadic UIs
PureScript
6
star
13

purescript-react-router

Clean, type-safe routers for purescript-react
PureScript
4
star
14

ebook-category-theory

Bartosz Milewski's Category Theory for Programmers as an eBook
TeX
3
star
15

talks

PureScript
3
star
16

haskell-js

Lambda functions and functional programming for javascript
CoffeeScript
3
star
17

purescript-carpenter-todomvc

TodoMVC implementation using PureScript and the purescript-carpenter library
PureScript
3
star
18

vim-symbols

Insert special characters with Vim's native completion.
Vim Script
2
star
19

dotfiles

Vim Script
2
star
20

reverse-highway

Audio visualization experiment with WebGL.
JavaScript
2
star
21

arthurxavierx.github.io

HTML
1
star
22

modelr

Android application for 3D drawing based on 2D sketches
Java
1
star
23

dynamic-parser

Simple yet extensible dynamic parser written in ANSI-C
C
1
star
24

purescript-pux-dice

Example application for the presentation PureScript & Pux
JavaScript
1
star