vim9script # Maintainer: Maxim Kim # Last Update: 2025 Mar 21 # 2025 Jun 22 by Vim Project: add mappings #17563 import autoload 'comment.vim' nnoremap (comment-toggle) comment.Toggle() xnoremap (comment-toggle) comment.Toggle() nnoremap (comment-toggle-line) comment.Toggle() .. '_' nnoremap (comment-toggle-end) comment.Toggle() .. '$' onoremap (comment-text-object-inner) comment.ObjComment(v:true) onoremap (comment-text-object-outer) comment.ObjComment(v:false) xnoremap (comment-text-object-inner) comment.ObjComment(v:true) xnoremap (comment-text-object-outer) comment.ObjComment(v:false) if get(g:, 'comment_mappings', true) nmap gc (comment-toggle) xmap gc (comment-toggle) nmap gcc (comment-toggle-line) nmap gC (comment-toggle-end) omap ic (comment-text-object-inner) omap ac (comment-text-object-outer) xmap ic (comment-text-object-inner) xmap ac (comment-text-object-outer) endif