Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable (and/or remap) inline comment mappings? #255

Open
krishnakumarg1984 opened this issue Oct 5, 2019 · 2 comments
Open

How to disable (and/or remap) inline comment mappings? #255

krishnakumarg1984 opened this issue Oct 5, 2019 · 2 comments

Comments

@krishnakumarg1984
Copy link

krishnakumarg1984 commented Oct 5, 2019

Thank you for the excellent plugin. Here's a small issue/request.

For writing latex documents, I am using the vimtex plugin. The mapping cic of vimtex stands for change in command and is quite helpful to change the command being written

For eg., if ^ points to the current cursor location

\emph{This is an important line}
                           ^ 

cic in normal mode shall put the cursor in the correct location & switching to insert mode

\{This is an important line}
 ^                           

which is super helpful , eg. to make the text bold.

\textbf{This is an important line}

This conflicts with the inline comment mapping of tcomment.

Can you please provide some documentation to

  1. disable
  2. remap

tcomments inline mapping functionality?

@tomtom
Copy link
Owner

tomtom commented Oct 6, 2019 via email

@atomictom
Copy link

I think this is referring to the 'ic' mapping (g:tcomment_textobject_inlinecomment and TComment_ic).

You can disable it by adding:

let g:tcomment_textobject_inlinecomment = ''

to your .vimrc. I also think it's broken: the string concatenation will generate e.g. exec 'omapic <Plug>TComment_ic' rather than exec 'omap ic <Plug>TComment_ic'. You can fix that for now with:

let let g:tcomment_textobject_inlinecomment = ' ic'

But I'll also try sending a pull request.

atomictom added a commit to atomictom/tcomment_vim that referenced this issue Dec 30, 2019
This addresses tomtom#255 and
tomtom#188. It also partially
addresses tomtom#237 (by making
it clear that the functionality exists, even if it doesn't quite do
what's being asked for there).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants