imxiejie / ThinkVim

Vim configuration in the 21st century
MIT License
868 stars 106 forks source link

comment keymap is gcc #87

Closed hamsterBiscuit closed 4 years ago

hamsterBiscuit commented 4 years ago

Problems summary

now comment is gc

Environment Information

How to reproduce the problem from neovim startup (Required!)

  1. foo
  2. bar
  3. baz

gc is not this keymap

Screenshot (if possible)

glepnir commented 4 years ago

Hi gc is a prefix key for caw.vim. the usage

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();"