Code Monkey home page Code Monkey logo

Comments (4)

alerque avatar alerque commented on June 11, 2024

You looking for gv?

from nerdcommenter.

josecastillolema avatar josecastillolema commented on June 11, 2024

Sorry @alerque I do not follow, could you please elaborate?
Just to clarify what I meant:

  1. Select a text in visual mode
  2. Press <leader>c<space> (NERDCommenterToggle)
  3. Have the selected text commented AND the keep the selection from step 1

from nerdcommenter.

alerque avatar alerque commented on June 11, 2024

Because there are a variety of possible use cases and starting scenarios, I'm not sure it makes sense to try to bake this into NERDCommenter itself, but VIM already provides the tooling to compose actions like this yourself. gv reselects that last visual mode selection range, so all you need to do is write yourself a map bound to whatever you like that calls the comment function you'd like and then gv at the end. All VIM commands are comparable this way so you can build up whatever combination of actions you want.

from nerdcommenter.

josecastillolema avatar josecastillolema commented on June 11, 2024

Hi @alerque , thanks for your comment.
Just to document in case anyone it's trying the same setup, have tried:

map <C-/> <plug>NERDCommenterToggle gv<cr>

but presents a erratic behavior.
Anyway, if you maintainers feel that this is not the native way of moving forward let me know and I'll close the issue.
Thanks

from nerdcommenter.

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.