sudar / comments.vim

To Comment/Un-Comment single/multiple lines of code for different source files
http://www.vim.org/scripts/script.php?script_id=1528
8 stars 8 forks source link

what's the purpose of == in the CommentLine function? #3

Open athom opened 11 years ago

athom commented 11 years ago

hi, @sudar

I found the == will extend the current window's height, which makes the quickfix windows's height narrower.

After remove the == , everything works perfect for me.

See this video for detail

Do you have any idea about the scenarios of the ==?

sudar commented 11 years ago

Do you have any idea about the scenarios of the ==?

I guess == is used in scenarios when you want to align the line properly after commenting it out.

After seeing your video, I am thinking that it is causing more problems than good. Let me test it more extensively by removing ==. If it works then I might remove it as well.

athom commented 11 years ago

Hi, The problem cause here because my key binding.

nmap = <C-W>+

The original == is used for format current line. It should be ok.

But think deeper, there may be auto format plugins for all kind of languages. For example, when I save a go file, it will automatically call the gofmt, to keep my file formated.

So the role of == here is somehow unnecessary, I believe this plugin should do one thing, and do it well.

What do you think?

athom commented 11 years ago

btw, I add one more feature in this plugin.

be able to comment javascript in html

But I failed to commit a pull request to your repo.

sudar commented 11 years ago

So the role of == here is somehow unnecessary, I believe this plugin should do one thing, and do it well.

I kind of agree with you on this. But since this addon is already used by lot of people, I don't want to introduce a backward incompatible change.

But if someone is willing to provide a patch, which can make this optional, then I will be happy to merge it.

But I failed to commit a pull request to your repo.

Kindly submit a pull request and I would be happy to merge this.