Coder Social home page Coder Social logo

Comments (4)

clason avatar clason commented on May 27, 2024

Is the file C++? What does :set filetype? say?

from neovim.

spacey-sooty avatar spacey-sooty commented on May 27, 2024

It echos filetype=cpp

from neovim.

clason avatar clason commented on May 27, 2024

...which also has /*%s*/ as the commentstring, so this is working as intended. If you want that changed, open an issue (or a PR) at vim/vim.

(Or install a commenting plugin; block comments are intentionally not implemented.)

from neovim.

zeertzjq avatar zeertzjq commented on May 27, 2024

This is working as documented:

3. Commenting							*commenting*

Nvim supports commenting and uncommenting of lines based on 'commentstring'.

Acting on a single line behaves as follows:
- If the line matches 'commentstring', the comment markers are removed (e.g.
  `/*foo*/` is transformed to `foo`).
- Otherwise the comment markers are added to the current line (e.g. `foo` is
  transformed to `/*foo*/`). Blank lines are ignored.

Acting on multiple lines behaves as follows:
- If each affected non-blank line matches 'commentstring', then all comment
  markers are removed.
- Otherwise all affected lines are converted to comments; blank lines are
  transformed to empty comments (e.g. `/**/`). Comment markers are aligned to
  the least indented line.

from neovim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.