{"id":15144334,"url":"https://github.com/ziontee113/selectease","last_synced_at":"2025-10-23T20:32:22.440Z","repository":{"id":65928086,"uuid":"602054752","full_name":"ziontee113/SelectEase","owner":"ziontee113","description":"SelectEase selects matching nodes near the cursor using Treesitter queries with Vim's Select Mode.","archived":true,"fork":false,"pushed_at":"2023-05-25T23:48:43.000Z","size":29,"stargazers_count":79,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-01T02:14:56.396Z","etag":null,"topics":["neovim","neovim-plugin","tree-sitter"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ziontee113.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-02-15T12:02:47.000Z","updated_at":"2024-12-28T07:17:46.000Z","dependencies_parsed_at":"2024-02-01T06:01:46.313Z","dependency_job_id":null,"html_url":"https://github.com/ziontee113/SelectEase","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziontee113%2FSelectEase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziontee113%2FSelectEase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziontee113%2FSelectEase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziontee113%2FSelectEase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ziontee113","download_url":"https://codeload.github.com/ziontee113/SelectEase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237886844,"owners_count":19381910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["neovim","neovim-plugin","tree-sitter"],"created_at":"2024-09-26T10:40:38.046Z","updated_at":"2025-10-23T20:32:17.175Z","avatar_url":"https://github.com/ziontee113.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"## SelectEase.nvim\n\nSelect text using Treesitter Queries and start typing right away.\n\nhttps://user-images.githubusercontent.com/102876811/219462863-d004636c-f7b6-4556-8cc6-45845b3aa668.mp4\n\n---------------------------------------------------------------------------------\n\nSelectEase is a tool designed to identify all nodes that match a query and select the relevant target\nfrom the cursor, all in Select Mode. Its purpose is to efficiently locate nodes near the cursor\nand enable the user to easily edit that node by typing over it.\n\nVim's Select Mode allows you to type over a visual selection instead of using commands\nto delete or clear it, making text editing more efficient in certain cases.\n\n## Word of Caution:\n\nPlease be aware that this plugin is still in an experimental stage and may exhibit unexpected behavior.\nYour feedback and suggestions are welcome and please feel free to create issues or pull requests on the project's GitHub repository.\nI appreciate your willingness to try it out the plugin and share your thoughts.\n\n## Installation:\n\nExample `lazy.nvim` config:\n\n```lua\nreturn {\n    \"ziontee113/SelectEase\",\n    config = function()\n        local select_ease = require(\"SelectEase\")\n\n        -- For more language support check the `Queries` section\n        local lua_query = [[\n            ;; query\n            ((identifier) @cap)\n            ((string_content) @cap)\n            ((true) @cap)\n            ((false) @cap)\n        ]]\n        local python_query = [[\n            ;; query\n            ((identifier) @cap)\n            ((string) @cap)\n        ]]\n\n        local queries = {\n            lua = lua_query,\n            python = python_query,\n        }\n\n        vim.keymap.set({ \"n\", \"s\", \"i\" }, \"\u003cC-A-k\u003e\", function()\n            select_ease.select_node({\n                queries = queries,\n                direction = \"previous\",\n                vertical_drill_jump = true,\n                -- visual_mode = true, -- if you want Visual Mode instead of Select Mode\n                fallback = function()\n                    -- if there's no target, this function will be called\n                    select_ease.select_node({ queries = queries, direction = \"previous\" })\n                end,\n            })\n        end, {})\n        vim.keymap.set({ \"n\", \"s\", \"i\" }, \"\u003cC-A-j\u003e\", function()\n            select_ease.select_node({\n                queries = queries,\n                direction = \"next\",\n                vertical_drill_jump = true,\n                -- visual_mode = true, -- if you want Visual Mode instead of Select Mode\n                fallback = function()\n                    -- if there's no target, this function will be called\n                    select_ease.select_node({ queries = queries, direction = \"next\" })\n                end,\n            })\n        end, {})\n\n        vim.keymap.set({ \"n\", \"s\", \"i\" }, \"\u003cC-A-h\u003e\", function()\n            select_ease.select_node({\n                queries = queries,\n                direction = \"previous\",\n                current_line_only = true,\n                -- visual_mode = true, -- if you want Visual Mode instead of Select Mode\n            })\n        end, {})\n        vim.keymap.set({ \"n\", \"s\", \"i\" }, \"\u003cC-A-l\u003e\", function()\n            select_ease.select_node({\n                queries = queries,\n                direction = \"next\",\n                current_line_only = true,\n                -- visual_mode = true, -- if you want Visual Mode instead of Select Mode\n            })\n        end, {})\n\n        -- previous / next node that matches query\n        vim.keymap.set({ \"n\", \"s\", \"i\" }, \"\u003cC-A-p\u003e\", function()\n            select_ease.select_node({ queries = queries, direction = \"previous\" })\n        end, {})\n        vim.keymap.set({ \"n\", \"s\", \"i\" }, \"\u003cC-A-n\u003e\", function()\n            select_ease.select_node({ queries = queries, direction = \"next\" })\n        end, {})\n\n\n        -- Swap Nodes\n        vim.keymap.set({ \"n\", \"s\", \"i\" }, \"\u003cC-A-S-k\u003e\", function()\n            select_ease.swap_nodes({\n                queries = queries,\n                direction = \"previous\",\n                vertical_drill_jump = true,\n\n                -- swap_in_place option. Default behavior is cursor will jump to target after the swap\n                -- jump_to_target_after_swap = false --\u003e this will keep cursor in place after the swap\n            })\n        end, {})\n        vim.keymap.set({ \"n\", \"s\", \"i\" }, \"\u003cC-A-S-j\u003e\", function()\n            select_ease.swap_nodes({\n                queries = queries,\n                direction = \"next\",\n                vertical_drill_jump = true,\n            })\n        end, {})\n        vim.keymap.set({ \"n\", \"s\", \"i\" }, \"\u003cC-A-S-h\u003e\", function()\n            select_ease.swap_nodes({\n                queries = queries,\n                direction = \"previous\",\n                current_line_only = true,\n            })\n        end, {})\n        vim.keymap.set({ \"n\", \"s\", \"i\" }, \"\u003cC-A-S-l\u003e\", function()\n            select_ease.swap_nodes({\n                queries = queries,\n                direction = \"next\",\n                current_line_only = true,\n            })\n        end, {})\n        vim.keymap.set({ \"n\", \"s\", \"i\" }, \"\u003cC-A-S-p\u003e\", function()\n            select_ease.swap_nodes({ queries = queries, direction = \"previous\" })\n        end, {})\n        vim.keymap.set({ \"n\", \"s\", \"i\" }, \"\u003cC-A-S-n\u003e\", function()\n            select_ease.swap_nodes({ queries = queries, direction = \"next\" })\n        end, {})\n    end,\n}\n```\n\n## Queries\n\n\u003cdetails\u003e\u003csummary\u003eTypeScript React\u003c/summary\u003e\n\n```lua\nlocal tsx_query = [[\n    ;; query\n    ((identifier) @cap)\n    ((string_fragment) @cap)\n    ((property_identifier) @cap)\n]]\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eRust\u003c/summary\u003e\n\n```lua\nlocal rust_query = [[\n    ;; query\n    ((boolean_literal) @cap)\n    ((string_literal) @cap)\n\n    ; Identifiers\n    ((identifier) @cap)\n    ((field_identifier) @cap)\n    ((field_expression) @cap)\n    ((scoped_identifier) @cap)\n    ((unit_expression) @cap)\n\n    ; Types\n    ((reference_type) @cap)\n    ((primitive_type) @cap)\n    ((type_identifier) @cap)\n    ((generic_type) @cap)\n\n    ; Calls\n    ((call_expression) @cap)\n]]\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eGolang\u003c/summary\u003e\n\n```lua\nlocal go_query = [[\n    ;; query\n    ((selector_expression) @cap) ; Method call\n    ((field_identifier) @cap) ; Method names in interface\n\n    ; Identifiers\n    ((identifier) @cap)\n    ((expression_list) @cap) ; pseudo Identifier\n    ((int_literal) @cap)\n    ((interpreted_string_literal) @cap)\n\n    ; Types\n    ((type_identifier) @cap)\n    ((pointer_type) @cap)\n    ((slice_type) @cap)\n\n    ; Keywords\n    ((true) @cap)\n    ((false) @cap)\n    ((nil) @cap)\n]]\n```\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\u003csummary\u003eC/C++\u003c/summary\u003e\n\n```lua\nlocal c_query = [[\n    ;; query\n    ((string_literal) @cap)\n    ((system_lib_string) @cap)\n\n    ; Identifiers\n    ((identifier) @cap)\n    ((struct_specifier) @cap)\n    ((type_identifier) @cap)\n    ((field_identifier) @cap)\n    ((number_literal) @cap)\n    ((unary_expression) @cap)\n    ((pointer_declarator) @cap)\n\n    ; Types\n    ((primitive_type) @cap)\n\n    ; Expressions\n    (assignment_expression\n     right: (_) @cap)\n]]\nlocal cpp_query = [[\n    ;; query\n\n    ; Identifiers\n    ((namespace_identifier) @cap)\n]] .. c_query\n```\n\u003c/details\u003e\n\n## Feedback is always appreciated \n\nIf you encounter any issues or have suggestions for improving the plugin, please feel free to open an issue or pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziontee113%2Fselectease","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fziontee113%2Fselectease","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziontee113%2Fselectease/lists"}