Code Monkey home page Code Monkey logo

kakoune-phantom-selection's People

Contributors

krobelus avatar occivink avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kakoune-phantom-selection's Issues

Iterate-next without grabbing current selection

Hi,

here's my keybinds

declare-user-mode phantom
map global user p ": enter-user-mode -lock phantom<ret>" -docstring "phantom-selection"
map global phantom <a-)> ": phantom-sel-add-selection<ret><esc><esc><esc>" -docstring "add selection"
map global phantom <a-(> ";: phantom-sel-iterate-next<ret>" -docstring "clear selection"
map global phantom ) ": phantom-sel-iterate-next<ret>" -docstring "next"
map global phantom ( ": phantom-sel-iterate-prev<ret>" -docstring "prev"
#map global phantom % ": phantom-sel-select-all<ret>" -docstring "select all" #bugs
map global phantom <a-%> ": phantom-sel-select-all<ret>" -docstring "select all"

the problem is <a-(>. Doing ; to drop selection and then going to next one still leaves me with one character selected where the cursor was. Is there a way around this?

Feature request: selection groups

I'll explain what I mean with an example. But the gist is to support something similar to what counts do for ".

This is a snippet from rc/base/restructuredtext.kak:

add-highlighter shared/restructuredtext/c       ref c
add-highlighter shared/restructuredtext/cabal   ref cabal
add-highlighter shared/restructuredtext/clojure ref clojure
add-highlighter shared/restructuredtext/coffee  ref coffee
add-highlighter shared/restructuredtext/cpp     ref cpp

Say we wanted to create this from scratch. We would set it up so we have five copies, with the cursors at []:

add-highlighter shared/restructuredtext/[] ref []
add-highlighter shared/restructuredtext/[] ref []
add-highlighter shared/restructuredtext/[] ref []
add-highlighter shared/restructuredtext/[] ref []
add-highlighter shared/restructuredtext/[] ref []

Now I want to do 2interactive-itersel, where 2 means group them two by two. So the first group is the first two selections, second group selections 3 and 4, and so on. Similar to how the count works for ".

Another use-case is if I want to make ad-hoc changes to each of them, but still within the groups. Here's a contrived example where c is changed to c-family, andcabal to hs-cabal, and so on:

add-highlighter shared/restructuredtext/c-family       ref c-family
add-highlighter shared/restructuredtext/hs-cabal   ref hs-cabal
add-highlighter shared/restructuredtext/lisp-clojure ref lisp-clojure
add-highlighter shared/restructuredtext/js-coffee  ref js-coffee
add-highlighter shared/restructuredtext/gcc-cpp     ref gcc-cpp

The idea is that I can change both occurences of e.g. c to c-family in one go if I place two cursors per line similar to the previous example, and then going proceed to the second two.

test.kak causes startup errors when placed in autoload

When cloning the entire repo in autoload (which is what plugin managers do), I get this error

>>>
/home/johannes/.config/kak/bundle/plugins/kakoune-phantom-selection/test.kak:1:1: 'try': 2:5: 'source': /home/johannes/git/kak-lsp/phantom-selection.kak: No such file or directory
bundle: couldn't source /home/johannes/.config/kak/bundle/plugins/kakoune-phantom-selection/test.kak
shell stderr: <<<

with this particular setup ("bundle" plugin manager), it leaves phantom-selection commands disfunctional.

Can we rename test.kak to something without the kak file extension, so it's not sourced automatically?

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.