-
-
Notifications
You must be signed in to change notification settings - Fork 447
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
Double space delimiter for some languages with g:NERDSpaceDelims=1 #278
Comments
This sounds like a much simpler approach and a great tide over until such a time as somebody takes a stab at all the python related problems. I would be willing to review and merge any contributions to this effect. |
temporary lazy workaround: " vim 8 / neovim HEAD runtime: when ft==python, cms:=#\ %s
" -- when g:NERDSpaceDelims==1, then NERDComment results in double space
let g:NERDCustomDelimiters = {
\ 'python': { 'left': '#', 'right': '' }
\ }
|
For reference, the other open issue on this topic is #202 which suggests a more exhaustive fix. I'd be willing to accept contributions which either implement the partial fix discussed here or the more complete one there. Note that end users can hack around this according to their won preference as mention by @guyhughes, but I won't be accepting that change to the plugin itself because it breaks to many existing users's configurations out of the box. Thanks for understanding. |
@alerque I still have the problem with python file. |
This problem still persists (Python). |
That's why this issue is still open @im-n1 and @laixintao. We will close this issue when it is fixed, but so far nobody has stepped up to actually contribute a proper fix. Note there are two different workarounds in these related issue comments, but neither is something we can integrate into the plugin without breaking other scenarios. We'd be happy to accept a PR that deals with this properly (ala #421). |
追加の設定で暫定的に回避できるが、Issue は Open なままなので根本的には直っていない preservim/nerdcommenter#278
Python and a few others with a space in the comment string end up having two spaces when setting
let g:NERDSpaceDelims=1
I don't agree with having spaces in the Python comment, because someone with g:NERDSpaceDelims=0 would rightly expect not to get an extra space. So I would suggest removing it, but I see that there are those who want it to be there. They're of course wrong, but they're gonna think the same of me and so my other suggestion is:
That g:NERDSpaceDelims=1 doesn't add an extra space when there already is one, that the interpretation of this option is to ensure that there is a trailing space, rather than adding one.
This allows for having a default trailing space for languages like Python where style guides recommend having a space without introducing double spacing for those who prefer to always have a trailing space which is what g:NERDSpaceDelims accommodates
Those who want double spaces could change the comment string to have two spaces, and these would need to adjust their settings, the rest wouldn't.
The text was updated successfully, but these errors were encountered: