Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ Following are the **default** config for the [`setup()`](#setup). If you want to
basic = true,
---Extra mapping; `gco`, `gcO`, `gcA`
extra = true,
---Extended mapping; `g>` `g<` `g>[count]{motion}` `g<[count]{motion}`
extended = false,
},
---Function to call before (un)comment
pre_hook = nil,
Expand Down Expand Up @@ -159,30 +157,6 @@ These mappings are enabled by default. (config: `mappings.extra`)
`gcA` - Insert comment to end of the current line and enters INSERT mode
```

<a id="extended-mappings"></a>

#### Extended mappings

These mappings are disabled by default. (config: `mappings.extended`)

- NORMAL mode

```help
`g>[count]{motion}` - (Op-pending) Comments the region using linewise comment
`g>c` - Comments the current line using linewise comment
`g>b` - Comments the current line using blockwise comment
`g<[count]{motion}` - (Op-pending) Uncomments the region using linewise comment
`g<c` - Uncomments the current line using linewise comment
`g<b`- Uncomments the current line using blockwise comment
```

- VISUAL mode

```help
`g>` - Comments the region using single line
`g<` - Unomments the region using single line
```

##### Examples

```help
Expand Down
8 changes: 5 additions & 3 deletions lua/Comment/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,12 @@ function api.setup(config)
K('n', cfg.extra.eol, api.locked('insert.linewise.eol'), { desc = 'Comment insert end of line' })
end

-- Extended Mappings
if cfg.mappings.extended then
-- NORMAL mode extended
vim.notify_once(
[=[[Comment] `extendend` mappings are deprecated and will be removed on 07 Nov 2022. Please refer to https://github.com/numToStr/Comment.nvim/wiki/Extended-Keybindings on how define them manually.]=],
vim.log.levels.WARN
)

K('n', 'g>', api.call('comment.linewise', 'g@'), { expr = true, desc = 'Comment region linewise' })
K('n', 'g>c', api.call('comment.linewise.current', 'g@$'), { expr = true, desc = 'Comment current line' })
K('n', 'g>b', api.call('comment.blockwise.current', 'g@$'), { expr = true, desc = 'Comment current block' })
Expand All @@ -310,7 +313,6 @@ function api.setup(config)
{ expr = true, desc = 'Uncomment current block' }
)

-- VISUAL mode extended
K(
'x',
'g>',
Expand Down
6 changes: 0 additions & 6 deletions lua/Comment/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
--- mappings = {
--- basic = true,
--- extra = true,
--- extended = false,
--- },
--- pre_hook = nil,
--- post_hook = nil,
Expand Down Expand Up @@ -72,10 +71,6 @@
---Enable extra mapping; `gco`, `gcO` and `gcA`
---(default: 'true')
---@field extra boolean
---Enable extended mapping; `g>`, `g<c`, 'g<b',
---'g<', 'g<c', 'g<b', `g>{motion}` and `g<{motion}`
---(default: 'false')
---@field extended boolean

---LHS of toggle mappings in NORMAL
---@class Toggler
Expand Down Expand Up @@ -106,7 +101,6 @@ local Config = {
mappings = {
basic = true,
extra = true,
extended = false,
},
toggler = {
line = 'gcc',
Expand Down