Giter Site home page Giter Site logo

dshoreman / caw.vim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tyru/caw.vim

0.0 0.0 1.0 540 KB

Vim comment plugin: supported operator/non-operator mappings, repeatable by dot-command, 300+ filetypes

Shell 0.12% Lua 0.66% Vim Script 99.22%

caw.vim's Introduction

Build Status

Requirements

  • Vim 8.0 or later

Features

  • Supports 300+ filetypes (:help caw-supported-filetypes).
    • But caw.vim does not slow down your Vim startup because each comment string are defined at ftplugin files (after/ftplugin/<filetype>/caw.vim).
  • Supports operator keymappings (:help caw-keymappings-operator).
    • If g:caw_operator_keymappings is non-zero, all default keymappings map to operator keymappings.
    • If you need kana/vim-operator-user to use operator keymappings.
  • Supports also non-operator keymappings (:help caw-keymappings-non-operator).
  • Dot-repeatable if you installed kana/vim-repeat
  • The comment behavior only depends on 'filetype' by default. But if you have installed Shougo/context_filetype.vim, caw.vim also depends on the filetype of the context of the current cursor location. So you can comment/uncomment JavaScript in HTML correctly.
  • Well-tested powered by thinca/vim-themis

How it works

The below are the examples in "filetype=c". caw.vim supports 300+ filetypes (:help caw-supported-filetypes).

Type "gci" (toggle: "gcc", uncomment: "gcui")
  before:
      "   <- inserted here"
  after:
      "   # <- inserted here"

Type "gcI" (uncomment: "gcuI")
  before:
      "   inserted the first column"
  after:
      "#    inserted the first column"

Type "gca" (uncomment: "gcua")
  before:
      "inserted after this"
  after:
      "inserted after this    # "

Type "gcw" (uncomment: "gcuw")
  before:
      "  wrap!"
  after:
      "  /* wrap! */"

Type "gcb"
  before:
      "  box!"
  after:
      "  /********/"
      "  /* box! */"
      "  /********/"

Type "gco"
  before:
      "   func1();"
  after:
      "   func1()"
      "   // "  (now cursor is at the end and entered insert-mode)

Type "gcO"
  before:
      "   func1();"
  after:
      "   // "  (now cursor is at the end and entered insert-mode)
      "   func1();"

caw.vim's People

Contributors

ceda-ei avatar dshoreman avatar freed-wu avatar gonzoooooo avatar h1mesuke avatar haya14busa avatar hexium310 avatar ianpurvis avatar ichizok avatar jakalada avatar jubnzv avatar kotapiku avatar lumakernel avatar machakann avatar maku693 avatar mattn avatar minodisk avatar notomo avatar obcat avatar rhysd avatar sciencesakura avatar tsuyoshicho avatar tyru avatar ujihisa avatar uplus avatar zchee avatar

Forkers

skmtkytr

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.