Giter VIP home page Giter VIP logo

Comments (5)

Alexey-T avatar Alexey-T commented on June 20, 2024 1

made the fix in app. now all cmd_Markers* commands are recorded to macros. I don't know why it was disabled.... tested with Macros plugin - such commands are recorded now.

from cudatext.

Alexey-T avatar Alexey-T commented on June 20, 2024

This can be done by mouse already:

  • click at start-point
  • scroll to some place
  • Shift+click at end-point

from cudatext.

Alexey-T avatar Alexey-T commented on June 20, 2024

I forgot about MARKERS. your wish can be done with markers:

  • put caret on select-start, call 'markers: drop marker at caret' from Command Palette
  • put caret to select-end
  • call 'markers: select to last marker'

from cudatext.

hi5 avatar hi5 commented on June 20, 2024

Ah yes, Markers, that might do it. Alas they are not recorded in the Macros it seems.

It is also a pita you can't edit the macros in the macro-gui, but that is another problem :)

My purpose is (as an example) that I have a line of html (where | is the caret position):
<p>Lorem ipsum <b>dolor sit |amet</b>, consectetur adipiscing elit.</p>
Now run the macro to select the text within the bold tag e.g. dolor sit amet
I do a findprevious >, start select (Drop marker), do a findnext <, then select cmd_Markers_SelectToCaret
Is there an obvious mistake I'm making?
When I record it only records the findprevious/findnext and KeyRight/Left commands.

Edit: found the error in my code, I forgot to insert cmds. for the manually added commands. Works now!
When I modify the macro code to include the cmd_Markers_DropAtCaret and cmd_Markers_SelectToCaret it doesn't seem to generate the result I expect (or am hoping for)

"ed.cmd(cmds.cmd_FinderAction,'findprev\\x01>\\x01\\x01faA')",
"ed.cmd(cmds.cCommand_KeyRight)",
"ed.cmd(cmds.cmd_Markers_DropAtCaret)",
"ed.cmd(cmds.cmd_FinderAction,'findnext\\x01<\\x01\\x01faA')",
"ed.cmd(cmds.cCommand_KeyLeft)",
"ed.cmd(cmds.cmd_Markers_SelectToCaret)"

from cudatext.

hi5 avatar hi5 commented on June 20, 2024

Thanks!

from cudatext.

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.